![]() |
Safir SDK Core
|
Functions for getting property information from types and objects. More...
#include <Safir/Dob/Typesystem/Properties.h>
Static Public Member Functions | |
static Dob::Typesystem::PropertyMappingKind | GetMappingKind (const Dob::Typesystem::TypeId classId, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex propertyMember) |
Get the information of how a property member is mapped for a class. | |
static Dob::Typesystem::Int32 | GetArraySize (const Dob::Typesystem::TypeId classId, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex propertyMember) |
Get the array size of a property member. | |
static void | SetNull (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a property member to null. | |
static bool | IsNull (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Is the property member null. | |
static bool | IsChanged (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Is the property member changed. | |
static bool | IsReadOnly (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Is the property member read-only. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const bool value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a boolean property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, bool &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a boolean property member from the object using a property. | |
static void | SetEnum (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::EnumerationValue value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set an enumeration property member in the object using a property. | |
static void | GetEnum (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::EnumerationValue &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get an enumeration property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::Int32 value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set an Int32 property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::Int32 &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get an Int32 property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::Int64 value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set an Int64 property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::Int64 &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get an Int64 property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::Float32 value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a Float32 property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::Float32 &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a Float32 property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::Float64 value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a Float64 property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::Float64 &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a Float64 property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const InstanceId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set an InstanceId property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, InstanceId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get an InstanceId property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::EntityId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set an EntityId property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::EntityId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get an EntityId property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const ChannelId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a ChannelId property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, ChannelId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a ChannelId property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const HandlerId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a HandlerId property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, HandlerId &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a HandlerId property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const std::wstring &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a string property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, std::wstring &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a string property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::ObjectPtr ptr, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set an object property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::ObjectPtr &ptr, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get an object property member from the object using a property. | |
static void | Set (Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::Binary &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Set a binary property member in the object using a property. | |
static void | Get (const Dob::Typesystem::ObjectPtr object, const Dob::Typesystem::TypeId propertyId, Dob::Typesystem::Binary &value, const Dob::Typesystem::MemberIndex member, const Dob::Typesystem::ArrayIndex index) |
Get a binary property member from the object using a property. | |
static void | GetParameterReference (const Dob::Typesystem::TypeId classId, const Dob::Typesystem::TypeId propertyId, const Dob::Typesystem::MemberIndex propertyMember, const Dob::Typesystem::ArrayIndex propertyIndex, Dob::Typesystem::TypeId ¶meterTypeId, Dob::Typesystem::ParameterIndex ¶meterIndex, Dob::Typesystem::ArrayIndex ¶meterArrayIndex) |
Get information needed to read the value of a property that is mapped to a parameter without the need of an ObjectPtr. | |
Functions for getting property information from types and objects.
With these operations you can get and set members on objects using properties. If you need member information (names, typeids etc) from a property, use the functions in Members. (For array sizes, use the method in this class though...).
|
static |
Get a boolean property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get a ChannelId property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get a binary property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get an EntityId property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get a Float32 property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get a Float64 property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get an Int32 property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get an Int64 property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get an object property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
ptr | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get a HandlerId property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get an InstanceId property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get a string property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get the array size of a property member.
classId | [in] - Type id of a class that supports the specified property. |
propertyId | [in] - Type id of the property. |
propertyMember | [in] - Index of the property member. |
IllegalValueException | There is no such type or member defined. |
|
static |
Get an enumeration property member from the object using a property.
object | [in] - The object to read from. |
propertyId | [in] - TypeId of the property to use. |
value | [out] - The value of the member. |
member | [in] - Index of the property member to read from. |
index | [in] - Array index. |
ReadOnlyException | The member is inaccessible. Some "parent" item is null. |
NullException | The member is null. |
|
static |
Get the information of how a property member is mapped for a class.
classId | [in] - Type id of a class that supports the specified property. |
propertyId | [in] - Type id of the property |
propertyMember | [in] - Index of the property member. |
IllegalValueException | If no mapping exists. |
|
static |
Get information needed to read the value of a property that is mapped to a parameter without the need of an ObjectPtr.
This method is only allowed to be called if mappingKind is 'MappedToParameter'.
classId | [in] - Type id of a class that supports the specified property. |
propertyId | [in] - Type id of the property. |
propertyMember | [in] - Index of the property member. |
propertyIndex | [in] - Array index of the property. |
parameterTypeId | [out] - Mapped parameter type id. |
parameterIndex | [out] - Mapped parameter member index. |
parameterArrayIndex | [out] - Mapped parameter array index. |
IllegalValueException | If no mapping exists or not mapped to a parameter. |
|
static |
Is the property member changed.
object | [in] - The object to check inside. |
propertyId | [in] - TypeId of the property to use. |
member | [in] - Index of the property member. |
index | [in] - Array index. |
|
static |
Is the property member null.
object | [in] - The object to check inside. |
propertyId | [in] - TypeId of the property to use. |
member | [in] - Index of the property member. |
index | [in] - Array index. |
|
static |
Is the property member read-only.
A property member is read-only if it
object | [in] - The object to check inside. |
propertyId | [in] - TypeId of the property to use. |
member | [in] - Index of the property member. |
index | [in] - Array index. |
|
static |
Set a boolean property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a ChannelId property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a binary property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The binary data to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set an EntityId property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a Float32 property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a Float64 property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set an Int32 property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set an Int64 property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set an object property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
ptr | [in] - The object to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a HandlerId property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set an InstanceId property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a string property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set an enumeration property member in the object using a property.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
value | [in] - The value to set the member to. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |
|
static |
Set a property member to null.
object | [in,out] - The object to modify. |
propertyId | [in] - TypeId of the property to use. |
member | [in] - Index of the property member to modify. |
index | [in] - Array index. |
ReadOnlyException | If the property member is read-only. |