Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::SerializeContext::DataElement Struct Reference

Open 3D Engine (O3DE), the successor to Lumberyard, is now available in Developer Preview. Download O3DE or visit the AWS Game Tech blog to learn more.

Represents an element within the tree of serialized data. More...

Public Types

enum DataType
Indicates how the data is represented in memory. More...

Public Member Functions

DataElement ()
A constructor. More...
~DataElement ()
A destructor. More...
DataElement (const DataElement &rhs)
A copy constructor. More...
DataElement & operator= (const DataElement &rhs)
A copy assignment operator. More...

Public Attributes

const char * m_name
The name of the element. This must be unique within the scope of the class. More...
u32 m_nameCrc
The CRC of m_name . More...
DataType m_dataType
The type of data, if any. More...
Uuid m_id
The unique ID of the DataElement type. More...
unsigned int m_version
The version of the data in the stream. This can be the current version or older. Newer versions are handled internally. More...
size_t m_dataSize
The size of the data, in bytes. More...
Uuid m_specializedId
The specialized type ID from the GenericClassInfo structure. Only valid if GenericClassInfo exists for the ClassElement that this DataElement represents. More...
AZStd::vector< char > m_buffer
The local buffer that ByteContainerStream uses when the DataElement contains data. More...
IO::ByteContainerStream< AZStd::vector< char > > m_byteStream
The stream that is used when the DataElement contains data. More...
IO::GenericStream * m_stream
A pointer to the stream that holds the element's data. This can point to m_byteStream . More...

Detailed Description

Represents an element within the tree of serialized data.

Each element contains metadata about itself and possibly a data value. For example, an element that represents an int contains a data value. An element that represents a vector or class does not contain a data value because its contents are stored as subelements, each of which is a DataElement itself.

Elements are linked to their subelements through the DataElementNode class.

You typically don't interact with the DataElement class directly.

Member Enumeration Documentation

DataType

Indicates how the data is represented in memory.

Enumerator
DT_TEXT

The data points to a string representation of the data.

DT_BINARY

The data points to a binary representation of the data in native endian.

DT_BINARY_BE

The data points to a binary representation of the data in big endian.

Constructor & Destructor Documentation

DataElement() [1/2]

AZ::SerializeContext::DataElement::DataElement ( )

A constructor.

~DataElement()

AZ::SerializeContext::DataElement::~DataElement ( )

A destructor.

DataElement() [2/2]

AZ::SerializeContext::DataElement::DataElement ( const DataElement & rhs )

A copy constructor.

Member Function Documentation

operator=()

DataElement & AZ::SerializeContext::DataElement::operator= ( const DataElement & rhs )

A copy assignment operator.

Member Data Documentation

m_buffer

AZStd::vector<char> AZ::SerializeContext::DataElement::m_buffer

The local buffer that ByteContainerStream uses when the DataElement contains data.

m_byteStream

IO::ByteContainerStream<AZStd::vector<char> > AZ::SerializeContext::DataElement::m_byteStream

The stream that is used when the DataElement contains data.

m_dataSize

size_t AZ::SerializeContext::DataElement::m_dataSize

The size of the data, in bytes.

m_dataType

DataType AZ::SerializeContext::DataElement::m_dataType

The type of data, if any.

m_id

Uuid AZ::SerializeContext::DataElement::m_id

The unique ID of the DataElement type.

m_name

const char* AZ::SerializeContext::DataElement::m_name

The name of the element. This must be unique within the scope of the class.

m_nameCrc

u32 AZ::SerializeContext::DataElement::m_nameCrc

The CRC of m_name .

m_specializedId

Uuid AZ::SerializeContext::DataElement::m_specializedId

The specialized type ID from the GenericClassInfo structure. Only valid if GenericClassInfo exists for the ClassElement that this DataElement represents.

m_stream

IO::GenericStream* AZ::SerializeContext::DataElement::m_stream

A pointer to the stream that holds the element's data. This can point to m_byteStream .

m_version

unsigned int AZ::SerializeContext::DataElement::m_version

The version of the data in the stream. This can be the current version or older. Newer versions are handled internally.


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