Plasma Engine  2.0
Loading...
Searching...
No Matches
plDynamicDefaultValueAttribute Class Reference

Add this attribute to an embedded class or container property to make it retrieve its default values from a dynamic meta info object on an asset. More...

#include <PropertyAttributes.h>

Inheritance diagram for plDynamicDefaultValueAttribute:

Public Member Functions

 plDynamicDefaultValueAttribute (const char *szClassSource, const char *szClassType, const char *szClassProperty=nullptr)
 
const char * GetClassSource () const
 
const char * GetClassType () const
 
const char * GetClassProperty () const
 
- Public Member Functions inherited from plReflectedClass
virtual const plRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const plRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
PL_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 plNoBase
static const plRTTIGetStaticRTTI ()
 

Detailed Description

Add this attribute to an embedded class or container property to make it retrieve its default values from a dynamic meta info object on an asset.

The default values are retrieved from the asset meta data of the currently set asset on that property.

Usage: PL_ACCESSOR_PROPERTY("Skeleton", GetSkeletonFile, SetSkeletonFile)->AddAttributes(new plAssetBrowserAttribute("Skeleton")),

// Use this if the embedded class m_SkeletonMetaData is of type plSkeletonMetaData. PL_MEMBER_PROPERTY("SkeletonMetaData", m_SkeletonMetaData)->AddAttributes(new plDynamicDefaultValueAttribute("Skeleton", "plSkeletonMetaData")),

// Use this if you don't want embed the entire meta object but just some container of it. In this case the LocalBones container must match in type to the property 'BonesArrayNameInMetaData' in the meta data type 'plSkeletonMetaData'. PL_MAP_MEMBER_PROPERTY("LocalBones", m_Bones)->AddAttributes(new plDynamicDefaultValueAttribute("Skeleton", "plSkeletonMetaData", "BonesArrayNameInMetaData")),


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