Type< T > Class Template Referenceabstract

a generic Item, header-only More...

#include <Type.h>

Inheritance diagram for Type< T >:

Public Types

typedef T ValueType
 name the value type to make it possible for function templates acting on Type<T> to access T properties and methods More...
 

Public Member Functions

 Type (const std::string &tag, const std::string &description, Persistent *parent, const T &value)
 main constructor More...
 
 Type (Type &&other)
 move constructor More...
 
Typeoperator= (Type &&other)
 move assignment More...
 
T & value (void)
 Type value getter. More...
 
const T & value (void) const
 
bool operator!= (const Type &rhs) const
 
bool operator== (const Type &rhs) const
 
- Public Member Functions inherited from Item
 Item (const Item &other)
 copy constructor copies all elements but parent which is set to nullptr More...
 
Itemoperator= (const Item &other)
 copy assignment operator copies all elements but parent which is set to nullptr More...
 
 Item (const std::string &tag, const std::string &description, Persistent *parent)
 
 Item (Item &&other)
 move constructor More...
 
Itemoperator= (Item &&other)
 move assignment operator More...
 
virtual ~Item ()
 
const std::string & tag () const
 
const std::string & description () const
 
std::string fullTag () const
 
const Persistentparent () const
 
virtual const std::string & type () const =0
 
void setTag (const std::string &tag)
 
void setDescription (const std::string &description)
 
void setWideTag (const std::wstring &tag)
 wide-character variant, More...
 
void setWideDescription (const std::wstring &description)
 wide-character variant, More...
 
bool operator!= (const Item &rhs) const
 
bool operator== (const Item &rhs) const
 

Protected Attributes

value_
 
- Protected Attributes inherited from Item
Persistentparent_
 pointer to the parent Persistent; set to this by the constructor if Item is self-standing or a root Persistent of a tree More...
 

Friends

class Integer
 
class Object
 
std::ostream & operator<< (std::ostream &os, const Type< T > &type)
 

Detailed Description

template<class T>
class Type< T >

a generic Item, header-only

#include "Type.h"

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Member Typedef Documentation

◆ ValueType

template<class T >
typedef T Type< T >::ValueType

name the value type to make it possible for function templates acting on Type<T> to access T properties and methods

Constructor & Destructor Documentation

◆ Type() [1/2]

template<class T >
Type< T >::Type ( const std::string &  tag,
const std::string &  description,
Persistent parent,
const T &  value 
)
inline

main constructor

◆ Type() [2/2]

template<class T >
Type< T >::Type ( Type< T > &&  other)
inline

move constructor

Member Function Documentation

◆ operator!=()

template<class T >
bool Type< T >::operator!= ( const Type< T > &  rhs) const
inline
Returns
true if the two Types are different

◆ operator=()

template<class T >
Type & Type< T >::operator= ( Type< T > &&  other)
inline

move assignment

◆ operator==()

template<class T >
bool Type< T >::operator== ( const Type< T > &  rhs) const
inline
Returns
true if the two Types are identical

◆ value() [1/2]

template<class T >
T & Type< T >::value ( void  )
inline

Type value getter.

◆ value() [2/2]

template<class T >
const T & Type< T >::value ( void  ) const
inline

Friends And Related Function Documentation

◆ Integer

template<class T >
friend class Integer
friend

◆ Object

template<class T >
friend class Object
friend

◆ operator<<

template<class T >
std::ostream & operator<< ( std::ostream &  os,
const Type< T > &  type 
)
friend

Member Data Documentation

◆ value_

template<class T >
T Type< T >::value_
protected

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