LegacyCommandDataInterface Class Reference

#include <commandbase.h>

Inheritance diagram for LegacyCommandDataInterface:

Detailed Description

Legacy command data interface: a data dictionary which holds one or more pointers to generic data used to store legacy data types.

Public Member Functions

MAXON_METHOD Result< Generic * > GetLegacyData (Int index)
 
MAXON_METHOD Result< void > SetLegacyData (const Generic *data, Int index)
 
MAXON_METHOD Int GetLegacyDataCount () const
 
template<typename LEGACYDATA >
MAXON_FUNCTION Result< void > SetLegacyData (const LEGACYDATA &data, Int index)
 
template<typename LEGACYDATA >
MAXON_FUNCTION Result< LEGACYDATA & > GetLegacyData (Int index)
 

Private Member Functions

 MAXON_INTERFACE (LegacyCommandDataInterface, MAXON_REFERENCE_NORMAL, "net.maxon.command.interface.legacycommanddata", MAXON_IMPLEMENTATION_MODULE("net.maxon.command"))
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( LegacyCommandDataInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.command.interface.legacycommanddata"  ,
MAXON_IMPLEMENTATION_MODULE("net.maxon.command")   
)
private

◆ GetLegacyData() [1/2]

MAXON_METHOD Result<Generic*> GetLegacyData ( Int  index)

Returns a pointer to the legacy data at index.

Parameters
[in]indexThe data index.
Returns
A pointer to the legacy data at the specified index. The memory ownership depends on the implementation.

◆ SetLegacyData() [1/2]

MAXON_METHOD Result<void> SetLegacyData ( const Generic *  data,
Int  index 
)

Sets legacy data from a data pointer at index.

Parameters
[in]dataThe legacy data pointer. The memory ownership depends on the implementation.
[in]indexThe data index.
Returns
OK on success at index.

◆ GetLegacyDataCount()

MAXON_METHOD Int GetLegacyDataCount ( ) const

Count of legacy data entries.

Returns
Reference to the legacy data at index.

◆ SetLegacyData() [2/2]

MAXON_FUNCTION Result<void> SetLegacyData ( const LEGACYDATA &  data,
Int  index 
)

Sets legacy data from a data reference at index.

Template Parameters
LEGACYDATAThe type of legacy data.
Parameters
[in]dataThe data.
[in]indexThe data index. #return OK on success.

◆ GetLegacyData() [2/2]

MAXON_FUNCTION Result<LEGACYDATA&> GetLegacyData ( Int  index)

Gets a legacy data reference at index.

Template Parameters
LEGACYDATAThe data type that will be returned.
Parameters
[in]indexThe data index.
Returns
Reference to the legacy data at index.