![]() |
Safir SDK Core
|
Functions for getting member information from types. More...
Functions | |
DOTS_CPP_API Dob::Typesystem::Int32 | GetNumberOfMembers (const Dob::Typesystem::TypeId typeId) |
Get the number of members for a class or property. | |
DOTS_CPP_API Dob::Typesystem::MemberIndex | GetIndex (const Dob::Typesystem::TypeId typeId, const std::wstring &memberName) |
Get the member index of a named member. | |
DOTS_CPP_API std::wstring | GetName (const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member) |
Get the name of the specified member as it was defined in the xml description. | |
DOTS_CPP_API std::wstring | GetTypeName (const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member) |
Get the type name of the specified member as it was defined in the xml description. | |
DOTS_CPP_API Dob::Typesystem::TypeId | GetTypeId (const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member) |
Get type id of object or enumeration member. | |
DOTS_CPP_API void | GetInfo (const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member, Dob::Typesystem::MemberType &memberType, Dob::Typesystem::MemberType &keyType, const char *&memberName, Dob::Typesystem::TypeId &memberTypeId, Dob::Typesystem::TypeId &keyTypeId, Dob::Typesystem::Int32 &stringLength, Dob::Typesystem::CollectionType &collectionType, Dob::Typesystem::Int32 &arrayLength) |
Get information about a specific class member. | |
DOTS_CPP_API Dob::Typesystem::Int32 | GetArraySize (const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member) |
Get the array size of a member. | |
DOTS_CPP_API Dob::Typesystem::Int32 | GetMaxStringLength (const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member) |
Get the maximum string length of a member. | |
Functions for getting member information from types.
With these operations you can get information on types regarding their members. You can get member names and indexes. You can get TypeIds of members etc.
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Members::GetArraySize | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::MemberIndex | member ) |
Get the array size of a member.
typeId | [in] - TypeId of class. |
member | [in] - Index of member. |
IllegalValueException | There is no such class defined or there is no such member in the type. |
DOTS_CPP_API Dob::Typesystem::MemberIndex Safir::Dob::Typesystem::Members::GetIndex | ( | const Dob::Typesystem::TypeId | typeId, |
const std::wstring & | memberName ) |
Get the member index of a named member.
typeId | [in] - TypeId of class or property. |
memberName | [in] - name of member as specified in xml description, case sensitive. |
IllegalValueException | There is no such type defined or there is no such member in the type. |
DOTS_CPP_API void Safir::Dob::Typesystem::Members::GetInfo | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::MemberIndex | member, | ||
Dob::Typesystem::MemberType & | memberType, | ||
Dob::Typesystem::MemberType & | keyType, | ||
const char *& | memberName, | ||
Dob::Typesystem::TypeId & | memberTypeId, | ||
Dob::Typesystem::TypeId & | keyTypeId, | ||
Dob::Typesystem::Int32 & | stringLength, | ||
Dob::Typesystem::CollectionType & | collectionType, | ||
Dob::Typesystem::Int32 & | arrayLength ) |
Get information about a specific class member.
typeId | [in] - TypeId of class or property. |
member | [in] - Index of member. |
memberType | [out] - The type of the member. |
keyType | [out] - The type of the key if the member is a dictionary, otherwise undefined. |
memberName | [out] - The name of the member. |
memberTypeId | [out] - if memberType is object or enumeration, this is the typeId of that type. If memberType is something else the value is -1. |
keyTypeId | [out] - if the member is a dictionary and the key type is an enumeration this is the type id of the enumeration. Otherwise undefined. If memberType is something else the value is -1. |
stringLength | [out] - If memberType is string and the type is a class (not property) then this is the length of the string. |
collectionType | [out] - The member collection type, can be single value, array, sequence or dictionary. |
arrayLength | [out] - Maximum capacity of array if the member collection type is an array (1 if not an array). Not applicable if type id is a property. |
IllegalValueException | There is no such type defined or there is no such member in the type. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Members::GetMaxStringLength | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::MemberIndex | member ) |
Get the maximum string length of a member.
typeId | [in] - TypeId of class. |
member | [in] - Index of member. |
IllegalValueException | There is no such class defined or there is no such member in the type or the member is not a string. |
DOTS_CPP_API std::wstring Safir::Dob::Typesystem::Members::GetName | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::MemberIndex | member ) |
Get the name of the specified member as it was defined in the xml description.
typeId | [in] - TypeId of class or property. |
member | [in] - Index of member. |
IllegalValueException | There is no such type defined or there is no such member in the type. |
DOTS_CPP_API Dob::Typesystem::Int32 Safir::Dob::Typesystem::Members::GetNumberOfMembers | ( | const Dob::Typesystem::TypeId | typeId | ) |
Get the number of members for a class or property.
Parameters are not included.
typeId | [in] - TypeId of class or property. |
IllegalValueException | There is no such type defined. |
DOTS_CPP_API Dob::Typesystem::TypeId Safir::Dob::Typesystem::Members::GetTypeId | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::MemberIndex | member ) |
Get type id of object or enumeration member.
If a member is of type object or enumeration, this method can be used to get the typeId for the class or enum that the member is of.
typeId | [in] - TypeId of class or property. |
member | [in] - Index of member. |
IllegalValueException | There is no such type defined or there is no such member in the type or the member is not an enum or object. |
DOTS_CPP_API std::wstring Safir::Dob::Typesystem::Members::GetTypeName | ( | const Dob::Typesystem::TypeId | typeId, |
const Dob::Typesystem::MemberIndex | member ) |
Get the type name of the specified member as it was defined in the xml description.
typeId | [in] - TypeId of class or property. |
member | [in] - Index of member. |
IllegalValueException | There is no such type defined or there is no such member in the type. |