Classes | |
struct | IDENT_VOID |
class | DESCRIBEFLAGS |
class | DataSerializeInterface |
class | DataSerializeWriterInterface |
class | DataSerializeReaderInterface |
Namespaces | |
maxon | |
Macros | |
#define | CONSTHASH(x) |
#define | PrepareDescribe(streamClass, className) |
#define | DescribeDefaults() |
#define | Describe(name, memberName, type, flags) |
#define | DescribeOther(name, elementName, type, flags) |
#define | DescribeLegacy(name) |
#define | DescribeHelper(name, memberName, type, flags) |
#define | DescribeIf(name, memberName, type, flags, mask, value) |
#define | DescribeHelperIf(name, memberName, type, flags, mask, value) |
#define | PrepareHelper(helperName, flags) |
#define | DescribeElse() |
#define | DescribeElseIf(mask, value) |
#define | DescribeEndIf() |
Typedefs | |
using | KeyValueConversionFunc = void(void *, Char *) |
using | CreateIoHelperFunc = ResultPtr< void >() |
using | DeleteIoHelperFunc = void(void *) |
using | ReadIoHelperFunc = Result< void >(DataSerializeInterface *, void *, void *, UInt) |
using | WriteIoHelperFunc = Result< void >(DataSerializeInterface *, void *, void *, UInt) |
using | WidthConversionFunc = Bool(void *source, void *dest) |
using | ReferenceSubstitutionFunction = Delegate< Result< const ObjectInterface * >(const ObjectInterface *input)> |
using | StreamSubstitutionFunction = Delegate< Result< ObjectRef >(ObjectRef input, const Id &compressorId)> |
Enumerations | |
enum class | PREPAREHELPERFLAGS { NONE , INITIALIZE_READ , INITIALIZE_WRITE , FINALIZE_READ , FINALIZE_WRITE , VALIDATE_STATE } |
Functions | |
MAXON_DATATYPE (IDENT_VOID, "net.maxon.ident_void", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
template<typename T > | |
ResultPtr< void > | CreateHelper () |
template<typename T > | |
void | DeleteHelper (void *helper) |
template<typename MAINCLASS , typename HELPERCLASS > | |
Result< void > | ReadHelper (DataSerializeInterface *ds, void *classPtr, void *helperPtr, UInt elementHash) |
template<typename MAINCLASS , typename HELPERCLASS > | |
Result< void > | WriteHelper (DataSerializeInterface *ds, void *classPtr, void *helperPtr, UInt elementHash) |
template<typename T > | |
void | ArrayConversionHelper (void *arrayPtr, Char *memBuffer) |
template<typename T > | |
void | SetConversionHelper (void *mapPtr, Char *memBuffer) |
template<typename T > | |
void | MapConversionHelper (void *mapPtr, Char *memBuffer) |
DESCRIBEFLAGS | operator| (DESCRIBEFLAGS a, DESCRIBEFLAGS b) |
DESCRIBEFLAGS | operator& (DESCRIBEFLAGS a, DESCRIBEFLAGS b) |
DESCRIBEFLAGS | operator~ (DESCRIBEFLAGS a) |
DESCRIBEFLAGS & | operator&= (DESCRIBEFLAGS &a, DESCRIBEFLAGS b) |
enum maxon::PREPAREHELPERFLAGS | MAXON_ENUM_FLAGS (PREPAREHELPERFLAGS) |
MAXON_DECLARATION (Class< DataSerializeRef >, DataSerializeBaseClass, "net.maxon.class.dataserializebase", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
MAXON_DECLARATION (Class< DataSerializeReaderRef >, DataSerializeReaderClass, "net.maxon.class.dataserializereader", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
MAXON_DECLARATION (Class< DataSerializeWriterRef >, DataSerializeWriterClass, "net.maxon.class.dataserializewriter", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
Variables | |
static const UInt | INITIALIZEHASH |
static const UInt | FINALIZEHASH |
static const UInt | VALIDATEHASH |
NONE | |
INITIALIZE_READ | |
INITIALIZE_WRITE | |
FINALIZE_READ | |
FINALIZE_WRITE | |
VALIDATE_STATE | |
#define CONSTHASH | ( | x | ) |
Expression to calculate the hash code of a member name during compile time.
#define PrepareDescribe | ( | streamClass, | |
className | |||
) |
Starts a description within DescribeIO. This can only be done once and must happen before any Describe calls are made.
[in] | streamClass | The stream class which has been passed to DescribeIO. |
[in] | className | The name of the current class. |
#define DescribeDefaults | ( | ) |
Registers a class to support a later default value comparison. Must be used after PrepareDescribe. Declares a variable 'defaults' which then can be filled with the defaults to compare to.
Describes a class member for I/O operations within DescribeIO. It requires a previous call to PrepareDescribe. io_overview_describeio
[in] | name | The clear-text name of an element in the file format. It can be arbitrarily chosen, but usually matches the respective member name. Once it has been used in files the identifier needs to stay the same to remain compatible (unless some conversion code is added). The name must only contain (latin) alphanumeric characters or '_' and it must not start with a numeric character. 'name' must be permanently available (and not only during the time of this call). |
[in] | memberName | The name of the class member that will be described. |
[in] | type | The DataType of the class member. While this could be automatically determined, this manual specification is necessary so that a change to a member type doesn't go unnoticed and damages the file integrity. |
[in] | flags | One of the following: DESCRIBEFLAGS::TYPE_SET, DESCRIBEFLAGS::TYPE_MAP, DESCRIBEFLAGS::TYPE_ARRAY, DESCRIBEFLAGS::TYPE_UNIQUEREF, DESCRIBEFLAGS::TYPE_WEAKREF, DESCRIBEFLAGS::NONE. It can be combined with DESCRIBEFLAGS::DONT_WRITE, DESCRIBEFLAGS::ACTION_BEFORE_WRITE and DESCRIBEFLAGS::ACTION_AFTER_READ. |
Describes a class member for I/O operations within DescribeIO. It requires a previous call to PrepareDescribe. Other than Describe this define allows to cast to a different DataType before the description is made. Here an example:
It is important that &map is equal to the offset within the described class. This is achieved by casting nullptr to MYCLASS*.
[in] | name | The clear-text name of an element in the file format. It can be arbitrarily chosen, but usually matches the respective member name. Once it has been used in files the identifier needs to stay the same to remain compatible (unless some conversion code is added). The name must only contain (latin) alphanumeric characters or '_' and it must not start with a numeric character. 'name' must be permanently available (and not only during the time of this call). |
[in] | elementName | The element that will be described. |
[in] | type | The DataType of the class member. While this could be automatically determined, this manual specification is necessary so that a change to a member type doesn't go unnoticed and damages the file integrity. |
[in] | flags | One of the following: DESCRIBEFLAGS::TYPE_SET, DESCRIBEFLAGS::TYPE_MAP, DESCRIBEFLAGS::TYPE_ARRAY, DESCRIBEFLAGS::TYPE_UNIQUEREF, DESCRIBEFLAGS::TYPE_WEAKREF, DESCRIBEFLAGS::NONE. It can be combined with DESCRIBEFLAGS::DONT_WRITE, DESCRIBEFLAGS::ACTION_BEFORE_WRITE and DESCRIBEFLAGS::ACTION_AFTER_READ. |
#define DescribeLegacy | ( | name | ) |
Describes a legacy element that is no longer needed within DescribeIO. It requires a previous call to PrepareDescribe. While generally no extra code is necessary to skip no longer needed elements this call makes sure that no warnings will show up if such an old element is found in a file.
[in] | name | The clear-text name of an element in the file format. 'name' must be permanently available (and not only during the time of this call). |
Describes a class member for I/O operations within DescribeIO. It requires a previous call to PrepareDescribe and PrepareHelper. Other than Describe this describes a member of the helper class. io_overview_helper
[in] | name | The clear-text name of an element in the file format. It can be arbitrarily chosen, but usually matches the respective member name. Once it has been used in files the identifier needs to stay the same to remain compatible (unless some conversion code is added). The name must only contain (latin) alphanumeric characters or '_' and it must not start with a numeric character. 'name' must be permanently available (and not only during the time of this call). |
[in] | memberName | The name of the member in the I/O helper class that will be described. |
[in] | type | The DataType of the class member. While this could be automatically determined, this manual specification is necessary so that a change to a member type doesn't go unnoticed and damages the file integrity. |
[in] | flags | One of the following: DESCRIBEFLAGS::TYPE_SET, DESCRIBEFLAGS::TYPE_MAP, DESCRIBEFLAGS::TYPE_ARRAY, DESCRIBEFLAGS::TYPE_UNIQUEREF, DESCRIBEFLAGS::TYPE_WEAKREF, DESCRIBEFLAGS::NONE. It can be combined with DESCRIBEFLAGS::DONT_WRITE, DESCRIBEFLAGS::ACTION_BEFORE_WRITE and DESCRIBEFLAGS::ACTION_AFTER_READ. |
Describes a class member with condition for I/O operations within DescribeIO. It requires a previous call to PrepareDescribe. Compared to Describe it additionally introduces a condition for following class members. Every DescribeIf must be paired with exactly one DescribeEndIf. io_overview_conditions
[in] | name | The clear-text name of an element in the file format. It can be arbitrarily chosen, but usually matches the respective member name. Once it has been used in files the identifier needs to stay the same to remain compatible (unless some conversion code is added). The name must only contain (latin) alphanumeric characters or '_' and it must not start with a numeric character. 'name' must be permanently available (and not only during the time of this call). |
[in] | memberName | The name of the class member that will be described. |
[in] | type | The DataType of the class member. While this could be automatically determined, this manual specification is necessary so that a change to a member type doesn't go unnoticed and damages the file integrity. |
[in] | flags | One of the following: DESCRIBEFLAGS::TYPE_SET, DESCRIBEFLAGS::TYPE_MAP, DESCRIBEFLAGS::TYPE_ARRAY, DESCRIBEFLAGS::TYPE_UNIQUEREF, DESCRIBEFLAGS::TYPE_WEAKREF, DESCRIBEFLAGS::NONE. It can be combined with DESCRIBEFLAGS::DONT_WRITE, DESCRIBEFLAGS::ACTION_BEFORE_WRITE and DESCRIBEFLAGS::ACTION_AFTER_READ. |
[in] | mask | The 64-bit unsigned comparison mask. |
[in] | value | The 64-bit comparison value. The condition is met if (read_or_written_value & mask) == value. |
Describes a class member with condition for I/O operations within DescribeIO. It requires a previous call to PrepareDescribe and PrepareHelper. Other than DescribeIf this describes a member of the helper class. It additionally introduces a condition for following class members. Every DescribeHelperIf must be paired with exactly one DescribeEndIf. io_overview_conditions io_overview_helper
[in] | name | The clear-text name of an element in the file format. It can be arbitrarily chosen, but usually matches the respective member name. Once it has been used in files the identifier needs to stay the same to remain compatible (unless some conversion code is added). The name must only contain (latin) alphanumeric characters or '_' and it must not start with a numeric character. 'name' must be permanently available (and not only during the time of this call). |
[in] | memberName | The name of the class member that will be described. |
[in] | type | The DataType of the class member. While this could be automatically determined, this manual specification is necessary so that a change to a member type doesn't go unnoticed and damages the file integrity. |
[in] | flags | One of the following: DESCRIBEFLAGS::TYPE_SET, DESCRIBEFLAGS::TYPE_MAP, DESCRIBEFLAGS::TYPE_ARRAY, DESCRIBEFLAGS::TYPE_UNIQUEREF, DESCRIBEFLAGS::TYPE_WEAKREF, DESCRIBEFLAGS::NONE. It can be combined with DESCRIBEFLAGS::DONT_WRITE, DESCRIBEFLAGS::ACTION_BEFORE_WRITE and DESCRIBEFLAGS::ACTION_AFTER_READ. |
[in] | mask | The 64-bit unsigned comparison mask. |
[in] | value | The 64-bit comparison value. The condition is met if (read_or_written_value & mask) == value. |
#define PrepareHelper | ( | helperName, | |
flags | |||
) |
Declares and initializes an I/O helper class within DescribeIO. This can only be done once within DescribeIO and must happen before DescribeHelper or DescribeHelperIf are used. io_overview_helper
[in] | helperName | The name of the helper class. |
[in] | flags | PREPAREHELPERFLAGS. |
#define DescribeElse | ( | ) |
Describes an else condition within DescribeIO. It requires a previous (and matching) call to DescribeIf or DescribeHelperIf. io_overview_conditions
#define DescribeElseIf | ( | mask, | |
value | |||
) |
Describes an else if condition within DescribeIO. It requires a previous (and matching) call to DescribeIf or DescribeHelperIf. The calculation of the condition is based on the read or written value from DescribeIf/DescribeHelperIf. io_overview_conditions
[in] | mask | The 64-bit unsigned comparison mask. |
[in] | value | The 64-bit comparison value. The condition is met if (read_or_written_value & mask) == value. |
#define DescribeEndIf | ( | ) |
Describes the end if an if condition within DescribeIO. It requires a previous (and matching) call to DescribeIf or DescribeHelperIf. io_overview_conditions
NONE |
INITIALIZE_READ |
The helper's ReadAction will get a call with INITIALIZEHASH before the class has been read.
INITIALIZE_WRITE |
The helper's WriteAction will get a call with INITIALIZEHASH before the class has been written.
FINALIZE_READ |
The helper's ReadAction will get a call with FINALIZEHASH after the class has been read.
FINALIZE_WRITE |
The helper's WriteAction will get a call with FINALIZEHASH after the class has been written.
VALIDATE_STATE |
The helper's ReadAction will get a call after all input operations are finished. Objects that interact with others can then update necessary information.