Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / scenes / FUiScenesScene.cpp
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        FUiScenesScene.cpp
19  * @brief       This is the implementation file of the Scene class.
20  *
21  */
22
23 #include <FUiScenesScene.h>
24 #include <FBaseSysLog.h>
25 #include "FUiScenes_SceneImpl.h"
26
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Ui::Controls;
30
31
32 namespace Tizen { namespace Ui { namespace Scenes
33 {
34
35
36 Scene::Scene(void)
37 {
38         ClearLastResult();
39         __pSceneImpl = new (std::nothrow) _SceneImpl;
40         SysTryReturnVoidResult(NID_UI_SCENES, __pSceneImpl, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
41                                                    GetErrorMessage(E_OUT_OF_MEMORY));
42 }
43
44 Scene::~Scene(void)
45 {
46         delete __pSceneImpl;
47 }
48
49 bool
50 Scene::Equals(const Object& rhs) const
51 {
52         SysAssert(__pSceneImpl != null);
53         return __pSceneImpl->Equals(rhs);
54 }
55
56 int
57 Scene::GetHashCode(void) const
58 {
59         SysAssert(__pSceneImpl != null);
60         return __pSceneImpl->GetHashCode();
61 }
62
63 SceneId
64 Scene::GetSceneId(void) const
65 {
66         SysAssert(__pSceneImpl != null);
67         return __pSceneImpl->GetSceneId();
68 }
69
70 String
71 Scene::GetFormId(void) const
72 {
73         SysAssert(__pSceneImpl != null);
74         return __pSceneImpl->GetFormId();
75 }
76
77 String
78 Scene::GetPanelId(void) const
79 {
80         SysAssert(__pSceneImpl != null);
81         return __pSceneImpl->GetPanelId();
82 }
83
84 Form*
85 Scene::GetForm(void) const
86 {
87         SysAssert(__pSceneImpl != null);
88         return __pSceneImpl->GetForm();
89 }
90
91 Panel*
92 Scene::GetPanel(void) const
93 {
94         SysAssert(__pSceneImpl != null);
95         return __pSceneImpl->GetPanel();
96 }
97
98 } } } // Tizen::Ui::Scenes