2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FSclRelationship.h
19 * @brief This is the header file for the %Relationship class.
21 * This header file contains the declarations of the %Relationship class.
23 #ifndef _FSCL_RELATIONSHIP_H_
24 #define _FSCL_RELATIONSHIP_H_
26 #include <FBaseResult.h>
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29 #include <FSclTypes.h>
31 namespace Tizen { namespace Social
36 * @brief This class represents a relation.
40 * @final This class is not intended for extension.
42 * The %Relationship class represents a relation. A relation consists of the type, label, and name.
45 class _OSP_EXPORT_ Relationship
46 : public Tizen::Base::Object
50 * This is the default constructor for this class.
57 * Copying of objects using this copy constructor is allowed.
61 * @param[in] rhs An instance of %Relationship
63 Relationship(const Relationship& rhs);
66 * This destructor overrides Tizen::Base::Object::~Object().
70 virtual ~Relationship(void);
73 * Checks whether the value of the specified instance is equal to the value of the current instance of Tizen::Base::Object.
77 * @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
79 * @param[in] rhs An instance of Tizen::Base::Object to compare
81 virtual bool Equals(const Tizen::Base::Object& rhs) const;
84 * Gets the hash value of the current instance of Tizen::Base::Object.
88 * @return An integer value indicating the hash value of the current instance of Tizen::Base::Object
90 virtual int GetHashCode(void) const;
93 * Gets the relation type.
97 * @return The type of the relation
99 RelationshipType GetType(void) const;
102 * Gets the name of the relative.
106 * @return The name of the relative
108 Tizen::Base::String GetRelativeName(void) const;
111 * Gets the label of the relation.
115 * @return The relation label
118 Tizen::Base::String GetLabel(void) const;
121 * Sets the relation type.
125 * @param[in] type The type of the relation
127 void SetType(RelationshipType type);
130 * Sets the label of a relation.
134 * @param[in] label The relation label
137 void SetLabel(const Tizen::Base::String& label);
140 * Sets the name of the relative.
144 * @param[in] relativeName The name of the relative
146 void SetRelativeName(const Tizen::Base::String& relativeName);
149 * Copying of objects using this copy assignment operator is allowed.
153 * @param[in] rhs An instance of %Relationship
155 Relationship& operator =(const Relationship& rhs);
158 * Checks whether the data in the specified instance of %Relationship is equal to the data in the current instance.
162 * @return @c true if the data in the specified instance equals the data in the current instance, @n
164 * @param[in] rhs An instance of %Relationship
166 bool operator ==(const Relationship& rhs) const;
169 * Checks whether the data in the specified instance of %Relationship is not equal to the data in the current instance.
173 * @return @c true if the data in the specified instance is not equal to the data in the current instance, @n
175 * @param[in] rhs An instance of %Relationship
177 bool operator !=(const Relationship& rhs) const;
180 RelationshipType __type;
181 Tizen::Base::String __label;
182 Tizen::Base::String __name;
184 friend class _RelationshipImpl;
185 class _RelationshipImpl* __pRelationshipImpl;
190 #endif // _FSCL_RELATIONSHIP_H_