fd616bf4d1991c5c97da295054efbb92c8e041c9
[platform/core/uifw/dali-adaptor.git] / platform-abstractions / slp / dynamics / dynamics-factory.h
1 #ifndef __DYNAMICS_FACTORY_H__
2 #define __DYNAMICS_FACTORY_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // EXTERNAL INCLUDES
21 #include <dali/integration-api/dynamics/dynamics-factory-intf.h>
22
23 // INTERNAL INCLUDES
24
25 namespace Dali
26 {
27
28 namespace SlpPlatform
29 {
30
31 /**
32  *
33  */
34 class DynamicsFactory : public Integration::DynamicsFactory
35 {
36 public:
37   /**
38    * Constructor
39    */
40   DynamicsFactory();
41
42   /**
43    * Destructor
44    */
45   virtual ~DynamicsFactory();
46
47   /**
48    * @copydoc Dali::Integration::DynamicsFactory::InitializeDynamics
49    */
50   bool InitializeDynamics( const Integration::DynamicsWorldSettings& worldSettings );
51
52   /**
53    * @copydoc Dali::Integration::DynamicsFactory::TerminateDynamics
54    */
55   void TerminateDynamics();
56
57   /**
58    * @copydoc Dali::Integration::DynamicsFactory::CreateDynamicsWorld
59    */
60   Integration::DynamicsWorld* CreateDynamicsWorld();
61
62   /**
63    * @copydoc Dali::Integration::DynamicsFactory::CreateDynamicsBody
64    */
65   virtual Integration::DynamicsBody* CreateDynamicsBody();
66
67   /**
68    * @copydoc Dali::Integration::DynamicsFactory::CreateDynamicsJoint
69    */
70   virtual Integration::DynamicsJoint* CreateDynamicsJoint();
71
72   /**
73    * @copydoc Dali::Integration::DynamicsFactory::CreateDynamicsShape
74    */
75   virtual Integration::DynamicsShape* CreateDynamicsShape();
76
77 private:
78   void* mHandle;    ///< The handle to the open shared object library
79
80   typedef Integration::DynamicsWorld* (*CreateDynamicsWorldFunction)();
81   typedef Integration::DynamicsBody* (*CreateDynamicsBodyFunction)();
82   typedef Integration::DynamicsJoint* (*CreateDynamicsJointFunction)();
83   typedef Integration::DynamicsShape* (*CreateDynamicsShapeFunction)();
84
85   CreateDynamicsWorldFunction mCreateDynamicsWorld;
86   CreateDynamicsBodyFunction mCreateDynamicsBody;
87   CreateDynamicsJointFunction mCreateDynamicsJoint;
88   CreateDynamicsShapeFunction mCreateDynamicsShape;
89
90 }; // class DynamicsFactory
91
92 } // namespace SlpPlatform
93
94 } // namespace Dali
95
96 #endif // __DYNAMICS_FACTORY_H__