2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file FSclRelationship.h
18 * @brief This is the header file for the %Relationship class.
20 * This header file contains the declarations of the %Relationship class.
22 #ifndef _FSCL_RELATIONSHIP_H_
23 #define _FSCL_RELATIONSHIP_H_
25 #include <FBaseResult.h>
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28 #include <FSclTypes.h>
30 namespace Tizen { namespace Social
35 * @brief This class represents a relation.
39 * @final This class is not intended for extension.
41 * The %Relationship class represents a relation. A relation consists of the type, label, and name.
44 class _OSP_EXPORT_ Relationship
45 : public Tizen::Base::Object
49 * This is the default constructor for this class.
56 * Copying of objects using this copy constructor is allowed.
60 * @param[in] rhs An instance of %Relationship to copy
62 Relationship(const Relationship& rhs);
65 * This destructor overrides Tizen::Base::Object::~Object().
69 virtual ~Relationship(void);
72 * Checks whether the value of the specified instance is equal to the value of the current instance of Tizen::Base::Object.
76 * @return @c true if the value of the specified instance of Tizen::Base::Object is equal to the value of the current instance of %Tizen::Base::Object, @n
78 * @param[in] rhs An instance of Tizen::Base::Object to compare
80 virtual bool Equals(const Tizen::Base::Object& rhs) const;
83 * Gets the hash value of the current instance of Tizen::Base::Object.
87 * @return The integer value indicates the hash value of the current instance of Tizen::Base::Object
89 virtual int GetHashCode(void) const;
92 * Gets the relation type.
96 * @return The type of the relation
98 RelationshipType GetType(void) const;
101 * Gets the name of the relative.
105 * @return The name of the relative
107 Tizen::Base::String GetRelativeName(void) const;
110 * Gets the label of the relation.
114 * @return The relation label
117 Tizen::Base::String GetLabel(void) const;
120 * Sets the relation type.
124 * @param[in] type The type of the relation
126 void SetType(RelationshipType type);
129 * Sets the label of the relation.
133 * @param[in] label The relation label
136 void SetLabel(const Tizen::Base::String& label);
139 * Sets the name of the relative.
143 * @param[in] relativeName The name of the relative
145 void SetRelativeName(const Tizen::Base::String& relativeName);
148 * Copying of objects using this copy assignment operator is allowed.
152 * @param[in] rhs An instance of %Relationship to copy
154 Relationship& operator =(const Relationship& rhs);
157 * Checks whether the data in the specified instance of %Relationship is equal to the data in the current instance.
161 * @return @c true if the data in the specified instance equals the data in the current instance, @n
163 * @param[in] rhs An instance of %Relationship
165 bool operator ==(const Relationship& rhs) const;
168 * Checks whether the data in the specified instance of %Relationship is not equal to the data in the current instance.
172 * @return @c true if the data in the specified instance is not equal to the data in the current instance, @n
174 * @param[in] rhs An instance of %Relationship
176 bool operator !=(const Relationship& rhs) const;
179 RelationshipType __type;
180 Tizen::Base::String __label;
181 Tizen::Base::String __name;
183 friend class _RelationshipImpl;
184 class _RelationshipImpl* __pRelationshipImpl;
189 #endif // _FSCL_RELATIONSHIP_H_