Dali 3D User Interface Engine
object-registry-impl.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_OBJECT_REGISTRY_H__
2 #define __DALI_INTERNAL_OBJECT_REGISTRY_H__
3 
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // INTERNAL INCLUDES
25 
26 namespace Dali
27 {
28 
29 struct Vector2;
30 
31 namespace Internal
32 {
33 
34 namespace SceneGraph
35 {
36 class UpdateManager;
37 }
38 
40 
42 
49 class ObjectRegistry : public BaseObject
50 {
51 public:
52 
56  static ObjectRegistryPtr New();
57 
67  void RegisterObject( Dali::BaseObject* object );
68 
75  void UnregisterObject( Dali::BaseObject* object );
76 
81  {
82  return mObjectCreatedSignal;
83  }
84 
89  {
91  }
92 
102  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
103 
104 private:
105 
109  ObjectRegistry();
110 
114  ~ObjectRegistry();
115 
116 private:
117 
120 
121 };
122 
123 } // namespace Internal
124 
125 // Helpers for public-api forwarding methods
126 
128 {
129  DALI_ASSERT_ALWAYS( objectRegistry && "ObjectRegistry handle is empty" );
130 
131  BaseObject& handle = objectRegistry.GetBaseObject();
132 
133  return static_cast<Internal::ObjectRegistry&>(handle);
134 }
135 
137 {
138  DALI_ASSERT_ALWAYS( objectRegistry && "ObjectRegistry handle is empty" );
139 
140  const BaseObject& handle = objectRegistry.GetBaseObject();
141 
142  return static_cast<const Internal::ObjectRegistry&>(handle);
143 }
144 
145 } // namespace Dali
146 
147 #endif // __DALI_INTERNAL_OBJECT_REGISTRY_H__
Dali Docs Home
Read more about Dali