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::IDataConverter Class Reference

#include <SerializeContext.h>

Inherited by AZ::SerializeGenericTypeInfo< Data::Asset< T > >::DataConverter.

Public Member Functions

virtual ~IDataConverter ()=default
 
virtual bool CanConvertFromType (const TypeId &convertibleTypeId, const SerializeContext::ClassData &classData, SerializeContext &)
 
virtual bool ConvertFromType (void *&convertibleTypePtr, const TypeId &convertibleTypeId, void *classPtr, const SerializeContext::ClassData &classData, SerializeContext &)
 

Detailed Description

Data Converter interface which can be used to provide a conversion operation from to unrelated C++ types derived class to base class casting is taken care of through the RTTI system so those relations should not be check within this class

Constructor & Destructor Documentation

◆ ~IDataConverter()

virtual AZ::Serialize::IDataConverter::~IDataConverter ( )
virtualdefault

Callback to determine if the supplied convertible type can be stored in an instance of classData

Parameters
convertibleTypeIdtype to check to determine if it can converted to an element of class represent by this Class Data
classDatareference to the metadata representing the type stored in classPtr
Returns
if the classData can store the convertible type element true is returned

Member Function Documentation

◆ CanConvertFromType()

virtual bool AZ::Serialize::IDataConverter::CanConvertFromType ( const TypeId convertibleTypeId,
const SerializeContext::ClassData classData,
SerializeContext  
)
virtual

Callback that can be used to retrieve a memory address in which to store an element of the supplied convertible type

Parameters
convertibleTypePtrresult pointer that should be populated with an address that can store an element of the convertible type
convertibleTypeIdtype to check to determine if it can converted to an element of class represent by this Class Data
classPtrmemory address of the class represented by the @classData type
classDatareference to the metadata representing the type stored in classPtr
Returns
true if a non-null memory address has been returned that can store the convertible type

Reimplemented in AZ::SerializeGenericTypeInfo< Data::Asset< T > >::DataConverter.


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