Overview     Modules     Class Hierarchy     Classes     Members  
tlp::StructDef Struct Reference

This class enables to define a structure. More...

#include <Reflect.h>

Public Member Functions

template<typename T >
void add (const char *str, const char *inHelp=0, const char *inDefValue=0, bool mandatory=true)
 Add the variable of type T and name str in the structure.
bool hasField (std::string)
 Returns if a name field exists.
tlp::Iterator< std::pair
< std::string, std::string > > * 
getField () const
 Get iterator on structure fields.
std::string getHelp (std::string str) const
 Get field help & default string-value (see also XXXType in Types.h)
std::string getDefValue (std::string str) const
void setDefValue (std::string name, std::string value)
bool isMandatory (std::string str) const
 Return if field is mandatory.
void erase (std::string str)
 Remove the variable which have str has name in the structure.
void buildDefaultDataSet (DataSet &ioDataSet, Graph *inG=0)

Detailed Description

This class enables to define a structure.

Member Function Documentation

template<typename T >
void tlp::StructDef::add ( const char *  str,
const char *  inHelp = 0,
const char *  inDefValue = 0,
bool  mandatory = true 
)

Add the variable of type T and name str in the structure.

void tlp::StructDef::buildDefaultDataSet ( DataSet ioDataSet,
Graph inG = 0 
)

Build a default dataSet according to fields The optional Graph is needed to create properties (PropertyInterface*)

void tlp::StructDef::erase ( std::string  str)

Remove the variable which have str has name in the structure.

std::string tlp::StructDef::getDefValue ( std::string  str) const
tlp::Iterator< std::pair<std::string,std::string> >* tlp::StructDef::getField ( ) const

Get iterator on structure fields.

std::string tlp::StructDef::getHelp ( std::string  str) const

Get field help & default string-value (see also XXXType in Types.h)

bool tlp::StructDef::hasField ( std::string  )

Returns if a name field exists.

bool tlp::StructDef::isMandatory ( std::string  str) const

Return if field is mandatory.

void tlp::StructDef::setDefValue ( std::string  name,
std::string  value 
)


Tulip Software by LaBRI Visualization Team    2001 - 2012