Adaptor namespaces fixed.
[platform/core/uifw/dali-adaptor.git] / text / dali / internal / text-abstraction / shaping-impl.h
1 #ifndef __DALI_INTERNAL_TEXT_ABSTRACTION_SHAPING_IMPL_H__
2 #define __DALI_INTERNAL_TEXT_ABSTRACTION_SHAPING_IMPL_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-object.h>
23
24 // INTERNAL INCLUDES
25 #include <dali/public-api/text-abstraction/shaping.h>
26
27 namespace Dali
28 {
29
30 namespace TextAbstraction
31 {
32
33 namespace Internal
34 {
35
36 /**
37  * Implementation of the Shaping
38  */
39 class Shaping : public Dali::BaseObject
40 {
41 public:
42
43   /**
44    * Constructor
45    */
46   Shaping();
47
48   /**
49    * Destructor
50    */
51   ~Shaping();
52
53   /**
54    * @copydoc Dali::Shaping::Get()
55    */
56   static TextAbstraction::Shaping Get();
57
58 private:
59
60   // Undefined copy constructor.
61   Shaping( const Shaping& );
62
63   // Undefined assignment constructor.
64   Shaping& operator=( Shaping& );
65
66   void*   mPlugin;  ///< TODO replace this with shaping plugin
67
68 }; // class Shaping
69
70 } // namespace Internal
71
72 } // namespace TextAbstraction
73
74 inline static TextAbstraction::Internal::Shaping& GetImplementation( TextAbstraction::Shaping& shaping )
75 {
76   DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
77   BaseObject& handle = shaping.GetBaseObject();
78   return static_cast<TextAbstraction::Internal::Shaping&>( handle );
79 }
80
81 inline static const TextAbstraction::Internal::Shaping& GetImplementation( const TextAbstraction::Shaping& shaping )
82 {
83   DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
84   const BaseObject& handle = shaping.GetBaseObject();
85   return static_cast<const TextAbstraction::Internal::Shaping&>( handle );
86 }
87
88 } // namespace Dali
89
90 #endif // __DALI_INTERNAL_TEXT_ABSTRACTION_SHAPING_IMPL_H__