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.
18 * @file FBaseLongLongComparer.h
19 * @brief This is the header file for the %LongLongComparer class.
21 * @see Long and Tizen::Base::Collection::IComparer
23 * This header file contains the declarations of the %LongLongComparer class.
25 #ifndef _FBASE_LONG_LONG_COMPARER_H_
26 #define _FBASE_LONG_LONG_COMPARER_H_
28 #include <FBaseTypes.h>
29 #include <FBaseObject.h>
30 #include <FBaseColIComparer.h>
32 namespace Tizen { namespace Base
35 * @class LongLongComparer
36 * @brief This class checks for equivalence between 2 instances of the %LongLong type.
40 * The %LongLongComparer class checks for equivalence between 2 instances of the %LongLong type.
42 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/collection_comparison.htm">Collection Comparisons</a>.
44 * The following example demonstrates how to use the %LongComparer class.
50 * using namespace Tizen::Base;
53 * MyClass::LongLongComparerSample(void)
57 * LongLongComparer comparer;
60 * comparer.Compare(ll1, ll2, cmp);
68 class _OSP_EXPORT_ LongLongComparer
70 , public virtual Tizen::Base::Collection::IComparer
74 * This is the default constructor for this class.
78 LongLongComparer(void);
81 * This destructor overrides Tizen::Base::Object::~Object().
85 virtual ~LongLongComparer(void);
88 * Compares two given instances of type LongLong.
91 * @return An error code
92 * @param[in] obj1 The first instance of type LongLong
93 * @param[in] obj2 The second instance of type LongLong
94 * @param[out] cmp The result of comparison
95 * @exception E_SUCCESS The method is successful.
96 * @exception E_INVALID_ARG The specified object instances are not of the expected type.
97 * @remarks The value of @c cmp can be:
100 * < 0 if the value of @c obj1 is less than the value of @c obj2
101 * == 0 if the value of @c obj1 is equal to the value of @c obj2
102 * > 0 if the value of @c obj1 is greater than the value of @c obj2
105 virtual result Compare(const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const;
110 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
112 LongLongComparer(const LongLongComparer& obj);
115 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
117 LongLongComparer& operator =(const LongLongComparer& rhs);
119 friend class _LongLongComparerImpl;
120 class _LongLongComparerImpl* __pLongLongComparerImpl;
122 }; // LongLongComparer
126 #endif // _FBASE_LONG_LONG_COMPARER_H_