#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.
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< DataDictionary > | FindEntry (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 | 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 UniqueHash | GetUniqueHashCode () 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", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
|
private |
MAXON_METHOD DataDictionary GetInfo | ( | ) | const |
Returns the info dictionary.
MAXON_METHOD Result<void> SetInfo | ( | const DataDictionary & | info | ) |
SetInfo the info dictionary of the description.
[in] | info | Dictionary with infos. |
MAXON_METHOD Int GetEntryCount | ( | ) | const |
Returns the number of entries in the description.
MAXON_METHOD Result<BaseArray<DataDictionary> > GetEntries | ( | ) | const |
Returns a array with all entries.
MAXON_METHOD Result<DataDictionary> GetEntry | ( | const InternedId & | id | ) | const |
Returns a specific entry with the given id. Deprecated. Will be deprecated, use FindEntry instead.
[in] | id | Id to return. |
MAXON_METHOD Result<DataDictionary> FindEntry | ( | const InternedId & | id | ) | const |
Searches for the occurrence of the entry.
[in] | id | Id to search. |
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. |
MAXON_METHOD Result<void> EraseEntry | ( | const InternedId & | id | ) |
Deletes a attribute from the description.
[in] | id | Id of the attribute to delete. |
MAXON_METHOD void Reset | ( | ) |
Resets the description and clear all attributes.
MAXON_METHOD Bool IsEqual | ( | const DataDescriptionInterface * | other, |
EQUALITY | equality | ||
) | const |
Compares two descriptions.
[in] | other | Other description to compare. |
[in] | equality | See @EQUALITY. |
MAXON_METHOD COMPARERESULT Compare | ( | const DataDescriptionInterface * | other | ) | const |
Compares the 2 values.
MAXON_METHOD HashInt GetHashCode | ( | ) | const |
Returns the hash code of this @CLASS.
MAXON_METHOD UniqueHash GetUniqueHashCode | ( | ) | const |
Returns the 128-bit hash value of this @CLASS. The implementation ensures uniform distribution, so for practical purposes you can safely assume that two objects are equal if their hash values are equal.
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. |
|
static |
Describe all elements of this class for I/O operations.
[in] | stream | The stream that is used to register the class members. |