Raytrix Light Field SDK  5.0
Rx::LFR::CParameters< TEnum > Class Template Reference

Detailed Description

template<class TEnum>
class Rx::LFR::CParameters< TEnum >

A base of all classes that need to get or set parameters.

Template Parameters
TPimplPIMPL.
TEnumThe enum type that describes the parameter ID.

Inherits Rx::LFR::CPimpl< CParameters_Impl< TEnum >, Interfaces::EParameters::ID >.

Public Member Functions

 CParameters (CParameters_Impl< TEnum > *pxImpl, bool bFreeOnDelete=true)
 Constructor. Only for internal purposes. More...
 
 ~CParameters ()
 Protected destructor. More...
 
void ExportParameterToFile (const CRxString &sxFilename) const
 Exports all exportable parameter to file. More...
 
void ExportParameterToString (CRxString &sxXmlString) const
 Exports all exportable parameter to the given string by calling GetValue for each parameter. More...
 
void GetDefinition (TEnum eID, CRxString &sxName, CRxString &sxGUID) const
 Gets some parts of the parameter definition. More...
 
void GetDefinition (TEnum eID, CRxString &sxName, CRxString &sxGUID, bool &bReadable, bool &bWritable, EValueType::ID &eType) const
 Gets some parts of the parameter definition. More...
 
CParameters_Impl< TEnum > & GetImpl ()
 Gets the non constant implementation. More...
 
const CParameters_Impl< TEnum > & GetImpl () const
 Gets the constant implementation. More...
 
void * GetInterface (Interfaces::EParameters::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
TInterface * GetInterface (Interfaces::EParameters::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const void * GetInterface (Interfaces::EParameters::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
const TInterface * GetInterface (Interfaces::EParameters::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
void GetValue (TEnum eID, CRxArrayDouble &adValue) const
 Gets the value of the given parameter. More...
 
void GetValue (TEnum eID, CRxArrayString &asValue) const
 Gets the value of the given parameter. More...
 
void GetValue (TEnum eID, CRxArrayUInt &auValue) const
 Gets the value of the given parameter. More...
 
void GetValue (TEnum eID, CRxString &sxValue) const
 Gets the value of the given parameter. More...
 
void GetValue (TEnum eID, double &dValue) const
 Gets the value of the given parameter. More...
 
void GetValue (TEnum eID, unsigned &uValue) const
 Gets the value of the given parameter. More...
 
void GetValueRange (TEnum eID, double &dMin, double &dMax) const
 Gets the valid range of the value that can be set to the given non-array parameter. More...
 
void GetValueRange (TEnum eID, size_t &nArrayLenMin, size_t &nArrayLenMax, double &dMin, double &dMax) const
 Gets the valid range of the value that can be set to the given array parameter. More...
 
void GetValueRange (TEnum eID, size_t &nArrayLenMin, size_t &nArrayLenMax, unsigned &uMin, unsigned &uMax) const
 Gets the valid range of the value that can be set to the given array parameter. More...
 
void GetValueRange (TEnum eID, unsigned &uMin, unsigned &uMax) const
 Gets the valid range of the value that can be set to the given non-array parameter. More...
 
bool HasInterface (Interfaces::EParameters::ID eInterface)
 Queries if this object has the given interface. More...
 
void ImportFromMetaData (const CRxMetaData &xMetaData)
 Imports the parameter stored in the given meta data and applies each by calling SetValue. More...
 
void ImportParameterFromFile (const CRxString &sxFilename)
 Imports the parameter stored in the given file and applies each by calling SetValue. More...
 
void ImportParameterFromString (const CRxString &sxXmlString)
 Imports the parameter stored in the given XML string and applies each by calling SetValue. More...
 
bool IsValueValid (TEnum eID, const CRxArrayDouble &adValue) const
 Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints. More...
 
bool IsValueValid (TEnum eID, const CRxArrayString &asValue) const
 Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints. More...
 
bool IsValueValid (TEnum eID, const CRxArrayUInt &auValue) const
 Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints. More...
 
bool IsValueValid (TEnum eID, const CRxString &sxValue) const
 Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints. More...
 
bool IsValueValid (TEnum eID, double dValue) const
 Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints. More...
 
bool IsValueValid (TEnum eID, unsigned uValue) const
 Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints. More...
 
void Reset (bool bResetToInitial=false)
 Sets all parameters to their initial or their default value. More...
 
void Reset (TEnum eID, bool bResetToInitial=false)
 Sets the parameter described by the given parameter ID to its initial or its default value. More...
 
void SetValue (TEnum eID, const CRxArrayDouble &adValue)
 Sets the value of the given parameter. More...
 
void SetValue (TEnum eID, const CRxArrayString &asValue)
 Sets the value of the given parameter. More...
 
void SetValue (TEnum eID, const CRxArrayUInt &auValue)
 Sets the value of the given parameter. More...
 
void SetValue (TEnum eID, const CRxString &sxValue)
 Sets the value of the given parameter. More...
 
void SetValue (TEnum eID, double dValue)
 Sets the value of the given parameter. More...
 
void SetValue (TEnum eID, unsigned uValue)
 Sets the value of the given parameter. More...
 

Static Public Member Functions

static const char * GetParamterGroupName (Params::EGroup::ID eGroup)
 Gets the name of the given group ID. More...
 

Constructor & Destructor Documentation

◆ CParameters()

template<class TEnum >
Rx::LFR::CParameters< TEnum >::CParameters ( CParameters_Impl< TEnum > *  pxImpl,
bool  bFreeOnDelete = true 
)

Constructor. Only for internal purposes.

Parameters
pxImplThe implementation class.
bFreeOnDelete(Optional) True to free the memory of the given implementation class on deleting this object.

◆ ~CParameters()

template<class TEnum >
Rx::LFR::CParameters< TEnum >::~CParameters ( )
inline

Protected destructor.

Member Function Documentation

◆ ExportParameterToFile()

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::ExportParameterToFile ( const CRxString sxFilename) const

Exports all exportable parameter to file.

Parameters
sxFilename[in] The file name.

◆ ExportParameterToString()

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::ExportParameterToString ( CRxString sxXmlString) const

Exports all exportable parameter to the given string by calling GetValue for each parameter.

Parameters
sxXmlString[out] The XML string.

◆ GetDefinition() [1/2]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetDefinition ( TEnum  eID,
CRxString sxName,
CRxString sxGUID 
) const

Gets some parts of the parameter definition.

Parameters
eID[in] The parameter ID.
sxName[out] The parameter name.
sxGUID[out] The GUID of the parameter.

◆ GetDefinition() [2/2]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetDefinition ( TEnum  eID,
CRxString sxName,
CRxString sxGUID,
bool &  bReadable,
bool &  bWritable,
EValueType::ID eType 
) const

Gets some parts of the parameter definition.

Parameters
eID[in] The parameter ID.
sxName[out] The parameter name.
sxGUID[out] The GUID of the parameter.
bReadable[out] True if the parameter is readable.
bWritable[out] True if the parameter is writable.
eType[out] The data type of the parameter.

◆ GetImpl() [1/2]

CParameters_Impl< TEnum > & Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::GetImpl
inlineinherited

Gets the non constant implementation.

Returns
The implementation.

◆ GetImpl() [2/2]

const CParameters_Impl< TEnum > & Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::GetImpl
inlineinherited

Gets the constant implementation.

Returns
The implementation.

◆ GetInterface() [1/4]

void* Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::GetInterface ( Interfaces::EParameters::ID  eInterface)
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [2/4]

TInterface* Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::GetInterface ( Interfaces::EParameters::ID  eInterface)
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterface[in] The interface type.
Parameters
eInterface[in] The interface.
Returns
Null if it fails, else the interface.

◆ GetInterface() [3/4]

const void* Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::GetInterface ( Interfaces::EParameters::ID  eInterface) const
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [4/4]

const TInterface* Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::GetInterface ( Interfaces::EParameters::ID  eInterface) const
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterface[in] The interface type.
Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetParamterGroupName()

template<class TEnum >
static const char* Rx::LFR::CParameters< TEnum >::GetParamterGroupName ( Params::EGroup::ID  eGroup)
static

Gets the name of the given group ID.

Parameters
eGroup[in] The group ID.
Returns
Empty string if the name is missing, else the group name.

◆ GetValue() [1/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValue ( TEnum  eID,
CRxArrayDouble adValue 
) const

Gets the value of the given parameter.

Parameters
eID[in] The parameter ID.
adValue[out] The value.

◆ GetValue() [2/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValue ( TEnum  eID,
CRxArrayString asValue 
) const

Gets the value of the given parameter.

Parameters
eID[in] The parameter ID.
asValue[out] The value.

◆ GetValue() [3/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValue ( TEnum  eID,
CRxArrayUInt auValue 
) const

Gets the value of the given parameter.

Parameters
eID[in] The parameter ID.
auValue[out] The value.

◆ GetValue() [4/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValue ( TEnum  eID,
CRxString sxValue 
) const

Gets the value of the given parameter.

Parameters
eID[in] The parameter ID.
sxValue[out] The value.

◆ GetValue() [5/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValue ( TEnum  eID,
double &  dValue 
) const

Gets the value of the given parameter.

Parameters
eID[in] The parameter ID.
dValue[out] The value.

◆ GetValue() [6/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValue ( TEnum  eID,
unsigned &  uValue 
) const

Gets the value of the given parameter.

Parameters
eID[in] The parameter ID.
uValue[out] The value.

◆ GetValueRange() [1/4]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValueRange ( TEnum  eID,
double &  dMin,
double &  dMax 
) const

Gets the valid range of the value that can be set to the given non-array parameter.

Parameters
eID[in] The parameter ID.
dMin[out] The minimum value.
dMax[out] The maximum value.

◆ GetValueRange() [2/4]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValueRange ( TEnum  eID,
size_t &  nArrayLenMin,
size_t &  nArrayLenMax,
double &  dMin,
double &  dMax 
) const

Gets the valid range of the value that can be set to the given array parameter.

Parameters
eID[in] The parameter ID.
nArrayLenMin[out] The minimum array length.
nArrayLenMax[out] The maximum array length.
dMin[out] The minimum value of each array element.
dMax[out] The maximum value of each array element.

◆ GetValueRange() [3/4]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValueRange ( TEnum  eID,
size_t &  nArrayLenMin,
size_t &  nArrayLenMax,
unsigned &  uMin,
unsigned &  uMax 
) const

Gets the valid range of the value that can be set to the given array parameter.

Parameters
eID[in] The parameter ID.
nArrayLenMin[out] The minimum array length.
nArrayLenMax[out] The maximum array length.
uMin[out] The minimum value of each array element.
uMax[out] The maximum value of each array element.

◆ GetValueRange() [4/4]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::GetValueRange ( TEnum  eID,
unsigned &  uMin,
unsigned &  uMax 
) const

Gets the valid range of the value that can be set to the given non-array parameter.

Parameters
eIDThe parameter ID.
uMin[out] The minimum value.
uMax[out] The maximum value.

◆ HasInterface()

bool Rx::LFR::CPimpl< CParameters_Impl< TEnum > , Interfaces::EParameters::ID >::HasInterface ( Interfaces::EParameters::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterface[in] The interface to query.
Returns
True if this class has the given interface, false if not.

◆ ImportFromMetaData()

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::ImportFromMetaData ( const CRxMetaData xMetaData)

Imports the parameter stored in the given meta data and applies each by calling SetValue.

Parameters
xMetaData[in] The meta data.

◆ ImportParameterFromFile()

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::ImportParameterFromFile ( const CRxString sxFilename)

Imports the parameter stored in the given file and applies each by calling SetValue.

Parameters
sxFilename[in] The file name.

◆ ImportParameterFromString()

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::ImportParameterFromString ( const CRxString sxXmlString)

Imports the parameter stored in the given XML string and applies each by calling SetValue.

Parameters
sxXmlString[in] The XML string.

◆ IsValueValid() [1/6]

template<class TEnum >
bool Rx::LFR::CParameters< TEnum >::IsValueValid ( TEnum  eID,
const CRxArrayDouble adValue 
) const

Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints.

Parameters
eID[in] The parameter ID.
adValue[in] The value.
Returns
True if the value is valid, false if not.

◆ IsValueValid() [2/6]

template<class TEnum >
bool Rx::LFR::CParameters< TEnum >::IsValueValid ( TEnum  eID,
const CRxArrayString asValue 
) const

Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints.

Parameters
eID[in] The parameter ID.
asValue[in] The value.
Returns
True if the value is valid, false if not.

◆ IsValueValid() [3/6]

template<class TEnum >
bool Rx::LFR::CParameters< TEnum >::IsValueValid ( TEnum  eID,
const CRxArrayUInt auValue 
) const

Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints.

Parameters
eID[in] The parameter ID.
auValue[in] The value.
Returns
True if the value is valid, false if not.

◆ IsValueValid() [4/6]

template<class TEnum >
bool Rx::LFR::CParameters< TEnum >::IsValueValid ( TEnum  eID,
const CRxString sxValue 
) const

Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints.

Parameters
eID[in] The parameter ID.
sxValue[in] The value.
Returns
True if the value is valid, false if not.

◆ IsValueValid() [5/6]

template<class TEnum >
bool Rx::LFR::CParameters< TEnum >::IsValueValid ( TEnum  eID,
double  dValue 
) const

Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints.

Parameters
eID[in] The parameter ID.
dValue[in] The value.
Returns
True if the value is valid, false if not.

◆ IsValueValid() [6/6]

template<class TEnum >
bool Rx::LFR::CParameters< TEnum >::IsValueValid ( TEnum  eID,
unsigned  uValue 
) const

Queries if the given value is a valid value for the given parameter ID. This tests the data type and possible constraints.

Parameters
eID[in] The parameter ID.
uValue[in] The value.
Returns
True if the value is valid, false if not.

◆ Reset() [1/2]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::Reset ( bool  bResetToInitial = false)

Sets all parameters to their initial or their default value.

Parameters
bResetToInitial(Optional) [in] True to reset to initial, false to reset to default.

◆ Reset() [2/2]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::Reset ( TEnum  eID,
bool  bResetToInitial = false 
)

Sets the parameter described by the given parameter ID to its initial or its default value.

Parameters
eID[in] The parameter ID.
bResetToInitial(Optional) [in] True to reset to initial, false to reset to default.

◆ SetValue() [1/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::SetValue ( TEnum  eID,
const CRxArrayDouble adValue 
)

Sets the value of the given parameter.

Parameters
eID[in] The parameter ID.
adValue[in] The value.

◆ SetValue() [2/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::SetValue ( TEnum  eID,
const CRxArrayString asValue 
)

Sets the value of the given parameter.

Parameters
eID[in] The parameter ID.
asValue[in] The value.

◆ SetValue() [3/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::SetValue ( TEnum  eID,
const CRxArrayUInt auValue 
)

Sets the value of the given parameter.

Parameters
eID[in] The parameter ID.
auValue[in] The value.

◆ SetValue() [4/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::SetValue ( TEnum  eID,
const CRxString sxValue 
)

Sets the value of the given parameter.

Parameters
eID[in] The parameter ID.
sxValue[in] The value.

◆ SetValue() [5/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::SetValue ( TEnum  eID,
double  dValue 
)

Sets the value of the given parameter.

Parameters
eID[in] The parameter ID.
dValue[in] The value.

◆ SetValue() [6/6]

template<class TEnum >
void Rx::LFR::CParameters< TEnum >::SetValue ( TEnum  eID,
unsigned  uValue 
)

Sets the value of the given parameter.

Parameters
eID[in] The parameter ID.
uValue[in] The value.