Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / base / runtime / FBaseRtEvent.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FBaseRtEvent.cpp
19  * @brief       This is the implementation file for the Event class.
20  *
21  */
22
23 #include <FBaseRtEvent.h>
24 #include <FBaseRtIEventArg.h>
25 #include <FBaseRtIEventListener.h>
26 #include "FBaseRt_EventImpl.h"
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Runtime;
30
31 namespace Tizen { namespace Base { namespace Runtime
32 {
33
34 Event::Event(void)
35         :__pEventImpl(null)
36 {
37         __pEventImpl = new _EventImpl(*this);
38         //__pEventImpl->Initialize();
39 }
40
41 Event::~Event(void)
42 {
43         delete __pEventImpl;
44 }
45
46 result
47 Event::AddListener(IEventListener& listener, bool calledByCallerThread)
48 {
49         return __pEventImpl->AddListener(listener, calledByCallerThread);
50 }
51
52 result
53 Event::RemoveListener(IEventListener& listener)
54 {
55         return __pEventImpl->RemoveListener(listener);
56 }
57
58 result
59 Event::Fire(IEventArg& arg)
60 {
61         return __pEventImpl->Fire(arg);
62 }
63
64 } } } // Tizen::Base::Runtime