OW_StrictWeakOrdering.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2003-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00035 #ifndef OW_STRICT_WEAK_ORDERING_HPP_INCLUDE_GUARD_
00036 #define OW_STRICT_WEAK_ORDERING_HPP_INCLUDE_GUARD_
00037 #include "OW_config.h"
00038 
00039 namespace OW_NAMESPACE
00040 {
00041 
00042 template<class T1>
00043 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1)
00044 {
00045    return lhs1 < rhs1;
00046 }
00047 template<class T1, class T2>
00048 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00049       const T2& lhs2, const T2& rhs2)
00050 {
00051    if (lhs1 < rhs1) return true;
00052    else if (rhs1 < lhs1) return false;
00053    else return StrictWeakOrdering(lhs2, rhs2);
00054 }
00055 template<class T1, class T2, class T3>
00056 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00057       const T2& lhs2, const T2& rhs2,
00058       const T3& lhs3, const T3& rhs3)
00059 {
00060    if (lhs1 < rhs1) return true;
00061    else if (rhs1 < lhs1) return false;
00062    else return StrictWeakOrdering(lhs2, rhs2,
00063          lhs3, rhs3);
00064 }
00065 template<class T1, class T2, class T3, class T4>
00066 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00067       const T2& lhs2, const T2& rhs2,
00068       const T3& lhs3, const T3& rhs3,
00069       const T4& lhs4, const T4& rhs4)
00070 {
00071    if (lhs1 < rhs1) return true;
00072    else if (rhs1 < lhs1) return false;
00073    else return StrictWeakOrdering(lhs2, rhs2,
00074          lhs3, rhs3,
00075          lhs4, rhs4);
00076 }
00077 template<class T1, class T2, class T3, class T4, class T5>
00078 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00079       const T2& lhs2, const T2& rhs2,
00080       const T3& lhs3, const T3& rhs3,
00081       const T4& lhs4, const T4& rhs4,
00082       const T5& lhs5, const T5& rhs5)
00083 {
00084    if (lhs1 < rhs1) return true;
00085    else if (rhs1 < lhs1) return false;
00086    else return StrictWeakOrdering(lhs2, rhs2,
00087          lhs3, rhs3,
00088          lhs4, rhs4,
00089          lhs5, rhs5);
00090 }
00091 template<class T1, class T2, class T3, class T4, class T5, class T6>
00092 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00093       const T2& lhs2, const T2& rhs2,
00094       const T3& lhs3, const T3& rhs3,
00095       const T4& lhs4, const T4& rhs4,
00096       const T5& lhs5, const T5& rhs5,
00097       const T6& lhs6, const T6& rhs6)
00098 {
00099    if (lhs1 < rhs1) return true;
00100    else if (rhs1 < lhs1) return false;
00101    else return StrictWeakOrdering(lhs2, rhs2,
00102          lhs3, rhs3,
00103          lhs4, rhs4,
00104          lhs5, rhs5,
00105          lhs6, rhs6);
00106 }
00107 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00108 T7>
00109 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00110       const T2& lhs2, const T2& rhs2,
00111       const T3& lhs3, const T3& rhs3,
00112       const T4& lhs4, const T4& rhs4,
00113       const T5& lhs5, const T5& rhs5,
00114       const T6& lhs6, const T6& rhs6,
00115       const T7& lhs7, const T7& rhs7)
00116 {
00117    if (lhs1 < rhs1) return true;
00118    else if (rhs1 < lhs1) return false;
00119    else return StrictWeakOrdering(lhs2, rhs2,
00120          lhs3, rhs3,
00121          lhs4, rhs4,
00122          lhs5, rhs5,
00123          lhs6, rhs6,
00124          lhs7, rhs7);
00125 }
00126 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00127 T7, class T8>
00128 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00129       const T2& lhs2, const T2& rhs2,
00130       const T3& lhs3, const T3& rhs3,
00131       const T4& lhs4, const T4& rhs4,
00132       const T5& lhs5, const T5& rhs5,
00133       const T6& lhs6, const T6& rhs6,
00134       const T7& lhs7, const T7& rhs7,
00135       const T8& lhs8, const T8& rhs8)
00136 {
00137    if (lhs1 < rhs1) return true;
00138    else if (rhs1 < lhs1) return false;
00139    else return StrictWeakOrdering(lhs2, rhs2,
00140          lhs3, rhs3,
00141          lhs4, rhs4,
00142          lhs5, rhs5,
00143          lhs6, rhs6,
00144          lhs7, rhs7,
00145          lhs8, rhs8);
00146 }
00147 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00148 T7, class T8, class T9>
00149 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00150       const T2& lhs2, const T2& rhs2,
00151       const T3& lhs3, const T3& rhs3,
00152       const T4& lhs4, const T4& rhs4,
00153       const T5& lhs5, const T5& rhs5,
00154       const T6& lhs6, const T6& rhs6,
00155       const T7& lhs7, const T7& rhs7,
00156       const T8& lhs8, const T8& rhs8,
00157       const T9& lhs9, const T9& rhs9)
00158 {
00159    if (lhs1 < rhs1) return true;
00160    else if (rhs1 < lhs1) return false;
00161    else return StrictWeakOrdering(lhs2, rhs2,
00162          lhs3, rhs3,
00163          lhs4, rhs4,
00164          lhs5, rhs5,
00165          lhs6, rhs6,
00166          lhs7, rhs7,
00167          lhs8, rhs8,
00168          lhs9, rhs9);
00169 }
00170 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00171 T7, class T8, class T9, class T10>
00172 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00173       const T2& lhs2, const T2& rhs2,
00174       const T3& lhs3, const T3& rhs3,
00175       const T4& lhs4, const T4& rhs4,
00176       const T5& lhs5, const T5& rhs5,
00177       const T6& lhs6, const T6& rhs6,
00178       const T7& lhs7, const T7& rhs7,
00179       const T8& lhs8, const T8& rhs8,
00180       const T9& lhs9, const T9& rhs9,
00181       const T10& lhs10, const T10& rhs10)
00182 {
00183    if (lhs1 < rhs1) return true;
00184    else if (rhs1 < lhs1) return false;
00185    else return StrictWeakOrdering(lhs2, rhs2,
00186          lhs3, rhs3,
00187          lhs4, rhs4,
00188          lhs5, rhs5,
00189          lhs6, rhs6,
00190          lhs7, rhs7,
00191          lhs8, rhs8,
00192          lhs9, rhs9,
00193          lhs10, rhs10);
00194 }
00195 
00196 } // end namespace OW_NAMESPACE
00197 
00198 #endif

Generated on Thu Feb 9 08:48:16 2006 for openwbem by  doxygen 1.4.6