Neo  0.5.0
Developer Documentation
Neo::Variable< T > Class Template Reference

This templacte class is used to provide access to custom data without messing with void*'s. More...

#include <Variable.h>

Public Member Functions

 Variable (T data, VARIABLE_TYPE type)
 Constructs a new object. More...
 
getData ()
 Returns the currently saved data. More...
 
VARIABLE_TYPE getType ()
 Returns the type of the currently saved data. More...
 
void setData (T data)
 Changes the value of the currently saved data. More...
 

Detailed Description

template<class T>
class Neo::Variable< T >

This templacte class is used to provide access to custom data without messing with void*'s.

Author
Yannick Pflanzer

Constructor & Destructor Documentation

template<class T >
Neo::Variable< T >::Variable ( data,
VARIABLE_TYPE  type 
)
inline

Constructs a new object.

The data in the given variable will be copied to an internal buffer. If it is an address, only the address willa be saved.

Attention: Don't free memory that will be needed!

Parameters
dataThe variable to save.
typeThe type of the variable.

Member Function Documentation

template<class T >
T Neo::Variable< T >::getData ( )
inline

Returns the currently saved data.

Returns
The data.
template<class T >
VARIABLE_TYPE Neo::Variable< T >::getType ( )
inline

Returns the type of the currently saved data.

Returns
The type.
template<class T >
void Neo::Variable< T >::setData ( data)
inline

Changes the value of the currently saved data.

Parameters
dataThe new value.

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