ezEngine  Milestone 7
ezReflectedClass Class Reference

All classes that should be dynamically reflectable, need to be derived from this base class. More...

#include <DynamicRTTI.h>

Inheritance diagram for ezReflectedClass:

Public Member Functions

EZ_FORCE_INLINE bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_FORCE_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 
virtual void Serialize (ezArchiveWriter &stream) const
 This function is called to serialize the instance. More...
 
virtual void Deserialize (ezArchiveReader &stream)
 This function is called to deserialize the instance. More...
 
virtual void OnDeserialized ()
 This function is called after all objects are deserialized and thus all references to other objects are valid. More...
 

Private Member Functions

 EZ_ADD_DYNAMIC_REFLECTION (ezReflectedClass)
 

Additional Inherited Members

- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 

Detailed Description

All classes that should be dynamically reflectable, need to be derived from this base class.

The only functionality that this class provides is the GetDynamicRTTI() function.

Member Function Documentation

virtual void ezReflectedClass::Deserialize ( ezArchiveReader stream)
inlinevirtual

This function is called to deserialize the instance.

During deserialization only data should be read from the stream. References to other objects will not be valid, thus no setup should take place. Leave this to the OnDeserialized() function.

It should be overridden by deriving classes. In general each overridden version should always call the function of the base class. Only classes directly derived from ezReflectedClass must not do this, due to the assert in the base implementation.

virtual void ezReflectedClass::OnDeserialized ( )
inlinevirtual

This function is called after all objects are deserialized and thus all references to other objects are valid.

This functions should do any object setup that might depend on other objects being available.

It should be overridden by deriving classes. In general each overridden version should always call the function of the base class. Only classes directly derived from ezReflectedClass must not do this, due to the assert in the base implementation.

virtual void ezReflectedClass::Serialize ( ezArchiveWriter stream) const
inlinevirtual

This function is called to serialize the instance.

It should be overridden by deriving classes. In general each overridden version should always call the function of the base class. Only classes directly derived from ezReflectedClass must not do this, due to the assert in the base implementation.


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