Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
cppgc::NameProvider Class Referenceabstract

#include <name-provider.h>

Public Member Functions

virtual ~NameProvider ()=default
 
virtual const char * GetHumanReadableName () const =0
 

Static Public Member Functions

static constexpr bool SupportsCppClassNamesAsObjectNames ()
 

Static Public Attributes

static constexpr const char kHiddenName [] = "InternalNode"
 
static constexpr const char kNoNameDeducible [] = "<No name>"
 

Detailed Description

NameProvider allows for providing a human-readable name for garbage-collected objects.

There's two cases of names to distinguish: a. Explicitly specified names via using NameProvider. Such names are always preserved in the system. b. Internal names that Oilpan infers from a C++ type on the class hierarchy of the object. This is not necessarily the type of the actually instantiated object.

Depending on the build configuration, Oilpan may hide names, i.e., represent them with kHiddenName, of case b. to avoid exposing internal details.

Constructor & Destructor Documentation

◆ ~NameProvider()

virtual cppgc::NameProvider::~NameProvider ( )
virtualdefault

Member Function Documentation

◆ GetHumanReadableName()

virtual const char * cppgc::NameProvider::GetHumanReadableName ( ) const
pure virtual

Specifies a name for the garbage-collected object. Such names will never be hidden, as they are explicitly specified by the user of this API.

Returns
a human readable name for the object.

◆ SupportsCppClassNamesAsObjectNames()

static constexpr bool cppgc::NameProvider::SupportsCppClassNamesAsObjectNames ( )
inlinestaticconstexpr

Indicating whether the build supports extracting C++ names as object names.

Returns
true if C++ names should be hidden and represented by kHiddenName.

Member Data Documentation

◆ kHiddenName

constexpr const char cppgc::NameProvider::kHiddenName[] = "InternalNode"
staticconstexpr

Name that is used when hiding internals.

◆ kNoNameDeducible

constexpr const char cppgc::NameProvider::kNoNameDeducible[] = "<No name>"
staticconstexpr

Name that is used in case compiler support is missing for composing a name from C++ types.


The documentation for this class was generated from the following file: