Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
static JLabel_t getLabel (const T &object)
 Get label of given object.
 
static std::ostream & print (std::ostream &out)
 Print enumeration.
 

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

◆ getLabel() [1/2]

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

◆ getLabel() [2/2]

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 }
static JLabel_t getLabel(const JType< T > &type)
Get label of given data type.

◆ print()

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: