Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
format-obj.cpp File Reference

Go to the source code of this file.

Description

Some implementation helpers for simple object display.

This file provides some basic implementation functions, which can be called from a generic front-end (header). The reason we stash away some functions into an implementation unit is to keep the include overhead low, which helps to reduce both code size and compilation time. The functions here perform some formatting tasks commonly used from debugging and diagnostics code, both to investigate object contents and show types and addresses. They are referred from our [lightweight string converter](util::StringConv), but also from the util::toString() function and more common formatting utils.

See also
FormatHelper_test
FormatString_test

Definition in file format-obj.cpp.

#include "lib/error.hpp"
#include "lib/format-obj.hpp"
#include "lib/unique-malloc-owner.hpp"
#include "lib/symbol.hpp"
#include "lib/util.hpp"
#include <iomanip>
#include <sstream>
#include <string>
#include <regex>

Macros

#define TYP_EXP
 

Functions

string demangleCxx (Literal rawName)
 Fallback type-ID: More...
 
string humanReadableTypeID (lib::Literal)
 pretty-print an internal C++ type representation More...
 
string primaryTypeComponent (lib::Literal)
 extract core name component from a raw type spec More...
 
string sanitisedFullTypeName (lib::Literal)
 build a sanitised ID from full type name More...
 
string sanitisedSymbol (std::string const &)
 condense a string and retain only valid identifiers More...
 
ostream & showAddr (std::ostream &, void const *addr)
 preconfigured format for pretty-printing of addresses More...
 
string showAddr (void const *addr) noexcept
 pretty-print an address as hex-suffix More...
 
string showDouble (double) noexcept
 pretty-print a double in fixed-point format More...
 
string showFloat (float val) noexcept
 
string showSize (size_t val) noexcept
 

Variables

const string BOOL_FALSE_STR
 
const string BOOL_TRUE_STR
 
const string BOTTOM_INDICATOR
 
const string FAILURE_INDICATOR
 
const string FUNCTION_INDICATOR
 
const string VOID_INDICATOR
 

Namespaces

 lib
 Implementation namespace for support and library code.
 
 lib::meta
 
 util
 

Macro Definition Documentation

#define TYP_EXP