Key.h

00001 
00002 // The Loki Library
00003 // Copyright (c) 2006 by Guillaume Chatelet
00004 //
00005 // Code covered by the MIT License
00006 //
00007 // Permission to use, copy, modify, distribute and sell this software for any 
00008 // purpose is hereby granted without fee, provided that the above copyright 
00009 // notice appear in all copies and that both that copyright notice and this 
00010 // permission notice appear in supporting documentation.
00011 //
00012 // The authors make no representations about the suitability of this software
00013 // for any purpose. It is provided "as is" without express or implied warranty.
00014 //
00015 // This code DOES NOT accompany the book:
00016 // Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
00017 //     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
00018 //
00020 #ifndef LOKI_KEY_INC_
00021 #define LOKI_KEY_INC_
00022 
00023 // $Id: Key.h 771 2006-10-27 18:05:03Z clitte_bbt $
00024 
00025 
00026 #include <loki/Factory.h>
00027 
00028 namespace Loki
00029 {
00030 
00031      template<
00032          class Factory,
00033          typename IdentifierType
00034      >
00035      class Key;
00036 
00037     template<class F, typename I>
00038     bool operator==(const Key<F, I> &k1, const Key<F, I> &k2);
00039 
00040     template<class F, typename I>
00041     bool operator<(const Key<F, I> &k1, const Key<F, I> &k2);
00042         
00043 
00047      template<
00048          class Factory,
00049          typename IdentifierType
00050      >
00051      class Key
00052      {
00053         typedef typename Factory::Parm1 Parm1;
00054         typedef typename Factory::Parm2 Parm2;
00055         typedef typename Factory::Parm3 Parm3;
00056         typedef typename Factory::Parm4 Parm4;
00057         typedef typename Factory::Parm5 Parm5;
00058         typedef typename Factory::Parm6 Parm6;
00059         typedef typename Factory::Parm7 Parm7;
00060         typedef typename Factory::Parm8 Parm8;
00061         typedef typename Factory::Parm9 Parm9;
00062         typedef typename Factory::Parm10 Parm10;
00063         typedef typename Factory::Parm11 Parm11;
00064         typedef typename Factory::Parm12 Parm12;
00065         typedef typename Factory::Parm13 Parm13;
00066         typedef typename Factory::Parm14 Parm14;
00067         typedef typename Factory::Parm15 Parm15;
00068      public:
00069         // member variables
00070         int count; // should be const, but constness prevent default copy ctor
00071         IdentifierType id;
00072         Parm1  p1;
00073         Parm2  p2;
00074         Parm3  p3;
00075         Parm4  p4;
00076         Parm5  p5;
00077         Parm6  p6;
00078         Parm7  p7;
00079         Parm8  p8;
00080         Parm9  p9;
00081         Parm10 p10;
00082         Parm11 p11;
00083         Parm12 p12;
00084         Parm13 p13;
00085         Parm14 p14;
00086         Parm15 p15;
00087         
00088         // member functions
00089         Key() : count(-1)
00090         {
00091         }
00092 
00093         Key(const IdentifierType& id) : count(0)
00094         {
00095             this->id = id;
00096         }
00097         
00098         Key(const IdentifierType& id,
00099                         Parm1 &p1) : count(1)
00100         {
00101             this->id = id;
00102             this->p1 = p1;
00103         }
00104 
00105         Key(const IdentifierType& id,
00106                         Parm1 &p1, Parm2 &p2) : count(2)
00107         {
00108             this->id = id;
00109             this->p1 = p1;
00110             this->p2 = p2;
00111         }
00112 
00113         Key(const IdentifierType& id,
00114                         Parm1 &p1, Parm2 &p2, Parm3 &p3) : count(3)
00115         {
00116             this->id = id;
00117             this->p1 = p1;
00118             this->p2 = p2;
00119             this->p3 = p3;
00120         }
00121 
00122         Key(const IdentifierType& id,
00123                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4) : count(4)
00124         {
00125             this->id = id;
00126             this->p1 = p1;
00127             this->p2 = p2;
00128             this->p3 = p3;
00129             this->p4 = p4;
00130         }
00131 
00132         Key(const IdentifierType& id,
00133                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5 &p5) : count(5)
00134         {
00135             this->id = id;
00136             this->p1 = p1;
00137             this->p2 = p2;
00138             this->p3 = p3;
00139             this->p4 = p4;
00140             this->p5 = p5;
00141         }
00142 
00143         Key(const IdentifierType& id,
00144                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5 &p5,
00145                         Parm6 &p6) : count(6)
00146         {
00147             this->id = id;
00148             this->p1 = p1;
00149             this->p2 = p2;
00150             this->p3 = p3;
00151             this->p4 = p4;
00152             this->p5 = p5;
00153             this->p6 = p6;
00154         }
00155 
00156         Key(const IdentifierType& id,
00157                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5 &p5,
00158                         Parm6 &p6, Parm7 &p7 ) : count(7)
00159         {
00160             this->id = id;
00161             this->p1 = p1;
00162             this->p2 = p2;
00163             this->p3 = p3;
00164             this->p4 = p4;
00165             this->p5 = p5;
00166             this->p6 = p6;
00167             this->p7 = p7;
00168         }
00169 
00170         Key(const IdentifierType& id,
00171                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5 &p5,
00172                         Parm6 &p6, Parm7 &p7, Parm8 &p8) : count(8)
00173         {
00174             this->id = id;
00175             this->p1 = p1;
00176             this->p2 = p2;
00177             this->p3 = p3;
00178             this->p4 = p4;
00179             this->p5 = p5;
00180             this->p6 = p6;
00181             this->p7 = p7;
00182             this->p8 = p8;
00183         }
00184 
00185         Key(const IdentifierType& id,
00186                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5 &p5,
00187                         Parm6 &p6, Parm7 &p7, Parm8 &p8, Parm9 &p9) : count(9)
00188         {
00189             this->id = id;
00190             this->p1 = p1;
00191             this->p2 = p2;
00192             this->p3 = p3;
00193             this->p4 = p4;
00194             this->p5 = p5;
00195             this->p6 = p6;
00196             this->p7 = p7;
00197             this->p8 = p8;
00198             this->p9 = p9;
00199         }
00200         
00201         Key(const IdentifierType& id,
00202                         Parm1 &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5 &p5,
00203                         Parm6 &p6, Parm7 &p7, Parm8 &p8, Parm9 &p9,Parm10 &p10) : count(10)
00204         {
00205             this->id = id;
00206             this->p1 = p1;
00207             this->p2 = p2;
00208             this->p3 = p3;
00209             this->p4 = p4;
00210             this->p5 = p5;
00211             this->p6 = p6;
00212             this->p7 = p7;
00213             this->p8 = p8;
00214             this->p9 = p9;
00215             this->p10 = p10;
00216         }
00217 
00218         Key(const IdentifierType& id,
00219                         Parm1  &p1, Parm2 &p2, Parm3 &p3, Parm4 &p4, Parm5  &p5,
00220                         Parm6  &p6, Parm7 &p7, Parm8 &p8, Parm9 &p9, Parm10 &p10,
00221                         Parm11 &p11) : count(11)
00222         {
00223             this->id = id;
00224             this->p1 = p1;
00225             this->p2 = p2;
00226             this->p3 = p3;
00227             this->p4 = p4;
00228             this->p5 = p5;
00229             this->p6 = p6;
00230             this->p7 = p7;
00231             this->p8 = p8;
00232             this->p9 = p9;
00233             this->p10 = p10;
00234             this->p11 = p11;
00235         }
00236 
00237         Key(const IdentifierType& id,
00238                         Parm1  &p1,  Parm2  &p2, Parm3 &p3, Parm4 &p4, Parm5  &p5,
00239                         Parm6  &p6,  Parm7  &p7, Parm8 &p8, Parm9 &p9, Parm10 &p10,
00240                         Parm11 &p11, Parm12 &p12) : count(12)
00241         {
00242             this->id = id;
00243             this->p1 = p1;
00244             this->p2 = p2;
00245             this->p3 = p3;
00246             this->p4 = p4;
00247             this->p5 = p5;
00248             this->p6 = p6;
00249             this->p7 = p7;
00250             this->p8 = p8;
00251             this->p9 = p9;
00252             this->p10 = p10;
00253             this->p11 = p11;
00254             this->p12 = p12;
00255         }
00256 
00257         Key(const IdentifierType& id,
00258                         Parm1  &p1,  Parm2  &p2,  Parm3  &p3, Parm4 &p4, Parm5  &p5,
00259                         Parm6  &p6,  Parm7  &p7,  Parm8  &p8, Parm9 &p9, Parm10 &p10,
00260                         Parm11 &p11, Parm12 &p12, Parm13 &p13) : count(13)
00261         {
00262             this->id = id;
00263             this->p1 = p1;
00264             this->p2 = p2;
00265             this->p3 = p3;
00266             this->p4 = p4;
00267             this->p5 = p5;
00268             this->p6 = p6;
00269             this->p7 = p7;
00270             this->p8 = p8;
00271             this->p9 = p9;
00272             this->p10 = p10;
00273             this->p11 = p11;
00274             this->p12 = p12;
00275             this->p13 = p13;
00276         }
00277 
00278         Key(const IdentifierType& id,
00279                         Parm1  &p1,  Parm2  &p2,  Parm3  &p3,  Parm4  &p4, Parm5  &p5,
00280                         Parm6  &p6,  Parm7  &p7,  Parm8  &p8,  Parm9  &p9, Parm10 &p10,
00281                         Parm11 &p11, Parm12 &p12, Parm13 &p13, Parm14 &p14) : count(14)
00282         {
00283             this->id = id;
00284             this->p1 = p1;
00285             this->p2 = p2;
00286             this->p3 = p3;
00287             this->p4 = p4;
00288             this->p5 = p5;
00289             this->p6 = p6;
00290             this->p7 = p7;
00291             this->p8 = p8;
00292             this->p9 = p9;
00293             this->p10 = p10;
00294             this->p11 = p11;
00295             this->p12 = p12;
00296             this->p13 = p13;
00297             this->p14 = p14;
00298         }
00299 
00300         Key(const IdentifierType& id,
00301                         Parm1  &p1,  Parm2  &p2,  Parm3  &p3,  Parm4  &p4,  Parm5  &p5,
00302                         Parm6  &p6,  Parm7  &p7,  Parm8  &p8,  Parm9  &p9,  Parm10 &p10,
00303                         Parm11 &p11, Parm12 &p12, Parm13 &p13, Parm14 &p14, Parm15 &p15) : count(15)
00304         {
00305             this->id = id;
00306             this->p1 = p1;
00307             this->p2 = p2;
00308             this->p3 = p3;
00309             this->p4 = p4;
00310             this->p5 = p5;
00311             this->p6 = p6;
00312             this->p7 = p7;
00313             this->p8 = p8;
00314             this->p9 = p9;
00315             this->p10 = p10;
00316             this->p11 = p11;
00317             this->p12 = p12;
00318             this->p13 = p13;
00319             this->p14 = p14;
00320             this->p15 = p15;
00321         }
00322 
00323         template<class F, typename I>
00324         friend bool operator==(const Key<F, I> &k1, const Key<F, I> &k2);
00325         
00326         template<class F, typename I>
00327         friend bool operator<(const Key<F, I> &k1, const Key<F, I> &k2);
00328     };
00329 
00330         
00331     template<class F, typename I>
00332      bool operator==(const Key<F, I> &k1, const Key<F, I> &k2)
00333     {
00334         if( k1.count != k2.count )
00335             return false;
00336         switch(k1.count){
00337             case -1:
00338                 return true;
00339             case 0:
00340                 if( k1.id == k2.id )
00341                     return true;
00342                 else
00343                     return false;
00344             case 1:
00345                 if( (k1.id == k2.id) && 
00346                     (k1.p1 == k2.p1) )
00347                     return true;
00348                 else
00349                     return false;
00350             case 2:
00351                 if( (k1.id == k2.id) && 
00352                     (k1.p1 == k2.p1) && 
00353                     (k1.p2 == k2.p2) )
00354                     return true;
00355                 else
00356                     return false;
00357             case 3:
00358                 if( (k1.id == k2.id) && 
00359                     (k1.p1 == k2.p1) && 
00360                     (k1.p2 == k2.p2) && 
00361                     (k1.p3 == k2.p3) )
00362                     return true;
00363                 else
00364                     return false;
00365             case 4:
00366                 if( (k1.id == k2.id) && 
00367                     (k1.p1 == k2.p1) && 
00368                     (k1.p2 == k2.p2) && 
00369                     (k1.p3 == k2.p3) && 
00370                     (k1.p4 == k2.p4) )
00371                     return true;
00372                 else
00373                     return false;
00374             case 5:
00375                 if( (k1.id == k2.id) && 
00376                     (k1.p1 == k2.p1) && 
00377                     (k1.p2 == k2.p2) && 
00378                     (k1.p3 == k2.p3) && 
00379                     (k1.p4 == k2.p4) && 
00380                     (k1.p5 == k2.p5) )
00381                     return true;
00382                 else
00383                     return false;
00384             case 6:
00385                 if( (k1.id == k2.id) && 
00386                     (k1.p1 == k2.p1) && 
00387                     (k1.p2 == k2.p2) && 
00388                     (k1.p3 == k2.p3) && 
00389                     (k1.p4 == k2.p4) && 
00390                     (k1.p5 == k2.p5) && 
00391                     (k1.p6 == k2.p6) )
00392                     return true;
00393                 else
00394                     return false;
00395             case 7:
00396                 if( (k1.id == k2.id) && 
00397                     (k1.p1 == k2.p1) && 
00398                     (k1.p2 == k2.p2) && 
00399                     (k1.p3 == k2.p3) && 
00400                     (k1.p4 == k2.p4) && 
00401                     (k1.p5 == k2.p5) && 
00402                     (k1.p6 == k2.p6) && 
00403                     (k1.p7 == k2.p7) )
00404                     return true;
00405                 else
00406                     return false;
00407             case 8:
00408                 if( (k1.id == k2.id) && 
00409                     (k1.p1 == k2.p1) && 
00410                     (k1.p2 == k2.p2) && 
00411                     (k1.p3 == k2.p3) && 
00412                     (k1.p4 == k2.p4) && 
00413                     (k1.p5 == k2.p5) && 
00414                     (k1.p6 == k2.p6) && 
00415                     (k1.p7 == k2.p7) && 
00416                     (k1.p8 == k2.p8) )
00417                     return true;
00418                 else
00419                     return false;
00420             case 9:
00421                 if( (k1.id == k2.id) && 
00422                     (k1.p1 == k2.p1) && 
00423                     (k1.p2 == k2.p2) && 
00424                     (k1.p3 == k2.p3) && 
00425                     (k1.p4 == k2.p4) && 
00426                     (k1.p5 == k2.p5) && 
00427                     (k1.p6 == k2.p6) && 
00428                     (k1.p7 == k2.p7) && 
00429                     (k1.p8 == k2.p8) && 
00430                     (k1.p9 == k2.p9) )
00431                     return true;
00432                 else
00433                     return false;
00434             case 10:
00435                 if( (k1.id == k2.id) && 
00436                     (k1.p1 == k2.p1) && 
00437                     (k1.p2 == k2.p2) && 
00438                     (k1.p3 == k2.p3) && 
00439                     (k1.p4 == k2.p4) && 
00440                     (k1.p5 == k2.p5) && 
00441                     (k1.p6 == k2.p6) && 
00442                     (k1.p7 == k2.p7) && 
00443                     (k1.p8 == k2.p8) && 
00444                     (k1.p9 == k2.p9) && 
00445                     (k1.p10 == k2.p10) )
00446                     return true;
00447                 else
00448                     return false;
00449             case 11:
00450                 if( (k1.id == k2.id) && 
00451                     (k1.p1 == k2.p1) && 
00452                     (k1.p2 == k2.p2) && 
00453                     (k1.p3 == k2.p3) && 
00454                     (k1.p4 == k2.p4) && 
00455                     (k1.p5 == k2.p5) && 
00456                     (k1.p6 == k2.p6) && 
00457                     (k1.p7 == k2.p7) && 
00458                     (k1.p8 == k2.p8) && 
00459                     (k1.p9 == k2.p9) && 
00460                     (k1.p10 == k2.p10) && 
00461                     (k1.p11 == k2.p11) )
00462                     return true;
00463                 else
00464                     return false;
00465             case 12:
00466                 if( (k1.id == k2.id) && 
00467                     (k1.p1 == k2.p1) && 
00468                     (k1.p2 == k2.p2) && 
00469                     (k1.p3 == k2.p3) && 
00470                     (k1.p4 == k2.p4) && 
00471                     (k1.p5 == k2.p5) && 
00472                     (k1.p6 == k2.p6) && 
00473                     (k1.p7 == k2.p7) && 
00474                     (k1.p8 == k2.p8) && 
00475                     (k1.p9 == k2.p9) && 
00476                     (k1.p10 == k2.p10) && 
00477                     (k1.p11 == k2.p11) && 
00478                     (k1.p12 == k2.p12) )
00479                     return true;
00480                 else
00481                     return false;
00482             case 13:
00483                 if( (k1.id == k2.id) && 
00484                     (k1.p1 == k2.p1) && 
00485                     (k1.p2 == k2.p2) && 
00486                     (k1.p3 == k2.p3) && 
00487                     (k1.p4 == k2.p4) && 
00488                     (k1.p5 == k2.p5) && 
00489                     (k1.p6 == k2.p6) && 
00490                     (k1.p7 == k2.p7) && 
00491                     (k1.p8 == k2.p8) && 
00492                     (k1.p9 == k2.p9) && 
00493                     (k1.p10 == k2.p10) && 
00494                     (k1.p11 == k2.p11) && 
00495                     (k1.p12 == k2.p12) && 
00496                     (k1.p13 == k2.p13) )
00497                     return true;
00498                 else
00499                     return false;
00500             case 14:
00501                 if( (k1.id == k2.id) && 
00502                     (k1.p1 == k2.p1) && 
00503                     (k1.p2 == k2.p2) && 
00504                     (k1.p3 == k2.p3) && 
00505                     (k1.p4 == k2.p4) && 
00506                     (k1.p5 == k2.p5) && 
00507                     (k1.p6 == k2.p6) && 
00508                     (k1.p7 == k2.p7) && 
00509                     (k1.p8 == k2.p8) && 
00510                     (k1.p9 == k2.p9) && 
00511                     (k1.p10 == k2.p10) && 
00512                     (k1.p11 == k2.p11) && 
00513                     (k1.p12 == k2.p12) && 
00514                     (k1.p13 == k2.p13) && 
00515                     (k1.p14 == k2.p14) )
00516                     return true;
00517                 else
00518                     return false;
00519             case 15:
00520                 if( (k1.id == k2.id) && 
00521                     (k1.p1 == k2.p1) && 
00522                     (k1.p2 == k2.p2) && 
00523                     (k1.p3 == k2.p3) && 
00524                     (k1.p4 == k2.p4) && 
00525                     (k1.p5 == k2.p5) && 
00526                     (k1.p6 == k2.p6) && 
00527                     (k1.p7 == k2.p7) && 
00528                     (k1.p8 == k2.p8) && 
00529                     (k1.p9 == k2.p9) && 
00530                     (k1.p10 == k2.p10) && 
00531                     (k1.p11 == k2.p11) && 
00532                     (k1.p12 == k2.p12) && 
00533                     (k1.p13 == k2.p13) && 
00534                     (k1.p14 == k2.p14) && 
00535                     (k1.p15 == k2.p15) )
00536                     return true;
00537                 else
00538                     return false;
00539             default:
00540                 return false;
00541         }
00542     }
00543 
00544 
00545 
00546     template<class F, typename I>
00547     bool operator<(const Key<F, I> &k1, const Key<F, I> &k2)
00548     {
00549         if( k1.count < k2.count )
00550             return true;
00551         switch(k1.count){
00552             case -1:
00553                 return false;
00554             case 0:
00555                 if( k1.id < k2.id )
00556                     return true;
00557                 else
00558                     return false;
00559             case 1:
00560                 if( (k1.id < k2.id) || 
00561                     (k1.p1 < k2.p1) )
00562                     return true;
00563                 else
00564                     return false;
00565             case 2:
00566                 if( (k1.id < k2.id) || 
00567                     (k1.p1 < k2.p1) || 
00568                     (k1.p2 < k2.p2) )
00569                     return true;
00570                 else
00571                     return false;
00572             case 3:
00573                 if( (k1.id < k2.id) || 
00574                     (k1.p1 < k2.p1) || 
00575                     (k1.p2 < k2.p2) || 
00576                     (k1.p3 < k2.p3) )
00577                     return true;
00578                 else
00579                     return false;
00580             case 4:
00581                 if( (k1.id < k2.id) || 
00582                     (k1.p1 < k2.p1) || 
00583                     (k1.p2 < k2.p2) || 
00584                     (k1.p3 < k2.p3) || 
00585                     (k1.p4 < k2.p4) )
00586                     return true;
00587                 else
00588                     return false;
00589             case 5:
00590                 if( (k1.id < k2.id) || 
00591                     (k1.p1 < k2.p1) || 
00592                     (k1.p2 < k2.p2) || 
00593                     (k1.p3 < k2.p3) || 
00594                     (k1.p4 < k2.p4) || 
00595                     (k1.p5 < k2.p5) )
00596                     return true;
00597                 else
00598                     return false;
00599             case 6:
00600                 if( (k1.id < k2.id) || 
00601                     (k1.p1 < k2.p1) || 
00602                     (k1.p2 < k2.p2) || 
00603                     (k1.p3 < k2.p3) || 
00604                     (k1.p4 < k2.p4) || 
00605                     (k1.p5 < k2.p5) || 
00606                     (k1.p6 < k2.p6) )
00607                     return true;
00608                 else
00609                     return false;
00610             case 7:
00611                 if( (k1.id < k2.id) || 
00612                     (k1.p1 < k2.p1) || 
00613                     (k1.p2 < k2.p2) || 
00614                     (k1.p3 < k2.p3) || 
00615                     (k1.p4 < k2.p4) || 
00616                     (k1.p5 < k2.p5) || 
00617                     (k1.p6 < k2.p6) || 
00618                     (k1.p7 < k2.p7) )
00619                     return true;
00620                 else
00621                     return false;
00622             case 8:
00623                 if( (k1.id < k2.id) || 
00624                     (k1.p1 < k2.p1) || 
00625                     (k1.p2 < k2.p2) || 
00626                     (k1.p3 < k2.p3) || 
00627                     (k1.p4 < k2.p4) || 
00628                     (k1.p5 < k2.p5) || 
00629                     (k1.p6 < k2.p6) || 
00630                     (k1.p7 < k2.p7) || 
00631                     (k1.p8 < k2.p8) )
00632                     return true;
00633                 else
00634                     return false;
00635             case 9:
00636                 if( (k1.id < k2.id) || 
00637                     (k1.p1 < k2.p1) || 
00638                     (k1.p2 < k2.p2) || 
00639                     (k1.p3 < k2.p3) || 
00640                     (k1.p4 < k2.p4) || 
00641                     (k1.p5 < k2.p5) || 
00642                     (k1.p6 < k2.p6) || 
00643                     (k1.p7 < k2.p7) || 
00644                     (k1.p8 < k2.p8) || 
00645                     (k1.p9 < k2.p9) )
00646                     return true;
00647                 else
00648                     return false;
00649             case 10:
00650                 if( (k1.id < k2.id) || 
00651                     (k1.p1 < k2.p1) || 
00652                     (k1.p2 < k2.p2) || 
00653                     (k1.p3 < k2.p3) || 
00654                     (k1.p4 < k2.p4) || 
00655                     (k1.p5 < k2.p5) || 
00656                     (k1.p6 < k2.p6) || 
00657                     (k1.p7 < k2.p7) || 
00658                     (k1.p8 < k2.p8) || 
00659                     (k1.p9 < k2.p9) || 
00660                     (k1.p10 < k2.p10) )
00661                     return true;
00662                 else
00663                     return false;
00664             case 11:
00665                 if( (k1.id < k2.id) || 
00666                     (k1.p1 < k2.p1) || 
00667                     (k1.p2 < k2.p2) || 
00668                     (k1.p3 < k2.p3) || 
00669                     (k1.p4 < k2.p4) || 
00670                     (k1.p5 < k2.p5) || 
00671                     (k1.p6 < k2.p6) || 
00672                     (k1.p7 < k2.p7) || 
00673                     (k1.p8 < k2.p8) || 
00674                     (k1.p9 < k2.p9) || 
00675                     (k1.p10 < k2.p10) || 
00676                     (k1.p11 < k2.p11) )
00677                     return true;
00678                 else
00679                     return false;
00680             case 12:
00681                 if( (k1.id < k2.id) || 
00682                     (k1.p1 < k2.p1) || 
00683                     (k1.p2 < k2.p2) || 
00684                     (k1.p3 < k2.p3) || 
00685                     (k1.p4 < k2.p4) || 
00686                     (k1.p5 < k2.p5) || 
00687                     (k1.p6 < k2.p6) || 
00688                     (k1.p7 < k2.p7) || 
00689                     (k1.p8 < k2.p8) || 
00690                     (k1.p9 < k2.p9) || 
00691                     (k1.p10 < k2.p10) || 
00692                     (k1.p11 < k2.p11) || 
00693                     (k1.p12 < k2.p12) )
00694                     return true;
00695                 else
00696                     return false;
00697             case 13:
00698                 if( (k1.id < k2.id) || 
00699                     (k1.p1 < k2.p1) || 
00700                     (k1.p2 < k2.p2) || 
00701                     (k1.p3 < k2.p3) || 
00702                     (k1.p4 < k2.p4) || 
00703                     (k1.p5 < k2.p5) || 
00704                     (k1.p6 < k2.p6) || 
00705                     (k1.p7 < k2.p7) || 
00706                     (k1.p8 < k2.p8) || 
00707                     (k1.p9 < k2.p9) || 
00708                     (k1.p10 < k2.p10) || 
00709                     (k1.p11 < k2.p11) || 
00710                     (k1.p12 < k2.p12) || 
00711                     (k1.p13 < k2.p13) )
00712                     return true;
00713                 else
00714                     return false;
00715             case 14:
00716                 if( (k1.id < k2.id) || 
00717                     (k1.p1 < k2.p1) || 
00718                     (k1.p2 < k2.p2) || 
00719                     (k1.p3 < k2.p3) || 
00720                     (k1.p4 < k2.p4) || 
00721                     (k1.p5 < k2.p5) || 
00722                     (k1.p6 < k2.p6) || 
00723                     (k1.p7 < k2.p7) || 
00724                     (k1.p8 < k2.p8) || 
00725                     (k1.p9 < k2.p9) || 
00726                     (k1.p10 < k2.p10) || 
00727                     (k1.p11 < k2.p11) || 
00728                     (k1.p12 < k2.p12) || 
00729                     (k1.p13 < k2.p13) || 
00730                     (k1.p14 < k2.p14) )
00731                     return true;
00732                 else
00733                     return false;
00734             case 15:
00735                 if( (k1.id < k2.id) || 
00736                     (k1.p1 < k2.p1) || 
00737                     (k1.p2 < k2.p2) || 
00738                     (k1.p3 < k2.p3) || 
00739                     (k1.p4 < k2.p4) || 
00740                     (k1.p5 < k2.p5) || 
00741                     (k1.p6 < k2.p6) || 
00742                     (k1.p7 < k2.p7) || 
00743                     (k1.p8 < k2.p8) || 
00744                     (k1.p9 < k2.p9) || 
00745                     (k1.p10 < k2.p10) || 
00746                     (k1.p11 < k2.p11) || 
00747                     (k1.p12 < k2.p12) || 
00748                     (k1.p13 < k2.p13) || 
00749                     (k1.p14 < k2.p14) || 
00750                     (k1.p15 < k2.p15) )
00751                     return true;
00752                 else
00753                     return false;
00754             default:
00755                 return false;
00756         }
00757     }
00758 
00759     
00760 
00761 } // namespace Loki
00762 
00763 #endif // end file guardian
00764 

Generated on Sun Feb 25 16:52:26 2007 for Loki by  doxygen 1.5.1-p1