1 #ifndef __DALI_INTERNAL_TEXT_ABSTRACTION_SEGMENTATION_IMPL_H__
2 #define __DALI_INTERNAL_TEXT_ABSTRACTION_SEGMENTATION_IMPL_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/base-object.h>
25 #include <dali/devel-api/text-abstraction/segmentation.h>
30 namespace TextAbstraction
37 * Implementation of the Segmentation
40 class Segmentation : public BaseObject
55 * @copydoc Dali::Segmentation::Get()
57 static TextAbstraction::Segmentation Get();
60 * @copydoc Dali::Segmentation::GetLineBreakPositions()
62 void GetLineBreakPositions( const Character* const text,
63 Length numberOfCharacters,
64 LineBreakInfo* breakInfo );
68 * @copydoc Dali::Segmentation::GetWordBreakPositions()
70 void GetWordBreakPositions( const Character* const text,
71 Length numberOfCharacters,
72 WordBreakInfo* breakInfo );
77 * Helper for lazy initialization.
83 // Undefined copy constructor.
84 Segmentation( const Segmentation& );
86 // Undefined assignment constructor.
87 Segmentation& operator=( Segmentation& );
94 }; // class Segmentation
96 } // namespace Internal
98 } // namespace TextAbstraction
100 inline static TextAbstraction::Internal::Segmentation& GetImplementation( TextAbstraction::Segmentation& segmentation )
102 DALI_ASSERT_ALWAYS( segmentation && "segmentation handle is empty" );
103 BaseObject& handle = segmentation.GetBaseObject();
104 return static_cast<TextAbstraction::Internal::Segmentation&>( handle );
107 inline static const TextAbstraction::Internal::Segmentation& GetImplementation( const TextAbstraction::Segmentation& segmentation )
109 DALI_ASSERT_ALWAYS( segmentation && "segmentation handle is empty" );
110 const BaseObject& handle = segmentation.GetBaseObject();
111 return static_cast<const TextAbstraction::Internal::Segmentation&>( handle );
116 #endif // __DALI_INTERNAL_TEXT_ABSTRACTION_SEGMENTATION_IMPL_H__