Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / base / utility / FBaseUtilLinkInfo.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        FBaseUtilLinkInfo.cpp
19  * @brief       This is the implementation file for the LinkeInfo class.
20  *
21  */
22
23
24 //Includes
25 #include <FBaseUtilLinkInfo.h>
26
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Collection;
30
31 namespace Tizen { namespace Base { namespace Utility
32 {
33
34 LinkInfo::LinkInfo(void)
35         : __linkType(LINK_TYPE_NONE)
36         , __pLinkInfoImpl(null)
37 {
38 }
39
40
41 LinkInfo::LinkInfo(const LinkInfo& value)
42         : __pLinkInfoImpl(null)
43 {
44         __linkType = value.__linkType;
45         __link = value.__link;
46         __text = value.__text;
47 }
48
49
50 LinkInfo::LinkInfo(LinkType linkType, const String& link)
51         : __linkType(linkType)
52         , __link(link)
53         , __text(link)
54         , __pLinkInfoImpl(null)
55 {
56 }
57
58
59 LinkInfo::LinkInfo(LinkType linkType, const String& link, const String& text)
60         : __linkType(linkType)
61         , __link(link)
62         , __text(text)
63         , __pLinkInfoImpl(null)
64 {
65 }
66
67
68 LinkInfo::~LinkInfo(void)
69 {
70 }
71
72
73 LinkInfo&
74 LinkInfo::operator =(const LinkInfo& rhs)
75 {
76         if (&rhs != this)
77         {
78                 __linkType = rhs.__linkType;
79                 __link = rhs.__link;
80                 __text = rhs.__text;
81         }
82         return(*this);
83 }
84
85
86 void
87 LinkInfo::SetLink(const String& link)
88 {
89         __link = link;
90 }
91
92
93 String
94 LinkInfo::GetLink(void) const
95 {
96         return __link;
97 }
98
99
100 void
101 LinkInfo::SetLinkType(LinkType linkType)
102 {
103         __linkType = linkType;
104 }
105
106
107 LinkType
108 LinkInfo::GetLinkType(void) const
109 {
110         return __linkType;
111 }
112
113
114 void
115 LinkInfo::SetText(const String& text)
116 {
117         __text = text;
118 }
119
120
121 String
122 LinkInfo::GetText(void) const
123 {
124         return __text;
125 }
126
127
128 }}}