Open 3D Engine AzCore API Reference  22.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | Protected Attributes | List of all members
AZ::ReflectContext Class Reference

#include <ReflectContext.h>

Inherited by AZ::BehaviorContext, AZ::JsonRegistrationContext, and AZ::SerializeContext.

Public Member Functions

void EnableRemoveReflection ()
void DisableRemoveReflection ()
bool IsRemovingReflection () const
bool IsOnDemandTypeReflected (AZ::Uuid typeId)
 Check if an OnDemandReflection type's typeid is already reflected.
virtual bool IsTypeReflected (AZ::Uuid) const
void ExecuteQueuedOnDemandReflections ()
 Execute all queued OnDemandReflection calls.

Protected Attributes

bool m_isRemoveReflection
 True if all calls in the context should be considered to remove not to add reflection.
AZStd::unordered_map< AZ::Uuid, AZStd::weak_ptr< Internal::ReflectionFunctionRef > > m_onDemandReflection
 Store the on demand reflect functions so we can avoid double-reflecting something.
AZStd::vector< AZStd::pair< AZ::Uuid, StaticReflectionFunctionPtr > > m_toProcessOnDemandReflection
 OnDemandReflection functions that need to be called.
AZStd::deque< AZ::Uuidm_currentlyProcessingTypeIds
 The type ids of the currently reflecting type. Used to prevent circular references. Is a set to prevent recursive circular references.
friend OnDemandReflectionOwner

Detailed Description

Base class for all reflection contexts. Currently we recommend to follow the following declarative format for all context. (Keep in mind this if only for direct C++ interface, code generators will generate code on the top of this interface) context->Class<TYPE>("Other descriptive parameters") ->Field/Propety("field name",&TYPE::m_field) ->Method("method name),&TYPE::Method) ... We recommend that all ReflectContext implement a path to remove reflection when a reflected class/descriptor is deleted. To do so make sure that when ReflectContext::m_isRemoveReflection is set to true any calls to Class<...>() actualy remove reflection. We recommend this approach so the user can write only one reflection function (not Reflect and "Unreflect")

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