91df714afaca65da08dc57da919516f08b7b21cd
[platform/core/uifw/aurum.git] / libaurum / inc / Comparer.h
1 #ifndef COMPARER_H
2 #define COMPARER_H
3 #include "config.h"
4
5 #include "AccessibleNode.h"
6 #include "UiDevice.h"
7 #include "UiSelector.h"
8
9 #include "PartialMatch.h"
10
11 #include <list>
12 #include <memory>
13 #include <vector>
14
15 /**
16  * @brief Comparer class
17  * @since_tizen 5.5
18  */
19 class Comparer {
20 private:
21     /**
22      * @brief TBD
23      * @since_tizen 5.5
24      */
25     Comparer(const std::shared_ptr<UiDevice> device, const std::shared_ptr<UiSelector> selector,
26              const bool &earlyReturn);
27
28     /**
29      * @brief TBD
30      * @since_tizen 5.5
31      */
32     ~Comparer();
33
34 public:
35     /**
36      * @brief TBD
37      * @since_tizen 5.5
38      */
39     static std::shared_ptr<AccessibleNode>             findObject(const std::shared_ptr<UiDevice> device,
40                                                     const std::shared_ptr<UiSelector> selector,
41                                                     const std::shared_ptr<AccessibleNode> root);
42
43     /**
44      * @brief TBD
45      * @since_tizen 5.5
46      */
47     static std::vector<std::shared_ptr<AccessibleNode>> findObjects(
48         const std::shared_ptr<UiDevice> device, const std::shared_ptr<UiSelector> selector,
49         const std::shared_ptr<AccessibleNode> root);
50
51 private:
52     /**
53      * @brief TBD
54      * @since_tizen 5.5
55      */
56     std::vector<std::shared_ptr<AccessibleNode>> findObjects(const std::shared_ptr<AccessibleNode> root);
57
58     /**
59      * @brief TBD
60      * @since_tizen 5.5
61      */
62     std::vector<std::shared_ptr<AccessibleNode>> findObjects(
63         const std::shared_ptr<AccessibleNode> root, const int &index, const int &depth,
64         std::list<std::shared_ptr<PartialMatch>> &partialMatches);
65
66 private:
67     /**
68      * @brief TBD
69      * @since_tizen 5.5
70      */
71    /* std::unique_ptr<PartialMatch> accept(const AccessibleNode *node,
72                                          const std::shared_ptr<UiSelector> selector,
73                                          const int &index, const int &depth,
74                                          const int &relDepth);
75 */
76 private:
77     /**
78      * @brief TBD
79      */
80     const std::shared_ptr<UiDevice> mDevice;
81
82     /**
83      * @brief TBD
84      */
85     const std::shared_ptr<UiSelector> mSelector;
86
87     /**
88      * @brief TBD
89      */
90     bool              mEarlyReturn;
91 };
92
93 #endif