COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Types | Public Member Functions | Protected Attributes | List of all members
vrb::regClass< variableType > Class Template Referenceabstract

#include <regClass.h>

Public Types

typedef std::map< const
std::string, std::shared_ptr
< variableType > > 
VariableMap
 

Public Member Functions

 regClass (const std::string &n, int ID)
 
int getID ()
 get Class ID More...
 
void setID (int id)
 
const std::stringgetName ()
 
void append (variableType *var)
 creates a a regvar entry in the map More...
 
variableType * getVar (const std::string &n)
 getVariableEntry, returns NULL if not found More...
 
void deleteVar (const std::string &n)
 remove a Variable More...
 
void deleteAllNonStaticVars ()
 remove some Variables More...
 
bool isDeleted ()
 
void setDeleted (bool isdeleted=true)
 
void writeClass (std::ofstream &file)
 write the classname and all variables in a .vrbreg file More...
 
void readVar (std::ifstream &file)
 reads the name and value out of stream, return false if class has no variable More...
 
virtual std::shared_ptr
< variableType > 
createVar (const std::string &name, covise::TokenBuffer &&value)=0
 
 ~regClass ()
 

Protected Attributes

std::string name
 
int classID = -1
 
bool isDel
 
VariableMap myVariables
 

Member Typedef Documentation

template<class variableType>
typedef std::map<const std::string, std::shared_ptr<variableType> > vrb::regClass< variableType >::VariableMap

Constructor & Destructor Documentation

template<class variableType>
vrb::regClass< variableType >::regClass ( const std::string n,
int  ID 
)
inline
template<class variableType>
vrb::regClass< variableType >::~regClass ( )
inline

Member Function Documentation

template<class variableType>
void vrb::regClass< variableType >::append ( variableType *  var)
inline

creates a a regvar entry in the map

template<class variableType>
virtual std::shared_ptr<variableType> vrb::regClass< variableType >::createVar ( const std::string name,
covise::TokenBuffer &&  value 
)
pure virtual

Implemented in vrb::clientRegClass.

template<class variableType>
void vrb::regClass< variableType >::deleteAllNonStaticVars ( )
inline

remove some Variables

template<class variableType>
void vrb::regClass< variableType >::deleteVar ( const std::string n)
inline

remove a Variable

template<class variableType>
int vrb::regClass< variableType >::getID ( )
inline

get Class ID

template<class variableType>
const std::string& vrb::regClass< variableType >::getName ( )
inline
template<class variableType>
variableType* vrb::regClass< variableType >::getVar ( const std::string n)
inline

getVariableEntry, returns NULL if not found

template<class variableType>
bool vrb::regClass< variableType >::isDeleted ( )
inline
template<class variableType>
void vrb::regClass< variableType >::readVar ( std::ifstream &  file)
inline

reads the name and value out of stream, return false if class has no variable

template<class variableType>
void vrb::regClass< variableType >::setDeleted ( bool  isdeleted = true)
inline
template<class variableType>
void vrb::regClass< variableType >::setID ( int  id)
inline
template<class variableType>
void vrb::regClass< variableType >::writeClass ( std::ofstream &  file)
inline

write the classname and all variables in a .vrbreg file

Member Data Documentation

template<class variableType>
int vrb::regClass< variableType >::classID = -1
protected
template<class variableType>
bool vrb::regClass< variableType >::isDel
protected
template<class variableType>
VariableMap vrb::regClass< variableType >::myVariables
protected
template<class variableType>
std::string vrb::regClass< variableType >::name
protected

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