The base class where binding occurs between C++ and another language.
This class is where the binding occurs for a CYIScriptableObject to another language. This class defines an interface for all binding implementations. If a class is a subclass of a CYIScriptableObject it must also have a subclass of CYIBindingImplementation to be accessible from script source.
#include <binding/YiBindingImplementation.h>

Public Member Functions | |
| CYIBindingImplementation () | |
| virtual | ~CYIBindingImplementation () |
| virtual void | CreateNewScriptObject (CYIBindingContext *pContext, CYIScriptableObject *pScriptableObject, void *pScriptObjectPointer)=0 |
| virtual void | CreateNewScriptObject (CYIBindingContext *pContext, std::shared_ptr< CYIScriptableObject > pScriptableObject, void *pScriptObjectPointer)=0 |
| virtual void | SetIsRooted (bool bIsRooted) |
| virtual bool | IsRooted () const |
| void | BreakObjectLink () |
| CYIScriptableObject * | GetScriptableObject () |
| const std::shared_ptr< CYIScriptableObject > & | GetSharedPtr () |
| std::unique_ptr< CYIScriptableObject > | TakeUniquePtr () |
| void * | GetScriptObject () |
| CYIBindingContext * | GetBindingContext () |
| void | SetBindingContext (CYIBindingContext *pBindingContext) |
| void | SetIsStrongLink (bool bIsStrong) |
| bool | IsStrongLink () const |
Public Member Functions inherited from CYISignalHandler | |
| CYISignalHandler () | |
| CYISignalHandler (const CYISignalHandler &rSignalHandler) | |
| virtual | ~CYISignalHandler () |
| CYISignalHandler & | operator= (const CYISignalHandler &rSignalHandler) |
| void | MoveToThread (CYIThread *pThread) |
| This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More... | |
| CYIThreadHandle | GetThreadAffinity () const |
| void | SetThreadAffinity (const CYIThreadHandle &rThreadAffinity) |
| virtual bool | IsConnected () const |
| virtual bool | IsConnected (const CYISignalBase &rSignal) const |
| void | Disconnect (CYISignalBase &rSignal) |
| void | DisconnectFromAllSignals () |
Public Member Functions inherited from CYIThread::Listener | |
| Listener () | |
| virtual | ~Listener () |
| virtual void | OnThreadStarted (CYIThread *) |
| virtual void | OnThreadTerminated (CYIThread *) |
| virtual void | OnThreadFinished (CYIThread *) |
Protected Attributes | |
| CYIString | m_TemplateName |
| CYIString | m_TemplateNamespace |
| CYIBindingContext * | m_pBindingContext |
| void * | m_pScriptObjectPointer |
| CYIScriptableObject * | m_pScriptableObject |
| std::shared_ptr< CYIScriptableObject > | m_pScriptableObjectSharedPtr |
| CYIBindingImplementation::CYIBindingImplementation | ( | ) |
|
virtual |
| void CYIBindingImplementation::BreakObjectLink | ( | ) |
Removes any link between the binding implementation and the script object as well as the C++ scriptable object. This includes clearing the rooted state of the scriptable object if it was rooted. This is called when a CYIScriptableObject is destroyed and is only inteded to be used with the assumption that the CYIScriptableObject has been cleaned up externally. Calling this method without cleaning up the associated CYIScriptableObject at some point will result in memory leaks.
|
pure virtual |
Creates a new script object if pScriptObjectPointer is null. pScriptObjectPointer is the pointer to the script object in memory that is managed by the binding engine. The script object is then associated with the C++ object, pScriptableObject, so that it accessible when receiving calls from the script layer.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in CYIDTBindingImplementation.
|
pure virtual |
Implemented in CYIDTBindingImplementation.
| CYIBindingContext* CYIBindingImplementation::GetBindingContext | ( | ) |
Returns the binding context associated with this binding implementation.
| CYIScriptableObject* CYIBindingImplementation::GetScriptableObject | ( | ) |
Returns the C++ scriptable object associated with this binding implementation.
| void* CYIBindingImplementation::GetScriptObject | ( | ) |
Returns the pointer to the script object in memory that was either created by or passed into CreateNewScriptObject().
| const std::shared_ptr<CYIScriptableObject>& CYIBindingImplementation::GetSharedPtr | ( | ) |
Returns the C++ scriptable object associated with this binding implementation.
|
virtual |
Returns true if the script object associated with this binding implemented is rooted.
| bool CYIBindingImplementation::IsStrongLink | ( | ) | const |
Returns true if this binding implementation holds a strong link to its associated CYIScriptablObject.
| void CYIBindingImplementation::SetBindingContext | ( | CYIBindingContext * | pBindingContext | ) |
Sets the binding context associated with this binding implementation.
|
virtual |
Sets the script object associated with this binding implementation to rooted. If bIsRooted is true the script object will be kept in memory until set to false, the associated CYIBindingContext is destroyed, or the associated CYIScriptableObject is destroyed. If bIsRooted is false the script object will be destroyed as soon as the script object goes out of scope in the script source code. When the script object is destroyed this binding implementation will be destroyed.
Defaults to false.
Reimplemented in CYIDTBindingImplementation.
| void CYIBindingImplementation::SetIsStrongLink | ( | bool | bIsStrong | ) |
Sets whether this binding implementation holds a strong link to its associated CYIScriptableObject. If bIsStrong is true the associated CYIScriptableObject will be cleaned up when the binding implementation is destroyed, otherwise the associated CYIScriptableObject will remain in memory.
Defaults to false.
| std::unique_ptr<CYIScriptableObject> CYIBindingImplementation::TakeUniquePtr | ( | ) |
Returns the C++ scriptable object associated with this binding implementation. Calling this function will relinquish ownership of the C++ scriptable object.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |