An CYINodeAdapter implementation that delegates its responsibilities to a CYIDelegatingNodeAdapter::Delegate implementation.
CYIDelegatingNodeAdapter allows the extension of existing classes, such as a CYIAbstractScreenViewController subclass, with CYINodeAdapter responsibilities. The adapter does not take ownership of the delegate and so the delegate may be re-used across adapter instances.
In order to make use of this adapter, extend CYIDelegatingNodeAdapter::Delegate and construct this adapter with the delegate implementation.
#include <streamer/YiDelegatingNodeAdapter.h>

Classes | |
| class | Delegate |
Public Member Functions | |
| CYIDelegatingNodeAdapter (Delegate *pDelegate) | |
| virtual | ~CYIDelegatingNodeAdapter () |
| Delegate * | GetDelegate () const |
| virtual uint32_t | GetItemsCount () const override |
| virtual glm::vec3 | GetInitialNodeSize (uint32_t uIndex) const override |
| virtual std::unique_ptr< CYISceneNode > | BuildNode (uint32_t uIndex, CYISceneManager *pSceneManager) override |
| virtual void | ReleaseNode (uint32_t uIndex, std::unique_ptr< CYISceneNode > pNode) override |
Public Member Functions inherited from CYINodeAdapter | |
| CYINodeAdapter () | |
| virtual | ~CYINodeAdapter () |
| virtual void | ConfigureProperties (uint32_t uIndex, CYISceneNode *pNode) const |
| IYIPropertiesSource * | GetProperties (const CYIString &viewTemplateName) const |
| void | SetProperties (const std::map< CYIString, IYIPropertiesSource * > &properties) |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const |
Additional Inherited Members | |
Public Attributes inherited from CYINodeAdapter | |
| CYISignal< uint32_t > | ItemAddedAtIndex |
| CYISignal< uint32_t > | ItemRemovedAtIndex |
| CYISignal< uint32_t, uint32_t > | ItemMoved |
| CYIDelegatingNodeAdapter::CYIDelegatingNodeAdapter | ( | Delegate * | pDelegate | ) |
Creates a new delegate adapter using delegate pDelegate. pDelegate must be non-null. The created object does not take ownership of the provided pointer.
|
virtual |
|
overridevirtual |
Override to provide the node representing the visual subtree at 0-based uIndex. This may be a newly constructed CYISceneNode or one that is recycled, so long as it is fully initialized. The same CYISceneNode may not be re-used until CYINodeAdapter::ReleaseNode is called at which point the implementation is free to deallocate or recycle the node.
Implements CYINodeAdapter.
| Delegate* CYIDelegatingNodeAdapter::GetDelegate | ( | ) | const |
Returns the delegate assigned to this adapter.
|
overridevirtual |
Override to return the initial node size for 0-based adapter index uIndex. This is only used when items are initially added and does not need to reflect changes in size.
Implements CYINodeAdapter.
|
overridevirtual |
Returns the number of items managed by this adapter. This may be queried throughout the lifetime of the adapter and must report the correct value as items are added and removed. The number of items will be used to produce the 0-based consecutive indices. Indices may be invalidated when the number of items have changed and may no longer correspond to the same visual representations.
Implements CYINodeAdapter.
|
overridevirtual |
Override to reclaim ownership of pNode, which represents the visual subtree at uIndex. pNode may be recycled or destroyed.
Implements CYINodeAdapter.