You.i Engine
CYIScriptableRTTIObject Class Referenceabstract

Detailed Description

The base class for an C++ object that has RTTI information and is accesible from script source code.

Any class that is intended to be bound and accessible from script source code must subclass from this class if it has RTTI defined (if the YI_TYPE_BASES macro is defined in the header). If the class does not have RTTI information defined CYIScriptableObject should be used instead. This class allows the You.i Engine binding implementation to make use of RTTI, if it is available, without adding RTTI to classes which did not already have it.

Note
When subclassing from CYIScriptableRTTIObject the CYIScriptableRTTIObject should not be added to YI_TYPE_BASES. This class is used to provide the RTTI information of the class that is being bound so that the correct CYIBindingImplementation can be created at runtime for the scriptable object instance. Adding CYIScriptableRTTIObject to the YI_TYPE_BASES of the subclass would indicate that a binding implementation for CYIScriptableRTTIObject exists, which is not the case and would not be desirable.

#include <binding/YiScriptableRTTIObject.h>

Inheritance diagram for CYIScriptableRTTIObject:

Public Member Functions

 CYIScriptableRTTIObject ()
 
virtual ~CYIScriptableRTTIObject ()
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const override
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 

Protected Member Functions

virtual std::pair< const CYIRuntimeTypeInfo *, const void * > GetRuntimeTypeInfoWithObject () const =0
 

Constructor & Destructor Documentation

CYIScriptableRTTIObject::CYIScriptableRTTIObject ( )
virtual CYIScriptableRTTIObject::~CYIScriptableRTTIObject ( )
virtual

Member Function Documentation

virtual const CYIRuntimeTypeInfo* CYIScriptableRTTIObject::GetRuntimeTypeInfoForScriptObject ( ) const
overridevirtual

Returns the CYIRunTimeTypeInfo for this scriptable object. Returns null if the object doesn't have RTTI information.

Reimplemented from CYIScriptableObject.

virtual std::pair<const CYIRuntimeTypeInfo*, const void*> CYIScriptableRTTIObject::GetRuntimeTypeInfoWithObject ( ) const
protectedpure virtual

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