DataDescriptionDefinitionInterface Class Reference

#include <datadescriptiondefinition.h>

Inheritance diagram for DataDescriptionDefinitionInterface:

Detailed Description

Interface to store descriptions definitions of objects. The DataDescription definition defines a sequence of "commands" to define attributes, include, commands, strings, etc.

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< DataDescriptionEntry > > GetEntries () const
 
MAXON_METHOD Result< DataDescriptionEntryGetEntry (Int idx) const
 
MAXON_METHOD Result< DataDescriptionEntryFindEntry (const InternedId &id) const
 
MAXON_METHOD Result< IntAddEntry (const DataDescriptionEntry &props)
 
MAXON_METHOD Result< void > ReplaceEntry (const DataDescriptionEntry &props)
 
MAXON_METHOD Result< BoolReplaceEntry (Int idx, const DataDescriptionEntry &props)
 
MAXON_METHOD Result< void > EraseEntry (Int idx)
 
MAXON_METHOD Result< void > EraseEntry (const InternedId &id)
 
MAXON_METHOD void Reset ()
 

Static Public Member Functions

static MAXON_METHOD Result< void > MergeDescriptionDefinition (DataDescriptionDefinition &target, const DataDescriptionDefinition &source, Bool overwriteIncludes, Bool skipIncludes)
 
static MAXON_METHOD Result< DataGetDataDefaults (const DataDictionary &dataEntry)
 
static MAXON_METHOD Result< DataGetDataValueOrDefaults (const InternedId &dataId, const DataDictionary &dataEntry, GETDATAFLAGS flags, const GetDataCallbackType &getDataCallback)
 
static MAXON_METHOD DataDescriptionDefinitionInterfaceCreate ()
 
static MAXON_METHOD const DataDescriptionDefinitionInterfaceNullValuePtr ()
 

Private Member Functions

 MAXON_INTERFACE (DataDescriptionDefinitionInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.datadescriptiondefinition")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( DataDescriptionDefinitionInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.datadescriptiondefinition"   
)
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.

Parameters
[in]infoDictionary with infos.
Returns
OK on success.

◆ GetEntryCount()

MAXON_METHOD Int GetEntryCount ( ) const

Returns the number of entries in the description.

◆ GetEntries()

Returns a array with all entries.

◆ GetEntry()

MAXON_METHOD Result<DataDescriptionEntry> GetEntry ( Int  idx) const

Returns a specific entry with the given index.

Parameters
[in]idxIndex to return.
Returns
Entry on success.

◆ FindEntry()

MAXON_METHOD Result<DataDescriptionEntry> FindEntry ( const InternedId id) const

FindEntry searches the first occurrence of the entry.

Parameters
[in]idId to search.
Returns
Entry on success.

◆ AddEntry()

MAXON_METHOD Result<Int> AddEntry ( const DataDescriptionEntry props)

AddEntry to the description.

Parameters
[in]propsAttribute to add to the end of the list.
Returns
Index of the new attribute on success.

◆ ReplaceEntry() [1/2]

MAXON_METHOD Result<void> ReplaceEntry ( const DataDescriptionEntry props)

Replaces an entry. Will add a new entry if #props identifier is not found.

Parameters
[in]propsProperties to replace.
Returns
OK on success.

◆ ReplaceEntry() [2/2]

MAXON_METHOD Result<Bool> ReplaceEntry ( Int  idx,
const DataDescriptionEntry props 
)

Replaces an entry.

Parameters
[in]idxIndex to replace.
[in]propsProperties to replace.
Returns
True if changes were detected. False if the data was identical. Error if #idx is invalid.

◆ EraseEntry() [1/2]

MAXON_METHOD Result<void> EraseEntry ( Int  idx)

Erase an attribute from the description.

Parameters
[in]idxIndex of the attribute to delete.
Returns
OK on success.

◆ EraseEntry() [2/2]

MAXON_METHOD Result<void> EraseEntry ( const InternedId id)

Erase an attribute from the description.

Parameters
[in]idId to erase.
Returns
OK on success. Error if attribute is not found.

◆ Reset()

MAXON_METHOD void Reset ( )

Resets the description and clear all attributes.

◆ MergeDescriptionDefinition()

static MAXON_METHOD Result<void> MergeDescriptionDefinition ( DataDescriptionDefinition &  target,
const DataDescriptionDefinition &  source,
Bool  overwriteIncludes,
Bool  skipIncludes 
)
static

Merges the given descriptions.

Parameters
[in]targetTarget description to overwrite.
[in]sourceNew entries to merge into target.
[in]overwriteIncludesTrue to overwrite the includes of target id source has includes.
Returns
OK on success.

◆ GetDataDefaults()

static MAXON_METHOD Result<Data> GetDataDefaults ( const DataDictionary &  dataEntry)
static

◆ GetDataValueOrDefaults()

static MAXON_METHOD Result<Data> GetDataValueOrDefaults ( const InternedId dataId,
const DataDictionary &  dataEntry,
GETDATAFLAGS  flags,
const GetDataCallbackType getDataCallback 
)
static

◆ Create()

◆ NullValuePtr()

static MAXON_METHOD const DataDescriptionDefinitionInterface* NullValuePtr ( )
static