![]() |
Safir SDK Core
|
Functions for getting parameter information from types. More...
Functions for getting parameter information from types.
With these operations you can get parameter values from types. You can also get information about the parameters in a type, such as parameter names and indexes, TypeIds of parameters etc.
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ChannelId & | key ) |
Get the index of a ChannelId dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::EntityId & | key ) |
Get the index of a EntityId dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::HandlerId & | key ) |
Get the index of a HandlerId dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::InstanceId & | key ) |
Get the index of a InstanceId dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::Int32 | key ) |
Get the index of a Int32 dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::Int64 | key ) |
Get the index of a Int64 dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Int32 Safir::Dob::Typesystem::Parameters::DictionaryKeyToIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const std::wstring & | key ) |
Get the index of a string dictionary key.
The index can then be used with the Get-mehtods above to retrieve the parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
key | [in] - Dictionary key. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetArraySize | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter ) |
Get the array size of a parameter.
This function is identical to GetCollectionSize, which is the new name for this function.
If the parameter does not exist the returned value is undefined. Use GetIndex to get a valid ParameterIndex, which is guaranteed to exist.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
DOTS_CPP_API const Dob::Typesystem::Binary Safir::Dob::Typesystem::Parameters::GetBinary | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a Binary parameter value.
This method will retrieve a pointer to the binary data and the number of bytes the binary data contains.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API bool Safir::Dob::Typesystem::Parameters::GetBoolean | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a boolean parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const Dob::Typesystem::ChannelId Safir::Dob::Typesystem::Parameters::GetChannelId | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a ChannelId parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const Dob::Typesystem::ChannelId Safir::Dob::Typesystem::Parameters::GetChannelIdDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a ChannelId parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetCollectionSize | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter ) |
Get the number of elements in a collection parameter.
This function works on arrays, sequences and dictionaries.
If the parameter does not exist the returned value is undefined. Use GetIndex to get a valid ParameterIndex, which is guaranteed to exist.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
DOTS_CPP_API const Dob::Typesystem::EntityId Safir::Dob::Typesystem::Parameters::GetEntityId | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an EntityId parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const Dob::Typesystem::EntityId Safir::Dob::Typesystem::Parameters::GetEntityIdDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an EntityId parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetEnumeration | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an enumeration parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetEnumerationDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an enumeration parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API Dob::Typesystem::Float32 Safir::Dob::Typesystem::Parameters::GetFloat32 | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a Float32 parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API Dob::Typesystem::Float64 Safir::Dob::Typesystem::Parameters::GetFloat64 | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a Float64 parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const Dob::Typesystem::HandlerId Safir::Dob::Typesystem::Parameters::GetHandlerId | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a HandlerId parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const Dob::Typesystem::HandlerId Safir::Dob::Typesystem::Parameters::GetHandlerIdDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a HandlerId parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API Dob::Typesystem::ParameterIndex Safir::Dob::Typesystem::Parameters::GetIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const std::wstring & | parameterName ) |
Gets index of a named parameter.
typeId | [in] - TypeId of class. |
parameterName | [in] - Name of parameter. |
IllegalValueException | There is no such type or parameter defined. |
DOTS_CPP_API void Safir::Dob::Typesystem::Parameters::GetInfo | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
Dob::Typesystem::MemberType & | parameterType, | ||
Dob::Typesystem::MemberType & | keyType, | ||
std::wstring & | parameterName, | ||
Dob::Typesystem::TypeId & | parameterTypeId, | ||
Dob::Typesystem::TypeId & | keyTypeId, | ||
Dob::Typesystem::CollectionType & | collectionType, | ||
Dob::Typesystem::Int32 & | numberOfValues ) |
Get information about a specific parameter.
If the parameter does not exist the returned value is undefined. Use GetIndex to get a valid ParameterIndex, which is guaranteed to exist.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
parameterType | [out] - The type of the parameter. |
keyType | [out] - The type of the key if the parameter is a dictionary, otherwise undefined. |
parameterName | [out] - The name of the parameter. |
parameterTypeId | [out] - if parameterType is object or enumeration, this is the typeId of that type. If parameterType is something else the value is -1. For dictionaries this is the type of the value. |
keyTypeId | [out] - if the parameter is a dictionary and the key type is an enumeration this is the type id of the enumeration. Otherwise undefined. |
collectionType | [out] - The parameter collection type, can be single value, array, sequence or dictionary. |
numberOfValues | [out] - Number of values if the parameter has. 1 if single value. |
DOTS_CPP_API const Dob::Typesystem::InstanceId Safir::Dob::Typesystem::Parameters::GetInstanceId | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a InstanceId parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const Dob::Typesystem::InstanceId Safir::Dob::Typesystem::Parameters::GetInstanceIdDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a InstanceId parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetInt32 | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an Int32 parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetInt32DictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an Int32 parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API Dob::Typesystem::Int64 Safir::Dob::Typesystem::Parameters::GetInt64 | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an Int64 parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API Dob::Typesystem::Int64 Safir::Dob::Typesystem::Parameters::GetInt64DictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an Int64 parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API const std::wstring Safir::Dob::Typesystem::Parameters::GetName | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter ) |
Get the name of the specified parameter as it was defined in the xml description.
If the parameter does not exist the returned value is undefined. Use GetIndex to get a valid ParameterIndex, which is guaranteed to exist.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Parameters::GetNumberOfParameters | ( | const Dob::Typesystem::TypeId | typeId | ) |
Get the number of parameters defined in a class.
typeId | [in] - TypeId of class. |
IllegalValueException | There is no such type defined. |
DOTS_CPP_API const Dob::Typesystem::ObjectPtr Safir::Dob::Typesystem::Parameters::GetObject | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get an Object parameter value.
This method will return a smart pointer to a new copy of the parameter.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const std::wstring Safir::Dob::Typesystem::Parameters::GetString | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a string parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API const std::wstring Safir::Dob::Typesystem::Parameters::GetStringDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a string parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API MemberType Safir::Dob::Typesystem::Parameters::GetType | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter ) |
Get the type of a parameter.
If the parameter does not exist the returned value is undefined. Use GetIndex to get a valid ParameterIndex, which is guaranteed to exist.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
DOTS_CPP_API Dob::Typesystem::TypeId Safir::Dob::Typesystem::Parameters::GetTypeId | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a TypeId parameter value.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Array index. If parameter is not an array this shall be 0. |
DOTS_CPP_API Dob::Typesystem::TypeId Safir::Dob::Typesystem::Parameters::GetTypeIdDictionaryKey | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter, | ||
const Dob::Typesystem::ArrayIndex | index ) |
Get a TypeId parameter dictionary key.
Undefined behaviour if the parameter is not an appropriate dictionary.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |
index | [in] - Parameter dictionary index. |
DOTS_CPP_API std::wstring Safir::Dob::Typesystem::Parameters::GetTypeName | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::ParameterIndex | parameter ) |
Get the type name of the specified member as it was defined in the xml description.
typeId | [in] - TypeId of class. |
parameter | [in] - Index of parameter. |