Keep node by id + Make SceneGraphTraveler don't travel anymore
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / scene-graph-traveler-interface.h
1 #ifndef DALI_INTERNAL_SCENE_GRAPH_TRAVELER_INTERFACE_H
2 #define DALI_INTERNAL_SCENE_GRAPH_TRAVELER_INTERFACE_H
3
4 /*
5  * Copyright (c) 2024 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
22 #include <dali/internal/update/common/property-owner.h>
23 #include <dali/public-api/common/dali-common.h>
24 #include <dali/public-api/common/intrusive-ptr.h>
25 #include <dali/public-api/common/vector-wrapper.h>
26 #include <dali/public-api/object/ref-object.h>
27
28 namespace Dali
29 {
30 namespace Internal
31 {
32 namespace SceneGraph
33 {
34 class Node;
35 class UpdateManager;
36 } // namespace SceneGraph
37
38 class SceneGraphTravelerInterface;
39 using SceneGraphTravelerInterfacePtr = IntrusivePtr<SceneGraphTravelerInterface>;
40
41 /**
42  * @brief Interface of helper class to travel scene graph.
43  */
44 class SceneGraphTravelerInterface : public Dali::RefObject
45 {
46 public:
47   /**
48    * @brief Construct
49    * @param[in] updateManager The update manager.
50    */
51   SceneGraphTravelerInterface(SceneGraph::UpdateManager& updateManager)
52   : mUpdateManager(updateManager)
53   {
54   }
55
56   /**
57    * @brief Destructor
58    */
59   virtual ~SceneGraphTravelerInterface() = default;
60
61 public:
62   /**
63    * @brief Get SceneGraph::Node pointer from node id.
64    * The way of find & choose mechanism is depend on inherited class.
65    *
66    * @param[in] id The id of node what we want to find.
67    * @return Node pointer, or nullptr if we fail to find it.
68    */
69   virtual SceneGraph::Node* FindNode(uint32_t id) = 0;
70
71 protected:
72   SceneGraph::UpdateManager& mUpdateManager;
73 };
74
75 } // namespace Internal
76
77 } // namespace Dali
78
79 #endif // DALI_INTERNAL_UPDATE_PROXY_SCENE_GRAPH_TRAVELER_H