You.i Engine
YiNodeAdapter.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_NODE_ADAPTER_H_
3 #define _YI_NODE_ADAPTER_H_
4 
6 #include "signal/YiSignal.h"
7 #include "utility/YiRtti.h"
8 
9 #include <glm/fwd.hpp>
10 
11 class CYISceneManager;
12 class CYISceneNode;
14 
32 {
33 public:
35  virtual ~CYINodeAdapter();
36 
43  virtual uint32_t GetItemsCount() const = 0;
44 
48  virtual glm::vec3 GetInitialNodeSize(uint32_t uIndex) const = 0;
49 
60  virtual void ConfigureProperties(uint32_t uIndex, CYISceneNode *pNode) const;
61 
70  IYIPropertiesSource *GetProperties(const CYIString &viewTemplateName) const;
71 
81  void SetProperties(const std::map<CYIString, IYIPropertiesSource *> &properties);
82 
88  virtual std::unique_ptr<CYISceneNode> BuildNode(uint32_t uIndex, CYISceneManager *pSceneManager) = 0;
89 
97  virtual void ReleaseNode(uint32_t uIndex, std::unique_ptr<CYISceneNode> pNode) = 0;
98 
104  CYISignal<uint32_t /* uIndex */> ItemAddedAtIndex;
105 
109  CYISignal<uint32_t /* uIndex */> ItemRemovedAtIndex;
110 
116  CYISignal<uint32_t /* uFromIndex */, uint32_t /* uToIndex */> ItemMoved;
117 
118 private:
119  std::map<CYIString, IYIPropertiesSource *> m_properties;
120 
122 };
123 
128 #endif // _YI_NODE_ADAPTER_H_
Scene trees composed of CYISceneNode objects are registered with the scene manager in order for them ...
Definition: YiSceneManager.h:73
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
virtual void ReleaseNode(uint32_t uIndex, std::unique_ptr< CYISceneNode > pNode)=0
CYISignal< uint32_t > ItemAddedAtIndex
Definition: YiNodeAdapter.h:104
virtual glm::vec3 GetInitialNodeSize(uint32_t uIndex) const =0
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
void SetProperties(const std::map< CYIString, IYIPropertiesSource * > &properties)
virtual uint32_t GetItemsCount() const =0
Provides an interface for supplying and reclaiming nodes to and from CYIStreamer. ...
Definition: YiNodeAdapter.h:31
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:114
An interface to a class that provides key-value properties.
Definition: YiPropertiesSource.h:17
CYISignal< uint32_t, uint32_t > ItemMoved
Definition: YiNodeAdapter.h:116
This file contains the classes and macros used to implement RTTI in You.i Engine. ...
virtual std::unique_ptr< CYISceneNode > BuildNode(uint32_t uIndex, CYISceneManager *pSceneManager)=0
Signals and slots are a thread-safe and flexible communication framework that will allow various obje...
Definition: YiSignal.h:164
virtual void ConfigureProperties(uint32_t uIndex, CYISceneNode *pNode) const
CYISignal< uint32_t > ItemRemovedAtIndex
Definition: YiNodeAdapter.h:109
virtual ~CYINodeAdapter()
IYIPropertiesSource * GetProperties(const CYIString &viewTemplateName) const