Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_UiBuilderControlTable.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18 * @file    FUi_UiBuilderControlTable.h
19 * @brief      This is the header file for the %_UiBuilderControlMakerTable class.
20 *
21 * This header file contains the declarations of the %_UiBuilderControlMakerTable class.
22 */
23
24 #ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_TABLE_H_
25 #define _FUI_INTERNAL_UI_BUILDER_CONTROL_TABLE_H_
26
27 #include "FUi_UiBuilderConfig.h"
28 #include "FUi_UiBuilderControlMaker.h"
29
30 namespace Tizen { namespace Ui
31 {
32
33 typedef _UiBuilderControlMaker* (*_UiBuilderControlMakerFunctionPointer)(_UiBuilder* uibuilder);
34 /**
35 * @class   _UiBuilderControlMakerTable
36 * @brief      This class is an implementation of a %_UiBuilderControlMakerTable.
37 * @since 2.0
38 *
39 * The %_UiBuilderControlTable Class contains that information for controls' maker.
40 *
41 *
42 */
43
44 class _UiBuilderControlTableInFomation
45 {
46 public:
47          Tizen::Base::String __controlMakerName;
48         _UiBuilderControlMakerFunctionPointer __pContolMakerFunctionPointer;
49 };
50
51
52 class _UiBuilderControlTable
53         : public Tizen::Base::Object
54 {
55 public:
56         _UiBuilderControlTable(void);
57         virtual ~_UiBuilderControlTable(void);
58
59 private:
60         _UiBuilderControlTable(const _UiBuilderControlTable&);
61         _UiBuilderControlTable& operator =(const _UiBuilderControlTable&);
62
63 public:
64         Tizen::Base::Collection::ArrayListT<_UiBuilderControlTableInFomation*>* __pUiBuilderControlTableInFomationList;
65 };
66
67 class _OSP_EXPORT_ _UiBuilderControlTableManager
68         : public Tizen::Base::Object
69 {
70 public:
71         _UiBuilderControlTableManager(void);
72         virtual ~_UiBuilderControlTableManager(void);
73         result Construct(void);
74         void RegisterControl(const Tizen::Base::String& controlMakerName, _UiBuilderControlMakerFunctionPointer pControlMakerFunctionPointer);
75         void UnregisterControl(const Tizen::Base::String& controlMakerName);
76         Tizen::Base::String GetName(int index) const;
77         _UiBuilderControlMakerFunctionPointer GetControlMaker(int index) const;
78         static _UiBuilderControlTableManager* GetInstance(void);
79         _UiBuilderControlTable* GetControlTable() const;
80
81 private:
82         _UiBuilderControlTableManager(const _UiBuilderControlTableManager& rhs);
83         _UiBuilderControlTableManager& operator =(const _UiBuilderControlTableManager& rhs);
84 private:
85          _UiBuilderControlTable* __pControlTable;
86 }; // _UiBuilderControlTable
87
88 } }  // Tizen::Ui
89
90 #endif  //_FUI_INTERNAL_UI_BUILDER_CONTROL_TABLE_H_