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 const ValueType NONE
 
static const ValueType CONDITION_IF
 
static const ValueType CONDITION_ELSE
 
static const ValueType CONDITION_END
 
static const ValueType IS_LEGACY_ELEMENT
 
static const ValueType DONT_WRITE
 
static const ValueType ACTION_BEFORE_WRITE
 
static const ValueType ACTION_AFTER_READ
 
static const ValueType REFERS_TO_HELPER
 
static const ValueType DELAYED
 
static const ValueType TYPE_SET
 
static const ValueType TYPE_MAP
 
static const ValueType TYPE_ARRAY
 
static const ValueType TYPE_UNIQUEREF
 
static const ValueType TYPE_WEAKREF
 
static const ValueType TYPE_DATATYPE
 
static const ValueType RECEIVE_DATATYPE
 
static const ValueType APPLY_TO_KEY
 
static const ValueType WRITE_IF_NOT_EMPTY
 

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

const ValueType NONE
static

Default.

◆ CONDITION_IF

const ValueType CONDITION_IF
static

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

◆ CONDITION_ELSE

const ValueType CONDITION_ELSE
static

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

◆ CONDITION_END

const ValueType CONDITION_END
static

End condition, cannot be combined with other flags.

◆ IS_LEGACY_ELEMENT

const ValueType IS_LEGACY_ELEMENT
static

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

◆ DONT_WRITE

const ValueType DONT_WRITE
static

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

◆ ACTION_BEFORE_WRITE

const ValueType ACTION_BEFORE_WRITE
static

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

◆ ACTION_AFTER_READ

const ValueType ACTION_AFTER_READ
static

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

◆ REFERS_TO_HELPER

const ValueType REFERS_TO_HELPER
static

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

◆ DELAYED

const ValueType DELAYED
static

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

const ValueType TYPE_SET
static

The described element is a Set type.

◆ TYPE_MAP

const ValueType TYPE_MAP
static

The described element is a Map type.

◆ TYPE_ARRAY

const ValueType TYPE_ARRAY
static

The described element is an Array type.

◆ TYPE_UNIQUEREF

const ValueType TYPE_UNIQUEREF
static

The described element is an UniqueRef type.

◆ TYPE_WEAKREF

const ValueType TYPE_WEAKREF
static

The described element is a WeakRef type.

◆ TYPE_DATATYPE

const ValueType TYPE_DATATYPE
static

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

◆ RECEIVE_DATATYPE

const ValueType RECEIVE_DATATYPE
static

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

◆ APPLY_TO_KEY

const ValueType APPLY_TO_KEY
static

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

const ValueType WRITE_IF_NOT_EMPTY
static

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

◆ _value

ValueType _value