XII Release 0.1.0
Loading...
Searching...
No Matches
xiiCustomData Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <CustomData.h>

Inheritance diagram for xiiCustomData:
[legend]

Public Member Functions

virtual void Load (class xiiAbstractObjectGraph &ref_graph, class xiiRttiConverterContext &ref_context, const class xiiAbstractObjectNode *pRootNode)
Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTI * GetDynamicRTTI () const
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.

Additional Inherited Members

Static Public Member Functions inherited from xiiNoBase
static const xiiRTTI * GetStaticRTTI ()

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

A base class for user-defined data assets.

Allows users to define their own asset types that can be created, edited and referenced in the editor without writing an editor plugin.

In order to do that, subclass xiiCustomData, and put the macro XII_DECLARE_CUSTOM_DATA_RESOURCE(YourCustomData) into the header next to your custom type. Also put the macro XII_DEFINE_CUSTOM_DATA_RESOURCE(YourCustomData) into the implementation file.

Those will also define resource and resource handle types, such as YourCustomDataResource and YourCustomDataResourceHandle.

For a full example see SampleCustomData in the SampleGamePlugin.

Member Function Documentation

◆ Load()

void xiiCustomData::Load ( class xiiAbstractObjectGraph & ref_graph,
class xiiRttiConverterContext & ref_context,
const class xiiAbstractObjectNode * pRootNode )
virtual

Loads the serialized custom data using a robust serialization-based method.

This function does not need to be overridden. It will work, even if the properties change. It is only virtual in case you want to hook into the deserialization process.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Core/Utils/CustomData.h
  • /home/runner/work/XII/XII/Source/Engine/Core/Utils/Implementation/CustomData.cpp