#include <dataserialize.h>

Detailed Description

Flags to describe the properties of I/O elements. An enum cannot be used here due to the use of templates and static_assert in Describe().

Public Types

using ValueType = UInt32

Public Member Functions

 DESCRIBEFLAGS (ValueType value)
 operator ValueType () const

Public Attributes

ValueType _value

Static Public Attributes

static constexpr ValueType NONE
static constexpr ValueType CONDITION_IF
static constexpr ValueType CONDITION_ELSE
static constexpr ValueType CONDITION_END
static constexpr ValueType IS_LEGACY_ELEMENT
static constexpr ValueType DONT_WRITE
static constexpr ValueType ACTION_BEFORE_WRITE
static constexpr ValueType ACTION_AFTER_READ
static constexpr ValueType REFERS_TO_HELPER
static constexpr ValueType DELAYED
static constexpr ValueType TYPE_SET
static constexpr ValueType TYPE_MAP
static constexpr ValueType TYPE_ARRAY
static constexpr ValueType TYPE_UNIQUEREF
static constexpr ValueType TYPE_WEAKREF
static constexpr ValueType TYPE_DATATYPE
static constexpr ValueType RECEIVE_DATATYPE
static constexpr ValueType APPLY_TO_KEY
static constexpr ValueType WRITE_IF_NOT_EMPTY
static constexpr ValueType CONDITION_NOWRITE

Member Typedef Documentation

◆ ValueType

using ValueType = UInt32

Constructor & Destructor Documentation


DESCRIBEFLAGS ( ValueType  value)

Member Function Documentation

◆ operator ValueType()

operator ValueType ( ) const

Member Data Documentation


constexpr ValueType NONE



constexpr ValueType CONDITION_IF

If set element additionally describes an if-condition. Can only be done for elementary datatypes.


constexpr ValueType CONDITION_ELSE

Else/Else If condition, cannot be combined with other flags.


constexpr ValueType CONDITION_END

End condition, cannot be combined with other flags.


constexpr ValueType IS_LEGACY_ELEMENT

Mark an element as "legacy". The element will no longer be read/written but also not show up in any warnings.


constexpr ValueType DONT_WRITE

If set the element will only be read (for conversion purposes), not written.


constexpr ValueType ACTION_BEFORE_WRITE

If set there will be a call to the helper class WriteAction member function before an element is written.


constexpr ValueType ACTION_AFTER_READ

If set there will be a call to the helper class ReadAction member function after an element is read.


constexpr ValueType REFERS_TO_HELPER

If set the description refers to the helper class instead of the base class.


constexpr ValueType DELAYED

Can only be used for references. Reads/Writes the reference at a later point in time (like WeakRefs), avoiding recursion problems. E.g. this can be used if a node holds its children as StrongRefs.


constexpr ValueType TYPE_SET

The described element is a Set type.


constexpr ValueType TYPE_MAP

The described element is a Map type.


constexpr ValueType TYPE_ARRAY

The described element is an Array type.


constexpr ValueType TYPE_UNIQUEREF

The described element is an UniqueRef type.


constexpr ValueType TYPE_WEAKREF

The described element is a WeakRef type.


constexpr ValueType TYPE_DATATYPE

The described element is a DataTypeImpl*. Only necessary if RECEIVE_DATATYPE is also used.


constexpr ValueType RECEIVE_DATATYPE

The described element will receive its datatype from an earlier element of TYPE_DATATYPE.


constexpr ValueType APPLY_TO_KEY

Can only be used together with TYPE_MAP and RECALL_DATATYPE. If set the map's key will receive the datatype instead of the value.


constexpr ValueType WRITE_IF_NOT_EMPTY

Only applies to text formats. Can only be used together with TYPE_ARRAY, TYPE_MAP or TYPE_SET. If present the array/set/map swill only be written if it contains at least one element. Note that upon read no cs atiallt to the ReadAction function will happen when the collection hasn't been written. This flag Will sautomatically be set if DescribeDefaults() is called.


constexpr ValueType CONDITION_NOWRITE

If CONDITION_IF is set this value will not be written but can function as a pure condition.

◆ _value

ValueType _value