DESCRIBEFLAGS Class Reference

#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()

DESCRIBEFLAGS ( ValueType  value)
explicit

Member Function Documentation

◆ operator ValueType()

operator ValueType ( ) const

Member Data Documentation

◆ NONE

constexpr ValueType NONE
staticconstexpr

Default.

◆ CONDITION_IF

constexpr ValueType CONDITION_IF
staticconstexpr

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

◆ CONDITION_ELSE

constexpr ValueType CONDITION_ELSE
staticconstexpr

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

◆ CONDITION_END

constexpr ValueType CONDITION_END
staticconstexpr

End condition, cannot be combined with other flags.

◆ IS_LEGACY_ELEMENT

constexpr ValueType IS_LEGACY_ELEMENT
staticconstexpr

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

◆ DONT_WRITE

constexpr ValueType DONT_WRITE
staticconstexpr

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

◆ ACTION_BEFORE_WRITE

constexpr ValueType ACTION_BEFORE_WRITE
staticconstexpr

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

◆ ACTION_AFTER_READ

constexpr ValueType ACTION_AFTER_READ
staticconstexpr

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

◆ REFERS_TO_HELPER

constexpr ValueType REFERS_TO_HELPER
staticconstexpr

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

◆ DELAYED

constexpr ValueType DELAYED
staticconstexpr

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.

◆ TYPE_SET

constexpr ValueType TYPE_SET
staticconstexpr

The described element is a Set type.

◆ TYPE_MAP

constexpr ValueType TYPE_MAP
staticconstexpr

The described element is a Map type.

◆ TYPE_ARRAY

constexpr ValueType TYPE_ARRAY
staticconstexpr

The described element is an Array type.

◆ TYPE_UNIQUEREF

constexpr ValueType TYPE_UNIQUEREF
staticconstexpr

The described element is an UniqueRef type.

◆ TYPE_WEAKREF

constexpr ValueType TYPE_WEAKREF
staticconstexpr

The described element is a WeakRef type.

◆ TYPE_DATATYPE

constexpr ValueType TYPE_DATATYPE
staticconstexpr

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

◆ RECEIVE_DATATYPE

constexpr ValueType RECEIVE_DATATYPE
staticconstexpr

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

◆ APPLY_TO_KEY

constexpr ValueType APPLY_TO_KEY
staticconstexpr

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.

◆ WRITE_IF_NOT_EMPTY

constexpr ValueType WRITE_IF_NOT_EMPTY
staticconstexpr

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.

◆ CONDITION_NOWRITE

constexpr ValueType CONDITION_NOWRITE
staticconstexpr

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

◆ _value

ValueType _value