Jpp  18.0.1-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
JLANG::JEnumeration< T > Struct Template Reference

Enumeration of single data type. More...

#include <JEnumeration.hh>

Static Public Member Functions

static JLabel_t getLabel (const JType< T > &type)
 Get label of given data type. More...
 
static JLabel_t getLabel (const T &object)
 Get label of given object. More...
 
static std::ostream & print (std::ostream &out)
 Print enumeration. More...
 

Detailed Description

template<class T>
struct JLANG::JEnumeration< T >

Enumeration of single data type.

Definition at line 46 of file JEnumeration.hh.

Member Function Documentation

template<class T>
static JLabel_t JLANG::JEnumeration< T >::getLabel ( const JType< T > &  type)
inlinestatic

Get label of given data type.

Parameters
typedata type
Returns
label

Definition at line 54 of file JEnumeration.hh.

55  {
56  return JLabel_t(JTypeID<T>::ID,
59  }
Template definition of policy class to label data types in a type list.
Definition: JTypeID.hh:194
Auxiliary data structure to label data types within a type list.
Definition: JTypeID.hh:22
template<class T>
static JLabel_t JLANG::JEnumeration< T >::getLabel ( const T object)
inlinestatic

Get label of given object.

Parameters
objectobject
Returns
label

Definition at line 68 of file JEnumeration.hh.

69  {
70  return getLabel(JType<T>());
71  }
Auxiliary class for a type holder.
Definition: JType.hh:19
static JLabel_t getLabel(const JType< T > &type)
Get label of given data type.
Definition: JEnumeration.hh:54
template<class T>
static std::ostream& JLANG::JEnumeration< T >::print ( std::ostream &  out)
inlinestatic

Print enumeration.

Parameters
outoutput stream
Returns
output stream

Definition at line 80 of file JEnumeration.hh.

81  {
82  out << getLabel(JType<T>()) << std::endl;
83 
84  return out;
85  }

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