DataDescriptionInterface Class Reference

#include <datadescription.h>

详细描述

Interface to store descriptions of objects. The DataDescription object is a cow object. It stores a compiled version of the DataDescriptionDefinitionRef for each datatype.

公共成员函数

MAXON_METHOD DataDictionary  GetInfo () const
MAXON_METHOD Result < void >  SetInfo (const DataDictionary &info)
MAXON_METHOD Int   GetEntryCount () const
MAXON_METHOD Result < BaseArray < DataDictionary > >  GetEntries () const
MAXON_METHOD Result < DataDictionary >  GetEntry (const InternedId &id) const
MAXON_METHOD Result < Bool SetEntry (const DataDictionary &props, Bool merge=false)
MAXON_METHOD Result < void >  EraseEntry (const InternedId &id)
MAXON_METHOD void  重置 ()
MAXON_METHOD Bool   IsEqual (const DataDescriptionInterface *other, EQUALITY equality) const
MAXON_METHOD COMPARERESULT   比较 (const DataDescriptionInterface *other) const
MAXON_METHOD HashInt   GetHashCode () const
MAXON_METHOD String   ToString (const FormatStatement *formatStatement=nullptr) const

静态公共成员函数

static MAXON_METHOD Result < void >  DescribeIO (const DataSerializeInterface &stream)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( DataDescriptionInterface , MAXON_REFERENCE_COPY_ON_WRITE , "net.maxon.interface.datadescription")

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( DataDescriptionInterface   ,
MAXON_REFERENCE_COPY_ON_WRITE   ,
"net.maxon.interface.datadescription"   
)
private

◆  GetInfo()

MAXON_METHOD DataDictionary GetInfo ( ) const

Returns the info dictionary.

◆  SetInfo()

MAXON_METHOD Result <void> SetInfo ( const DataDictionary &  info )

SetInfo the info dictionary of the description.

参数
[in] info Dictionary with infos.
返回
OK on success.

◆  GetEntryCount()

MAXON_METHOD Int GetEntryCount ( ) const

Returns the number of entries in the description.

◆  GetEntries()

MAXON_METHOD Result < BaseArray <DataDictionary> > GetEntries ( ) const

Returns a array with all entries.

◆  GetEntry()

MAXON_METHOD Result <DataDictionary> GetEntry ( const InternedId id ) const

Returns a specific entry with the given id.

参数
[in] id Id to find
返回
DataDictionary on success. Error if the requested attribute was not in the description-

◆  SetEntry()

MAXON_METHOD Result < Bool > SetEntry ( const DataDictionary &  props ,
Bool   merge = false  
)

SetEntry description.

参数
[in] props Properties to set. The DESCRIPTION::BASE::IDENTIFIER will be used as key for the hashmap.
[in] merge True if the container should be merged with the existing props im the description. The given props will have priority over the existing.
返回
true if properties has been changed.

◆  EraseEntry()

MAXON_METHOD Result <void> EraseEntry ( const InternedId id )

Deletes a attribute from the description.

参数
[in] id Id of the attribute to delete.
返回
OK on success.

◆  Reset()

MAXON_METHOD void Reset ( )

Resets the description and clear all attributes.

◆  IsEqual()

MAXON_METHOD Bool IsEqual ( const DataDescriptionInterface other ,
EQUALITY   equality  
) const

Compares two descriptions.

参数
[in] other Other description to compare.
[in] equality See @EQUALITY.
返回
True in equality.

◆  Compare()

MAXON_METHOD COMPARERESULT 比较 ( const DataDescriptionInterface other ) const

Compares the 2 values.

◆  GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

Returns the hashcode of the description.

◆  ToString()

MAXON_METHOD String ToString ( const FormatStatement formatStatement = nullptr ) const

Returns a readable string of the content.

参数
[in] formatStatement Nullptr or additional formatting instruction. Use "{N}" for nive formatting of the name only. Otherwise the unique id is printed together with the name.
返回
The converted result.

◆  DescribeIO()

static MAXON_METHOD Result <void> DescribeIO ( const DataSerializeInterface stream )
static

Describe all elements of this class for I/O operations.

参数
[in] stream The stream that is used to register the class members.
返回
OK on success.