DataDescriptionInterface Class Reference

#include <datadescription.h>

Detailed Description

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

Public Member Functions

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< BoolSetEntry (const DataDictionary &props, Bool merge=false)
MAXON_METHOD Result< void > EraseEntry (const InternedId &id)
MAXON_METHOD void Reset ()
MAXON_METHOD Bool IsEqual (const DataDescriptionInterface *other, EQUALITY equality) const
MAXON_METHOD COMPARERESULT Compare (const DataDescriptionInterface *other) const
MAXON_METHOD HashInt GetHashCode () const
MAXON_METHOD String ToString (const FormatStatement *formatStatement=nullptr) const

Static Public Member Functions

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

Private Member Functions

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

Member Function Documentation


MAXON_INTERFACE_NONVIRTUAL ( DataDescriptionInterface  ,

◆ 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]infoDictionary 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]idId 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]propsProperties to set. The DESCRIPTION::BASE::IDENTIFIER will be used as key for the hashmap.
[in]mergeTrue 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]idId 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]otherOther description to compare.
[in]equalitySee @EQUALITY.
True in equality.

◆ Compare()

MAXON_METHOD COMPARERESULT Compare ( 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]formatStatementNullptr 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)

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

[in]streamThe stream that is used to register the class members.
OK on success.