itom 2.0.0
|
Public Types | |
enum | Type { NoAutosave = 0x010000, Readonly = 0x020000, In = 0x040000, Out = 0x080000, Pointer = 0x000001, Char = 0x000002, Int = 0x000004, Double = 0x000008, String = 0x000020 | Pointer, HWRef = 0x000040 | Pointer | NoAutosave, DObjPtr = 0x000010 | Pointer | NoAutosave, CharArray = Char | Pointer, IntArray = Int | Pointer, DoubleArray = Double | Pointer, PointCloudPtr = 0x000080 | Pointer | NoAutosave, PointPtr = 0x000100 | Pointer | NoAutosave, PolygonMeshPtr = 0x000200 | Pointer | NoAutosave } |
Public Member Functions | |
ParamBase () | |
default constructor, creates "empty" tParam | |
ParamBase (const ByteArray &name) | |
ParamBase (const ByteArray &name, const uint32 type) | |
ParamBase (const ByteArray &name, const uint32 type, const char *val) | |
ParamBase (const ByteArray &name, const uint32 type, const double val) | |
ParamBase (const ByteArray &name, const uint32 type, const int val) | |
ParamBase (const ByteArray &name, const uint32 type, const unsigned int size, const char *values) | |
ParamBase (const ByteArray &name, const uint32 type, const unsigned int size, const int *values) | |
ParamBase (const ByteArray &name, const uint32 type, const unsigned int size, const double *values) | |
virtual | ~ParamBase () |
ParamBase (const ParamBase ©Constr) | |
const ParamBase | operator[] (const int num) const |
braces operator for element-wise access in arrays | |
ParamBase & | operator= (const ParamBase &rhs) |
assignment operator (sets values of lhs to values of rhs tParam, strings are copied) | |
ito::RetVal | copyValueFrom (const ito::ParamBase *rhs) |
just copies the value from the right-hand-side tParam (rhs) to this tParam. | |
bool | isNumeric (void) const |
returns true if Param is of type char, int or double | |
ito::RetVal | addNameSuffix (const char *suffix) |
bool | isValid (void) const |
returns whether tParam contains a valid type (true) or is an empty parameter (false, type == 0). The default tParam-constructor is always an invalid tParam. | |
uint32 | getType (bool filterFlags=true) const |
returns parameter type (autosave flag and optional flag are only included if filterFlags is set false) | |
uint32 | getFlags (void) const |
returns parameter flags (parameter type is not included) | |
uint32 | setFlags (const uint32 flags) |
sets parameter flags (parameter type remains untouched), for possible flags see tParamType | |
const char * | getName (void) const |
returns parameter name (string is not copid) | |
uint32 | getAutosave (void) const |
void | setAutosave (const uint32 autosave) |
int | getLen (void) const |
template<typename _Tp > | |
ito::RetVal | setVal (_Tp val) |
template<typename _Tp > | |
ito::RetVal | setVal (_Tp val, int len) |
template<typename _Tp > | |
_Tp | getVal (void) const |
template<typename _Tp > | |
_Tp | getVal (int &len) const |
Static Public Member Functions | |
static uint32 | typeFilter (uint32 type) |
Protected Member Functions | |
void | InOutCheck () |
Protected Attributes | |
uint32 | m_type |
ByteArray | m_name |
parameter name | |
Private Attributes | |
double | m_dVal |
internal value for double typed values | |
int | m_iVal |
internal value for integer typed values | |
char * | m_cVal |
internal pointer for pointer type values (also strings) |
ito::ParamBase::ParamBase | ( | const ByteArray & | name | ) |
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type | ||
) |
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type, | ||
const char * | val | ||
) |
constructor with name and type, char val and optional info
[in] | name | name of new ParamBase |
[in] | type | type of new ParamBase for possible types see Type |
[in] | val | character pointer to string pointer |
[in] | info | character pointer to string pointer holding information about this ParamBase |
creates a new ParamBase with name, type, string value. Strings are copied
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type, | ||
const double | val | ||
) |
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type, | ||
const int | val | ||
) |
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type, | ||
const unsigned int | size, | ||
const char * | values | ||
) |
array constructor with name and type, size and array
[in] | name | name of new ParamBase |
[in] | type | type of new ParamBase for possible types see Type |
[in] | size | array size |
[in] | val | values |
creates a new ParamBase (array) with name, type, size and values.
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type, | ||
const unsigned int | size, | ||
const int * | values | ||
) |
array constructor with name and type, size and array
[in] | name | name of new ParamBase |
[in] | type | type of new ParamBase for possible types see Type |
[in] | size | array size |
[in] | val | values |
creates a new ParamBase (array) with name, type, size and values.
ito::ParamBase::ParamBase | ( | const ByteArray & | name, |
const uint32 | type, | ||
const unsigned int | size, | ||
const double * | values | ||
) |
array constructor with name and type, size and array
[in] | name | name of new ParamBase |
[in] | type | type of new ParamBase for possible types see Type |
[in] | size | array size |
[in] | val | values |
creates a new ParamBase (array) with name, type, size and values.
ito::ParamBase::~ParamBase | ( | ) | [virtual] |
destructor
clear (frees) the name and in case a string value.
ito::ParamBase::ParamBase | ( | const ParamBase & | copyConstr | ) |
uint32 ito::ParamBase::getAutosave | ( | void | ) | const [inline] |
returns content of autosave flag - this flag determines whether the parameter value gets automagically saved to xml file when an instance of a plugin class is deleted (closed)
_Tp ito::ParamBase::getVal | ( | void | ) | const [inline] |
getVal read parameter value - templated version
returns the actual parameter value casted to the template parameter type. If the tParam has a non numeric type the largest value for the template type is passed.
_Tp ito::ParamBase::getVal | ( | int & | len | ) | const [inline] |
getVal read parameter value - templated version for arrays
[out] | len | length of array |
returns the actual parameter value casted to the template parameter type. In 'len' is returned what is supposed to be the length of the array. As only array references are used within tParam the actual size may differ.
const ParamBase ito::ParamBase::operator[] | ( | const int | num | ) | const |
braces operator for element-wise access in arrays
braces operator
[in] | num | array index for which the value should be returned |
returns the value of the index num from the array
Reimplemented in ito::Param.
void ito::ParamBase::setAutosave | ( | const uint32 | autosave | ) | [inline] |
sets content of autosave flag - this flag determines whether the parameter value gets automagically saved to xml file when an instance of a plugin class is deleted (closed)
ito::RetVal ito::ParamBase::setVal | ( | _Tp | val, |
int | len | ||
) | [inline] |
setVal set parameter value - templated version for arrays
[in] | val | value to set to |
[in] | len | length of array |
ito::RetVal ito::ParamBase::setVal | ( | _Tp | val | ) | [inline] |
setVal set parameter value - templated version
[in] | val | value to set to |