Menu
Lumberyard
C++ API Reference (Version 1.10)

This structure is built up and stored in the serialize context while you are calling SerializeContext::ClassInfo functions to reflect a class's data to the serialize context. More...

Public Member Functions

 ClassData ()
 A constructor. More...
 
bool IsDeprecated () const
 Returns whether the class is deprecated. More...
 
ClassPersistentId GetPersistentId (const SerializeContext &context) const
 Returns the function that gets the persistent ID of the class instance. More...
 

Static Public Member Functions

template<class T >
static ClassData Create (const char *name, const Uuid &typeUuid, IObjectFactory *factory, IDataSerializer *serializer=nullptr, IDataContainer *container=nullptr)
 Creates a ClassData instance. More...
 

Public Attributes

const char * m_name
 The name of the class. More...
 
Uuid m_typeId
 A unique type ID for the class. More...
 
unsigned int m_version
 The version of the class. The default value is 0. More...
 
VersionConverter m_converter
 A function that converts classes or provides replacement classes for deprecated classes. More...
 
IObjectFactory * m_factory
 Interface for object creation. More...
 
ClassPersistentId m_persistentId
 A function that gets the persistent ID of the class instance. More...
 
ClassDoSave m_doSave
 A function that indicates whether the instance is saved to persistent storage. More...
 
IDataSerializer * m_serializer
 An interface for data serialization. More...
 
IEventHandlerm_eventHandler
 An optional interface for event notification such as starting and stopping serialization. More...
 
IDataContainer * m_container
 The interface through which data is accessed if this class is a data container. More...
 
IRttiHelper * m_azRtti
 The interface to support real-time type information (RTTI). This is set internally based on the type provided to Class<T>. More...
 
Edit::ClassDatam_editData
 Data that is reflected to the EditContext. More...
 
ClassElementArray m_elements
 An array of subelements of the class. More...
 

Detailed Description

This structure is built up and stored in the serialize context while you are calling SerializeContext::ClassInfo functions to reflect a class's data to the serialize context.

You typically don't interact with this class directly.

Constructor & Destructor Documentation

◆ ClassData()

AZ::SerializeContext::ClassData::ClassData ( )

A constructor.

Member Function Documentation

◆ Create()

template<class T >
static ClassData AZ::SerializeContext::ClassData::Create ( const char *  name,
const Uuid &  typeUuid,
IObjectFactory *  factory,
IDataSerializer *  serializer = nullptr,
IDataContainer *  container = nullptr 
)
static

Creates a ClassData instance.

Parameters
nameThe name of the class.
typeUuidThe unique type ID of the class.
factoryA pointer to an interface that creates and destroys an object from the serializer.
serializer(Optional) A pointer to an interface that provides a custom serializer for the class.
container(Optional) A pointer to an interface that provides information about a data container. For example, it specifies how to add and remove elements from the container.

◆ GetPersistentId()

ClassPersistentId AZ::SerializeContext::ClassData::GetPersistentId ( const SerializeContext context) const

Returns the function that gets the persistent ID of the class instance.

Persistent IDs enable slices to more easily track instances of classes that are stored in index-based containers like vectors or lists.

Parameters
contextA reference to the serialize context.
Returns
A function that gets the persistent ID of the class instance.

◆ IsDeprecated()

bool AZ::SerializeContext::ClassData::IsDeprecated ( ) const
inline

Returns whether the class is deprecated.

Returns
Returns true if the class is deprecated. Otherwise, false.

Member Data Documentation

◆ m_azRtti

IRttiHelper* AZ::SerializeContext::ClassData::m_azRtti

The interface to support real-time type information (RTTI). This is set internally based on the type provided to Class<T>.

◆ m_container

IDataContainer* AZ::SerializeContext::ClassData::m_container

The interface through which data is accessed if this class is a data container.

◆ m_converter

VersionConverter AZ::SerializeContext::ClassData::m_converter

A function that converts classes or provides replacement classes for deprecated classes.

◆ m_doSave

ClassDoSave AZ::SerializeContext::ClassData::m_doSave

A function that indicates whether the instance is saved to persistent storage.

◆ m_editData

Edit::ClassData* AZ::SerializeContext::ClassData::m_editData

Data that is reflected to the EditContext.

◆ m_elements

ClassElementArray AZ::SerializeContext::ClassData::m_elements

An array of subelements of the class.

Each time you call ClassInfo::Field(), a ClassElement is added to this array. This array is only used if m_serializer is null. In that case, the entire class is serialized as one stream so it doesn't need to be stored as subelements.

◆ m_eventHandler

IEventHandler* AZ::SerializeContext::ClassData::m_eventHandler

An optional interface for event notification such as starting and stopping serialization.

◆ m_factory

IObjectFactory* AZ::SerializeContext::ClassData::m_factory

Interface for object creation.

◆ m_name

const char* AZ::SerializeContext::ClassData::m_name

The name of the class.

◆ m_persistentId

ClassPersistentId AZ::SerializeContext::ClassData::m_persistentId

A function that gets the persistent ID of the class instance.

◆ m_serializer

IDataSerializer* AZ::SerializeContext::ClassData::m_serializer

An interface for data serialization.

If this is not null, then a direct serializer is serializing the entire class. In that case, m_elements should be empty.

◆ m_typeId

Uuid AZ::SerializeContext::ClassData::m_typeId

A unique type ID for the class.

◆ m_version

unsigned int AZ::SerializeContext::ClassData::m_version

The version of the class. The default value is 0.


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