Safir SDK Core
Loading...
Searching...
No Matches
Safir::Dob::Typesystem::ToolSupport::ParameterDescription Class Referenceabstract

Description of a parameter. More...

#include <Safir/Dob/Typesystem/ToolSupport/TypeRepository.h>

Public Member Functions

virtual ~ParameterDescription ()=default
 Destructor.
 
virtual const char * Summary () const =0
 Get a summary about this parameter.
 
virtual const char * GetName () const =0
 Get the name of the parameter.
 
virtual DotsC_TypeId GetClassTypeId () const =0
 Get the TypeId of the class that the parameter belongs to.
 
virtual const char * GetQualifiedName () const =0
 Get fully qualified parameter name.
 
virtual DotsC_MemberType GetMemberType () const =0
 Get member type of this parameter value.
 
virtual DotsC_TypeId GetTypeId () const =0
 If this parameter has MemberType Enumeration or Object, the specific typeId of that type can be retrieved by this method.
 
virtual DotsC_CollectionType GetCollectionType () const =0
 Get the collection type of this parameter.
 
virtual DotsC_MemberType GetKeyType () const =0
 Get key type of this parameter.
 
virtual DotsC_TypeId GetKeyTypeId () const =0
 If this parameter has CollectionType Dictionary and KeyType Enumeration, the specific typeId of that enumeration can be retrieved by this method.
 
virtual int GetNumberOfValues () const =0
 Get the number of values this parameter holds.
 
virtual bool IsHidden () const =0
 Check if this is a normal parameter defined explicitly in a dou-file or if it is a special hidden parameter that has been automatically generated.
 
virtual DotsC_Int32 GetInt32Value (int index) const =0
 Get int32 parameter value.
 
virtual DotsC_Int64 GetInt64Value (int index) const =0
 Get int64 parameter value.
 
virtual DotsC_Float32 GetFloat32Value (int index) const =0
 Get float32 parameter value.
 
virtual DotsC_Float64 GetFloat64Value (int index) const =0
 Get float64 parameter value.
 
virtual bool GetBoolValue (int index) const =0
 Get bool parameter value.
 
virtual const char * GetStringValue (int index) const =0
 Get string parameter value.
 
virtual std::pair< const char *, DotsC_Int32 > GetObjectValue (int index) const =0
 Get object parameter value.
 
virtual std::pair< const char *, DotsC_Int32 > GetBinaryValue (int index) const =0
 Get binary parameter value.
 
virtual std::pair< DotsC_Int64, const char * > GetHashedValue (int index) const =0
 Get hashed parameter value.
 
virtual DotsC_Int32 GetInt32Key (int index) const =0
 Get int32 or enum key.
 
virtual DotsC_Int64 GetInt64Key (int index) const =0
 Get int64 or typeId key.
 
virtual const char * GetStringKey (int index) const =0
 Get string key.
 
virtual std::pair< DotsC_Int64, const char * > GetHashedKey (int index) const =0
 Get hashed key.
 
virtual int GetIndexByUnifiedKey (DotsC_Int64 unifiedKey) const =0
 GetIndexByUnifiedKey - Get corresponding index to a dictionary key.
 
virtual const std::map< DotsC_Int64, int > & UnifiedKeyToIndexMap () const =0
 UnifiedKeyToIndexMap - FOR INTERNAL USAGE ONLY.
 

Detailed Description

Description of a parameter.

Constructor & Destructor Documentation

◆ ~ParameterDescription()

virtual Safir::Dob::Typesystem::ToolSupport::ParameterDescription::~ParameterDescription ( )
virtualdefault

Destructor.

Member Function Documentation

◆ GetBinaryValue()

virtual std::pair< const char *, DotsC_Int32 > Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetBinaryValue ( int index) const
pure virtual

Get binary parameter value.

Only valid if MemberType is Binary.

Parameters
index[in] - Parameter index.
Returns
Parameter value as a pair containing a binary and a binary size.

◆ GetBoolValue()

virtual bool Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetBoolValue ( int index) const
pure virtual

Get bool parameter value.

Only valid if MemberType is Boolean.

Parameters
index[in] - Parameter index.
Returns
Parameter value.

◆ GetClassTypeId()

virtual DotsC_TypeId Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetClassTypeId ( ) const
pure virtual

Get the TypeId of the class that the parameter belongs to.

Returns
TypeId of owner class.

◆ GetCollectionType()

virtual DotsC_CollectionType Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetCollectionType ( ) const
pure virtual

Get the collection type of this parameter.

Returns
Collection type.

◆ GetFloat32Value()

virtual DotsC_Float32 Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetFloat32Value ( int index) const
pure virtual

Get float32 parameter value.

Only valid if MemberType is Float32 or any Si32 type.

Parameters
index[in] - Parameter index.
Returns
Parameter value.

◆ GetFloat64Value()

virtual DotsC_Float64 Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetFloat64Value ( int index) const
pure virtual

Get float64 parameter value.

Only valid if MemberType is Float64 or any Si64 type.

Parameters
index[in] - Parameter index.
Returns
Parameter value.

◆ GetHashedKey()

virtual std::pair< DotsC_Int64, const char * > Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetHashedKey ( int index) const
pure virtual

Get hashed key.

Only valid if memer is DictionaryCollectionType and has keyType InstanceId, ChannelId, HandlerId

Parameters
index[in] - Parameter index.
Returns
Parameter key as a pair containing a hash and optionally a string that can be NULL.

◆ GetHashedValue()

virtual std::pair< DotsC_Int64, const char * > Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetHashedValue ( int index) const
pure virtual

Get hashed parameter value.

Only valid if MemberType is InstanceId, ChannelId, HandlerId

Parameters
index[in] - Parameter index.
Returns
Parameter value as a pair containing a hash value and optionally a string that can be NULL.

◆ GetIndexByUnifiedKey()

virtual int Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetIndexByUnifiedKey ( DotsC_Int64 unifiedKey) const
pure virtual

GetIndexByUnifiedKey - Get corresponding index to a dictionary key.

Only applicable when collectionType is Dictionary.

Parameters
unifiedKey[in] - Dictionary key on unified format. See TypeUtilities::ToUnifiedDictionaryKey for conversion.
Returns
Index of the parameter key/val. If key does not exist -1 is returned.

◆ GetInt32Key()

virtual DotsC_Int32 Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetInt32Key ( int index) const
pure virtual

Get int32 or enum key.

Only valid if memer is DictionaryCollectionType and has keyType Int32MemberType or EnumerationMemberType.

Parameters
index[in] - Parameter index.
Returns
Parameter key for specified dictionary entry.

◆ GetInt32Value()

virtual DotsC_Int32 Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetInt32Value ( int index) const
pure virtual

Get int32 parameter value.

Only valid if MemberType is Int32.

Parameters
index[in] - Parameter index.
Returns
Parameter value.

◆ GetInt64Key()

virtual DotsC_Int64 Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetInt64Key ( int index) const
pure virtual

Get int64 or typeId key.

Only valid if memer is DictionaryCollectionType and has keyType Int64MemberType or TypeIdMemberType.

Parameters
index[in] - Parameter index.
Returns
Parameter key for specified dictionary entry.

◆ GetInt64Value()

virtual DotsC_Int64 Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetInt64Value ( int index) const
pure virtual

Get int64 parameter value.

Only valid if MemberType is Int64 or TypeId

Parameters
index[in] - Parameter index.
Returns
Parameter value.

◆ GetKeyType()

virtual DotsC_MemberType Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetKeyType ( ) const
pure virtual

Get key type of this parameter.

Only valid if CollectionType=DictionaryCollectionType, use GetCollectionType() method.

Returns
Key member type.

◆ GetKeyTypeId()

virtual DotsC_TypeId Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetKeyTypeId ( ) const
pure virtual

If this parameter has CollectionType Dictionary and KeyType Enumeration, the specific typeId of that enumeration can be retrieved by this method.

If KeyType is not Enum the result of this method is undefined. Hence always use this in conjunction with GetKeyType().

Returns
TypeId of the enumeration type that is key type for this dictionary parameter.

◆ GetMemberType()

virtual DotsC_MemberType Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetMemberType ( ) const
pure virtual

Get member type of this parameter value.

If member type is Enumeration or Object, use GetTypeId() to determine specific type.

Returns
Parameter value member type.

◆ GetName()

virtual const char * Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetName ( ) const
pure virtual

Get the name of the parameter.

Not including namespaces and class name.

Returns
Parameter name.

◆ GetNumberOfValues()

virtual int Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetNumberOfValues ( ) const
pure virtual

Get the number of values this parameter holds.

If collectionType is SingelValueCollectionType 1 is returned.

Returns
Number of values.

◆ GetObjectValue()

virtual std::pair< const char *, DotsC_Int32 > Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetObjectValue ( int index) const
pure virtual

Get object parameter value.

Only valid if MemberType is Object.

Parameters
index[in] - Parameter index.
Returns
Parameter value as a pair containing a blob and a blob size.

◆ GetQualifiedName()

virtual const char * Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetQualifiedName ( ) const
pure virtual

Get fully qualified parameter name.

Example: MyNamespace.MyClass.MyParameter

Returns
Qualified parameter name.

◆ GetStringKey()

virtual const char * Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetStringKey ( int index) const
pure virtual

Get string key.

Only valid if memer is DictionaryCollectionType and has keyType StringMemberType.

Parameters
index[in] - Parameter index.
Returns
Parameter key for specified dictionary entry.

◆ GetStringValue()

virtual const char * Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetStringValue ( int index) const
pure virtual

Get string parameter value.

Only valid if MemberType is String.

Parameters
index[in] - Parameter index.
Returns
Parameter value.

◆ GetTypeId()

virtual DotsC_TypeId Safir::Dob::Typesystem::ToolSupport::ParameterDescription::GetTypeId ( ) const
pure virtual

If this parameter has MemberType Enumeration or Object, the specific typeId of that type can be retrieved by this method.

If MemberType is not Enum or Object the result of this method is undefined. Hence always use this in conjunction with GetMemberType().

Returns
TypeId of this parameter. Must always be a class or enumeration typeId.

◆ IsHidden()

virtual bool Safir::Dob::Typesystem::ToolSupport::ParameterDescription::IsHidden ( ) const
pure virtual

Check if this is a normal parameter defined explicitly in a dou-file or if it is a special hidden parameter that has been automatically generated.

Returns
False if parameter is a normal parameter. True if parameter is a hidden autmatically generated parameter.

◆ Summary()

virtual const char * Safir::Dob::Typesystem::ToolSupport::ParameterDescription::Summary ( ) const
pure virtual

Get a summary about this parameter.

Returns
Summary.

◆ UnifiedKeyToIndexMap()

virtual const std::map< DotsC_Int64, int > & Safir::Dob::Typesystem::ToolSupport::ParameterDescription::UnifiedKeyToIndexMap ( ) const
pure virtual

UnifiedKeyToIndexMap - FOR INTERNAL USAGE ONLY.

Only needed by dots_kernel when copying localRepo to sharem memory. A dummy implementation should do if the repository is not going to be copied by dots_kernel. Normal usage should use GetIndexByUnifiedKey.

Returns
Map from unified key to index.