PLCnext API Documentation  21.9.0.40
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Friends | List of all members
Arp::TypeName< T > Class Template Reference

This (meta programming) class provides the C++ typename of the as template argument passed type. More...

#include <TypeName.hxx>

Public Member Functions

 TypeName (void)
 Constructs a CommonTypeName instance and determines the typename of the of T. More...
 
 TypeName (const TypeName &arg)=default
 The default copy constructor. More...
 
 TypeName (TypeName &&arg)=default
 The default move constructor. More...
 
TypeNameoperator= (const TypeName &arg)=default
 The default assignment operator. More...
 
 ~TypeName (void)=default
 The default destructor.. More...
 
String GetCommonName (void) const
 Gets the common name of the as template parameter given type according to the CLS. More...
 
String GetSafeName (void) const
 Gets a safe name of the as template parameter given type. More...
 
String GetNamespace (void) const
 Gets the namespace of the as template parameter given type. More...
 
String GetClassName (void) const
 Gets the classname of the as template parameter given type. More...
 
 operator const String & (void) const
 Converts this instance implicitely to string. More...
 
 operator const char * (void) const
 Converts this instance implicitely to char*. More...
 
bool operator== (const TypeName &other)
 Determines if this instance is equal to other . More...
 
bool operator!= (const TypeName &other)
 Determines if this instance is not equal to other . More...
 

Public Attributes

String Value
 The resulting typename. More...
 

Friends

class TypeName< void >
 

Detailed Description

template<class T = void>
class Arp::TypeName< T >

This (meta programming) class provides the C++ typename of the as template argument passed type.

Template Parameters
TThe type to deduct the typename from.

This class uses RTTI which must be enabled by the C++ build.

Constructor & Destructor Documentation

◆ TypeName() [1/3]

template<class T >
Arp::TypeName< T >::TypeName ( void  )
inline

Constructs a CommonTypeName instance and determines the typename of the of T.

◆ TypeName() [2/3]

template<class T = void>
Arp::TypeName< T >::TypeName ( const TypeName< T > &  arg)
default

The default copy constructor.

Parameters
argThe argument to copy.

◆ TypeName() [3/3]

template<class T = void>
Arp::TypeName< T >::TypeName ( TypeName< T > &&  arg)
default

The default move constructor.

Parameters
argThe argument to move.

◆ ~TypeName()

template<class T = void>
Arp::TypeName< T >::~TypeName ( void  )
default

The default destructor..

Member Function Documentation

◆ GetClassName()

template<class T >
String Arp::TypeName< T >::GetClassName ( void  ) const
inline

Gets the classname of the as template parameter given type.

Returns
The classname of this typename.

◆ GetCommonName()

template<class T >
String Arp::TypeName< T >::GetCommonName ( void  ) const
inline

Gets the common name of the as template parameter given type according to the CLS.

Returns
The common name of this typename.

◆ GetNamespace()

template<class T >
String Arp::TypeName< T >::GetNamespace ( void  ) const
inline

Gets the namespace of the as template parameter given type.

Returns
The namesapce of this typename.

◆ GetSafeName()

template<class T >
String Arp::TypeName< T >::GetSafeName ( void  ) const
inline

Gets a safe name of the as template parameter given type.

The safe typename replaces dots and double colons by underscores.

Returns
The safe name of this typename.

◆ operator const char *()

template<class T >
Arp::TypeName< T >::operator const char * ( void  ) const
inline

Converts this instance implicitely to char*.

Returns
The typename of this instance as char pointer.

◆ operator const String &()

template<class T >
Arp::TypeName< T >::operator const String & ( void  ) const
inline

Converts this instance implicitely to string.

Returns
The typename of this instance as string.

◆ operator!=()

template<class T >
bool Arp::TypeName< T >::operator!= ( const TypeName< T > &  other)
inline

Determines if this instance is not equal to other .

Parameters
otherThe instance to compare this instance to.
Returns
true if this instance is not equal to other , otherwise false.

◆ operator=()

template<class T = void>
TypeName& Arp::TypeName< T >::operator= ( const TypeName< T > &  arg)
default

The default assignment operator.

Parameters
argThe argument to assign to this instance.
Returns
This instance as reference.

◆ operator==()

template<class T >
bool Arp::TypeName< T >::operator== ( const TypeName< T > &  other)
inline

Determines if this instance is equal to other .

Parameters
otherThe instance to compare this instance to.
Returns
true if this instance is equal to other , otherwise false.

Member Data Documentation

◆ Value

template<class T = void>
String Arp::TypeName< T >::Value

The resulting typename.


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