Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / public-api / text / character.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // HEADER CLASS
18 #include <dali/public-api/text/character.h>
19
20 // INTERNAL INCLUDES
21 #include <dali/internal/event/text/character-impl.h>
22
23 namespace Dali
24 {
25
26 Character::Character( const Character& character )
27 : mImpl( new Internal::Character( character.mImpl->GetCharacter() ) )
28 {
29 }
30
31 Character& Character::operator=( const Character& character )
32 {
33   if( &character != this )
34   {
35     mImpl->SetCharacter( character.mImpl->GetCharacter() );
36   }
37
38   return *this;
39 }
40
41 Character::~Character()
42 {
43   delete mImpl;
44 }
45
46 bool Character::operator==( const Character& character ) const
47 {
48   return mImpl->GetCharacter() == character.mImpl->GetCharacter();
49 }
50
51 bool Character::operator!=( const Character& character ) const
52 {
53   return mImpl->GetCharacter() != character.mImpl->GetCharacter();
54 }
55
56 Character::CharacterDirection Character::GetCharacterDirection() const
57 {
58   return mImpl->GetCharacterDirection();
59 }
60
61 bool Character::IsWhiteSpace() const
62 {
63   return mImpl->IsWhiteSpace();
64 }
65
66 bool Character::IsNewLine() const
67 {
68   return mImpl->IsNewLine();
69 }
70
71 Character::Character( Internal::Character* impl )
72 : mImpl( impl )
73 {
74 }
75
76 const Internal::Character& Character::GetImplementation() const
77 {
78   return *mImpl;
79 }
80
81 Internal::Character& Character::GetImplementation()
82 {
83   return *mImpl;
84 }
85
86 } // namespace Dali