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::SerializeGenericTypeInfo< ValueType > Struct Template Reference

#include <SerializeContext.h>

Public Types

using ClassInfoType = GenericClassInfo
 

Static Public Member Functions

static GenericClassInfoGetGenericInfo ()
 By default we don't have generic class info.
 
static constexpr Uuid GetClassTypeId ()
 By default just return the ValueTypeInfo.
 

Detailed Description

template<class ValueType>
struct AZ::SerializeGenericTypeInfo< ValueType >

When it comes down to template classes you have 2 choices for serialization. You can register the fully specialized type (like MyClass<int>) and use it this way. This is the most flexible and recommended way. But often when you use template containers, pool, helpers in a big project... it might be tricky to preregister all template specializations and make sure there are no duplications. This is why we allow to specialize a template and by doing so providing a generic type, that will apply to all specializations, but it will be used on template use (registered with the "Field" function). While this works fine, it's a little limiting as it relies that on the fact that each class field should have unique name (which is required by the system, to properly identify an element anyway). At the moment


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