BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::NameOf< TYPE > Class Template Reference

#include <bsls_nameof.h>

Inheritance diagram for bsls::NameOf< TYPE >:
bsls::NameOf_Base

Public Member Functions

 NameOf ()
 Initialize the base class of this object to the name of TYPE.
 
 operator const char * () const
 Return a pointer to the a string containing the name of TYPE.
 
const char * name () const
 

Additional Inherited Members

- Protected Types inherited from bsls::NameOf_Base
enum  { k_USELESS_PREAMBLE_LEN = 26 }
 
- Static Protected Member Functions inherited from bsls::NameOf_Base
static const char * initBuffer (char *buffer, const char *functionName)
 

Detailed Description

template<class TYPE>
class bsls::NameOf< TYPE >

This class provides a means to display the type name of its template parameter TYPE. An instance of this class can be implicitly (or explicitly via the name accessor) cast to a const char * which will point to a buffer containing the description of the type. Note that all instances of a given type will refer to the same character buffer containing the name.

See bsls_nameof

Constructor & Destructor Documentation

◆ NameOf()

template<class TYPE >
bsls::NameOf< TYPE >::NameOf ( )

Initialize the base class of this object to name of TYPE.

Member Function Documentation

◆ name()

template<class TYPE >
const char * bsls::NameOf< TYPE >::name ( ) const
inline

Return a pointer to the a string containing the name of TYPE, this serves as a convenient way to explicitly cast the return value to a const char *.

◆ operator const char *()

template<class TYPE >
bsls::NameOf< TYPE >::operator const char * ( ) const
inline

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