8#ifndef HPP_ALIB_BOXING_DBGBOXING
9#define HPP_ALIB_BOXING_DBGBOXING 1
12#ifndef HPP_ALIB_BOXING_BOXING
18#if ALIB_CAMP && !defined(HPP_ALIB_LANG_FORMAT_FORMATTER)
22#if !defined (_GLIBCXX_TUPLE) && !defined(_TUPLE_)
26namespace alib {
namespace boxing {
51template<
typename... TAssociatedTypes >
52struct DbgStringTable :
public std::vector<std::tuple<String, TAssociatedTypes...>>
58 using Base = std::vector<ElementType>;
82 template <
typename... TArgs>
87 return std::get<0>( std::vector<std::tuple<String, TAssociatedTypes...>>::back() );
153 std::vector<detail::VTable*>
169 std::vector<std::pair<const std::type_info*,uinteger>>
183 std::vector<std::pair<const std::type_info*,uinteger>>& output );
196 std::vector<std::pair<const std::type_info*,uinteger>>
199 std::vector<std::pair<const std::type_info*,uinteger>> result;
215 std::vector<std::pair<const std::type_info*,uinteger>>
301 template<
typename TBoxable>
307 return DbgBoxing::TypeInfo<TBoxable>( TBoxable(), headline, indent );
325 template<
typename TBoxable>
328 const String& headline=
A_CHAR(
"Boxing Information For Boxable Type: "),
339 for(
int theSakeOfAutoTabs= 0 ; theSakeOfAutoTabs < 2 ; ++theSakeOfAutoTabs )
344 if(
ATMP_EQ(TSrc, std::nullptr_t ) )
346 target << indent <<
"'std::nullptr_t' sets a box to void state" <<
NewLine();
359 boxing::TT_IsUnboxable <TSrc >::value );
362 formatter->Release();
393 bool isValueTypeCustomized,
394 bool isPointerTypeCustomized,
395 bool fitsToPlaceholder,
396 bool copyConstructible,
397 bool triviallyDestructible,
417 const std::vector<std::pair<const std::type_info*,uinteger>>& input,
435 const std::vector<std::pair<const std::type_info*,uinteger>>& input,
457 bool includeFunctions=
false );
476 bool includeFunctions );
478#if ALIB_DEBUG_MONOMEM
const detail::VTable * DbgGetVTable() const
ALIB_API const char * Get()
strings::TString< TChar > EmplaceString(const strings::TString< TChar > &src)
constexpr integer Length() const
#define ATMP_EQ( T, TEqual)
#define ALIB_CALLER_PRUNED
constexpr CString NewLine()
constexpr CString EmptyString()
std::shared_ptr< lang::format::Formatter > SPFormatter
strings::TString< character > String
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
static ALIB_API void dumpVTables(AString &target, detail::DbgStringTable< const detail::VTable * > &vtableNames, bool staticVtables, bool includeFunctions)
static ALIB_API AString & removeNamespaces(AString &string, integer startIndex)
static ALIB_API std::vector< std::pair< const std::type_info *, uinteger > > GetKnownFunctionTypes()
static AString TypeName(const detail::VTable *vtable)
static std::vector< std::pair< const std::type_info *, uinteger > > GetSpecificFunctionTypes(const detail::VTable *vtable)
static ALIB_API void DumpCustomFunctionHashMapMetrics(AString &target, bool detailedBucketList)
static ALIB_API void typeInfo(AString &target, const detail::VTable *vtable, const String &indent, bool srcIsPointer, bool isValueTypeCustomized, bool isPointerTypeCustomized, bool fitsToPlaceholder, bool copyConstructible, bool triviallyDestructible, bool isUnboxable)
static ALIB_API alib::AString DumpFunctions(const std::vector< std::pair< const std::type_info *, uinteger > > &input, const String &headline=EmptyString(), const String &indent=EmptyString())
static ALIB_API void dumpFunctions(const std::vector< std::pair< const std::type_info *, uinteger > > &input, AString &output, const String &headline, const String &indent, detail::DbgStringTable< uinteger > &tmpStrings)
static ALIB_API void getFunctionTypes(const detail::FunctionTable &input, std::vector< std::pair< const std::type_info *, uinteger > > &output)
static ALIB_API std::vector< detail::VTable * > GetKnownVTables()
static AString TypeInfo(const String &headline=A_CHAR("Boxing Information For Boxable Type: "), const String &indent=A_CHAR(" "))
static std::vector< std::pair< const std::type_info *, uinteger > > GetSpecificFunctionTypes(const Box &box)
static ALIB_API void typeName(const detail::VTable *vtable, AString &result)
static ALIB_API AString DumpAll()
static AString TypeName(const Box &box)
static ALIB_API std::vector< String > RemovableNamespaces
static ALIB_API AString DumpVTables(bool staticVtables, bool includeFunctions=false)
static AString TypeInfo(const Box &box, const String &headline=A_CHAR("Boxing Information For Boxable Type: "), const String &indent=A_CHAR(" "))
std::vector< ElementType > Base
DbgStringTable(MonoAllocator &monoAllocator)
String & Add(const String &src, TArgs &&... args)
std::tuple< String, TAssociatedTypes... > ElementType
MonoAllocator & allocator