Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Serialize::ClassElement Struct Reference

#include <SerializeContext.h>

Public Types

enum  Flags {
  FLG_POINTER = (1 << 0) , FLG_BASE_CLASS = (1 << 1) , FLG_NO_DEFAULT_VALUE = (1 << 2) , FLG_DYNAMIC_FIELD = (1 << 3) ,
  FLG_UI_ELEMENT = (1 << 4)
}
 
enum class  AttributeOwnership { Parent , Self , None }
 

Public Member Functions

 AZ_TYPE_INFO_WITH_NAME_DECL (ClassElement)
 
ClassElementoperator= (const ClassElement &other)
 
void ClearAttributes ()
 
AttributeFindAttribute (AttributeId attributeId) const
 

Public Attributes

const char * m_name { "" }
 Used in XML output and debugging purposes.
 
u32 m_nameCrc {}
 CRC32 of m_name.
 
Uuid m_typeId = AZ::TypeId::CreateNull()
 
size_t m_dataSize {}
 
size_t m_offset {}
 
IRttiHelperm_azRtti {}
 Interface used to support RTTI.
 
GenericClassInfom_genericClassInfo = nullptr
 Valid when the generic class is set. So you don't search for the actual type in the class register.
 
Edit::ElementDatam_editData {}
 Pointer to edit data (generated by EditContext).
 
AZStd::vector< AttributeSharedPair, AZStdFunctorAllocatorm_attributes
 
AttributeOwnership m_attributeOwnership = AttributeOwnership::Parent
 
int m_flags {}
 

Detailed Description

Class element. When a class doesn't have a direct serializer, he is an aggregation of ClassElements (which can be another classes).

Member Enumeration Documentation

◆ Flags

Enumerator
FLG_POINTER 

Element is stored as pointer (it's not a value).

FLG_BASE_CLASS 

Set if the element is a base class of the holding class.

FLG_NO_DEFAULT_VALUE 

Set if the class element can't have a default value.

FLG_DYNAMIC_FIELD 

Set if the class element represents a dynamic field (DynamicSerializableField::m_data).

FLG_UI_ELEMENT 

Set if the class element represents a UI element tied to the ClassData of its parent.

Member Data Documentation

◆ m_attributes

AZStd::vector<AttributeSharedPair, AZStdFunctorAllocator> AZ::Serialize::ClassElement::m_attributes
Initial value:
{
AZStdFunctorAllocator([]() -> IAllocator& { return AZ::AllocatorInstance<AZ::SystemAllocator>::Get(); })
}
Definition: AllocatorInstance.h:85

Attributes attached to ClassElement. Lambda is required here as AZStdFunctorAllocator expects a function pointer that returns an IAllocator& and the AZ::AllocatorInstance<AZ::SystemAllocator>::Get returns an AZ::SystemAllocator& which while it inherits from IAllocator, does not work as function pointers do not support covariant return types


The documentation for this struct was generated from the following file: