Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

tRelation.h

Go to the documentation of this file.
00001 /******************************************************************************/
00002 /*                                                                            */
00003 /* POLiTe - Persistent Object Library Test                                     */
00004 /*                                        Ph.D. Thesis by Mgr. Michal Kopecky */
00005 /*                                                                            */
00006 /* Charles University Prague                                                  */
00007 /*                                                                            */
00008 /******************************************************************************/
00009 /*                                                                            */
00010 /* File name: ...                                                             */
00011 /* Module: ......                                                             */
00012 /*                                                                            */
00013 /******************************************************************************/
00014 
00015 #ifndef __T_RELATION_H__
00016 #define __T_RELATION_H__
00017 
00018 template<class L, class R> class OneToOneRelation;
00019 template<class L, class R> class OneToManyRelation;
00020 template<class L, class R> class ManyToOneRelation;
00021 template<class L, class R> class ManyToManyRelation;
00022 template<class L, class R> class ChainedRelation;
00023 
00024 // Parent Header(s)
00025 #include <cResultBase.h>
00026 
00027 // Other POLiTe Header(s)
00028 #include <tRef.h>
00029 
00030 template<class L, class R> class OneToOneRelation : public OneToOneRelationBase
00031 {
00032 #ifdef POLITE_TEST_FRIEND
00033         friend POLITE_TEST_FRIEND;
00034 #endif // POLITE_TEST_FRIEND
00035 
00036 friend class ChainedRelation<L,R>;
00037 
00038 public:
00039         OneToOneRelation(
00040                 const char *a_table_name,
00041                 class Connection *a_database_connection,
00042                 const char *a_left_column_name = NULL,
00043                 const char *a_right_column_name = NULL
00044                 )
00045         : OneToOneRelationBase(
00046                 L::ClassName(),
00047                 R::ClassName(),
00048                 a_table_name,
00049                 a_database_connection,
00050                 a_left_column_name,
00051                 a_right_column_name
00052                 )
00053         {};
00054 
00055         Result<L> *LGetAll(
00056                 const class RefBase &right,
00057                 const class QueRefProto &query = EQUERY
00058                 )
00059         {
00060                 return _LGetAll(new Result<L>,right,query);
00061         };
00062 
00063         Result<R> *RGetAll(
00064                 const class RefBase &left,
00065                 const class QueRefProto &query = EQUERY
00066                 )
00067         {
00068                 return _LGetAll(new Result<L>,left,query);
00069         };
00070 
00071         Result<L> *LGetAll(
00072                 const class QueRefProto &qL,
00073                 const class QueRefProto &qR
00074                 )
00075         {
00076                 return _LGetAll(new Result<L>,qL,qR);
00077         };
00078 
00079         Result<R> *RGetAll(
00080                 const class QueRefProto &qL,
00081                 const class QueRefProto &qR
00082                 )
00083         {
00084                 return _LGetAll(new Result<L>,qL,qR);
00085         };
00086 
00087         OneToOneRelation<R,L> operator -() const
00088         {
00089                 return OneToOneRelation<R,L>(
00090                         _tableName,
00091                         _databaseConnection,
00092                         _rightColumnName,
00093                         _leftColumnName
00094                         );
00095         };
00096 
00097         OneToOneRelation<L,R> &operator =(const OneToOneRelation<L,R> &X)
00098         {
00099                 if (this != &X)
00100                 {
00101                         _leftClassName=X._leftClassName;
00102                         _rightClassName=X._rightClassName;
00103                         StrCpy(_tableName,X._tableName);
00104                         _databaseConnection,X._databaseConnection;
00105                         StrCpy(_leftColumnName,X._leftColumnName);
00106                         StrCpy(_rightColumnName,X._rightColumnName);
00107                 };
00108                 return *this;
00109         };
00110 
00111 protected:
00112         ResultBase *_LGetAll(
00113                 ResultBase * rb,
00114                 const class QueRefProto &qL,
00115                 const class QueRefProto &qR
00116         )
00117                 //Gets all objects on the left side fulfilling query qL connected to object
00118                 //on the right fulfilling query qR
00119         {
00120                 return ChainedRelation<L,R>(*this)._LGetAll(rb,qL,qR);
00121         };
00122 
00123         ResultBase *_RGetAll(
00124                 ResultBase * rb,
00125                 const class QueRefProto &qL,
00126                 const class QueRefProto &qR
00127         )
00128                 //Gets all objects on the right side fulfilling query qR connected to object
00129                 //on the left fulfilling query qL
00130         {
00131                 return ChainedRelation<L,R>(*this)._RGetAll(rb,qL,qR);
00132         };
00133 };
00134 
00135 template<class L, class R> class OneToManyRelation : public OneToManyRelationBase
00136 {
00137 #ifdef POLITE_TEST_FRIEND
00138         friend POLITE_TEST_FRIEND;
00139 #endif // POLITE_TEST_FRIEND
00140 
00141 friend class ChainedRelation<L,R>;
00142 
00143 public:
00144         OneToManyRelation(
00145                 const char *a_table_name,
00146                 class Connection *a_database_connection,
00147                 const char *a_left_column_name = NULL,
00148                 const char *a_right_column_name = NULL
00149                 )
00150         : OneToManyRelationBase(
00151                 L::ClassName(),
00152                 R::ClassName(),
00153                 a_table_name,
00154                 a_database_connection,
00155                 a_left_column_name,
00156                 a_right_column_name
00157                 )
00158         {};
00159 
00160         Result<L> *LGetAll(
00161                 const class RefBase &right,
00162                 const class QueRefProto &query = EQUERY
00163                 )
00164         {
00165                 return _LGetAll(new Result<L>,right,query);
00166         };
00167 
00168         Result<R> *RGetAll(
00169                 const class RefBase &left,
00170                 const class QueRefProto &query = EQUERY
00171                 )
00172         {
00173                 return _LGetAll(new Result<L>,left,query);
00174         };
00175 
00176         Result<L> *LGetAll(
00177                 const class QueRefProto &qL,
00178                 const class QueRefProto &qR
00179                 )
00180         {
00181                 return _LGetAll(new Result<L>,qL,qR);
00182         };
00183 
00184         Result<R> *RGetAll(
00185                 const class QueRefProto &qL,
00186                 const class QueRefProto &qR
00187                 )
00188         {
00189                 return _LGetAll(new Result<L>,qL,qR);
00190         };
00191 
00192         ManyToOneRelation<R,L> operator -() const
00193         {
00194                 return ManyToOneRelation<R,L>(
00195                         _tableName,
00196                         _databaseConnection,
00197                         _rightColumnName,
00198                         _leftColumnName
00199                         );
00200         };
00201 
00202         OneToManyRelation<L,R> &operator =(const OneToManyRelation<L,R> &X)
00203         {
00204                 if (this != &X)
00205                 {
00206                         _leftClassName=X._leftClassName;
00207                         _rightClassName=X._rightClassName;
00208                         StrCpy(_tableName,X._tableName);
00209                         _databaseConnection,X._databaseConnection;
00210                         StrCpy(_leftColumnName,X._leftColumnName);
00211                         StrCpy(_rightColumnName,X._rightColumnName);
00212                 };
00213                 return *this;
00214         };
00215 
00216 protected:
00217         ResultBase *_LGetAll(
00218                 ResultBase * rb,
00219                 const class QueRefProto &qL,
00220                 const class QueRefProto &qR
00221         )
00222                 //Gets all objects on the left side fulfilling query qL connected to object
00223                 //on the right fulfilling query qR
00224         {
00225                 return ChainedRelation<L,R>(*this)._LGetAll(rb,qL,qR);
00226         };
00227 
00228         ResultBase *_RGetAll(
00229                 ResultBase * rb,
00230                 const class QueRefProto &qL,
00231                 const class QueRefProto &qR
00232         )
00233                 //Gets all objects on the right side fulfilling query qR connected to object
00234                 //on the left fulfilling query qL
00235         {
00236                 return ChainedRelation<L,R>(*this)._RGetAll(rb,qL,qR);
00237         };
00238 };
00239 
00240 template<class L, class R> class ManyToOneRelation : public ManyToOneRelationBase
00241 {
00242 #ifdef POLITE_TEST_FRIEND
00243         friend POLITE_TEST_FRIEND;
00244 #endif // POLITE_TEST_FRIEND
00245 
00246 friend class ChainedRelation<L,R>;
00247 
00248 public:
00249         ManyToOneRelation(
00250                 const char *a_table_name,
00251                 class Connection *a_database_connection,
00252                 const char *a_left_column_name = NULL,
00253                 const char *a_right_column_name = NULL
00254                 )
00255         : ManyToOneRelationBase(
00256                 L::ClassName(),
00257                 R::ClassName(),
00258                 a_table_name,
00259                 a_database_connection,
00260                 a_left_column_name,
00261                 a_right_column_name
00262                 )
00263         {};
00264 
00265         Result<L> *LGetAll(
00266                 const class RefBase &right,
00267                 const class QueRefProto &query = EQUERY
00268                 )
00269         {
00270                 return (Result<L> *)_LGetAll(new Result<L>,right,query);
00271         };
00272 
00273         Result<R> *RGetAll(
00274                 const class RefBase &left,
00275                 const class QueRefProto &query = EQUERY
00276                 )
00277         {
00278                 return (Result<R> *)_RGetAll(new Result<L>,left,query);
00279         };
00280 
00281         Result<L> *LGetAll(
00282                 const class QueRefProto &qL,
00283                 const class QueRefProto &qR
00284                 )
00285         {
00286                 return (Result<L> *)_LGetAll(new Result<L>,qL,qR);
00287         };
00288 
00289         Result<R> *RGetAll(
00290                 const class QueRefProto &qL,
00291                 const class QueRefProto &qR
00292                 )
00293         {
00294                 return (Result<R> *)_RGetAll(new Result<L>,qL,qR);
00295         };
00296 
00297         OneToManyRelation<R,L> operator -() const
00298         {
00299                 return OneToManyRelation<R,L>(
00300                         _tableName,
00301                         _databaseConnection,
00302                         _rightColumnName,
00303                         _leftColumnName
00304                         );
00305         };
00306 
00307         ManyToOneRelation<L,R> &operator =(const ManyToOneRelation<L,R> &X)
00308         {
00309                 if (this != &X)
00310                 {
00311                         _leftClassName=X._leftClassName;
00312                         _rightClassName=X._rightClassName;
00313                         StrCpy(_tableName,X._tableName);
00314                         _databaseConnection,X._databaseConnection;
00315                         StrCpy(_leftColumnName,X._leftColumnName);
00316                         StrCpy(_rightColumnName,X._rightColumnName);
00317                 };
00318                 return *this;
00319         };
00320 
00321 protected:
00322         ResultBase *_LGetAll(
00323                 ResultBase * rb,
00324                 const class QueRefProto &qL,
00325                 const class QueRefProto &qR
00326         )
00327                 //Gets all objects on the left side fulfilling query qL connected to object
00328                 //on the right fulfilling query qR
00329         {
00330                 return ChainedRelation<L,R>(*this)._LGetAll(rb,qL,qR);
00331         };
00332 
00333         ResultBase *_RGetAll(
00334                 ResultBase * rb,
00335                 const class QueRefProto &qL,
00336                 const class QueRefProto &qR
00337         )
00338                 //Gets all objects on the right side fulfilling query qR connected to object
00339                 //on the left fulfilling query qL
00340         {
00341                 return ChainedRelation<L,R>(*this)._RGetAll(rb,qL,qR);
00342         };
00343 };
00344 
00345 template<class L, class R> class ManyToManyRelation : public ManyToManyRelationBase
00346 {
00347 #ifdef POLITE_TEST_FRIEND
00348         friend POLITE_TEST_FRIEND;
00349 #endif // POLITE_TEST_FRIEND
00350 
00351 friend class ChainedRelation<L,R>;
00352 
00353 public:
00354         ManyToManyRelation(
00355                 const char *a_table_name,
00356                 class Connection *a_database_connection,
00357                 const char *a_left_column_name = NULL,
00358                 const char *a_right_column_name = NULL
00359                 )
00360         : ManyToManyRelationBase(
00361                 L::ClassName(),
00362                 R::ClassName(),
00363                 a_table_name,
00364                 a_database_connection,
00365                 a_left_column_name,
00366                 a_right_column_name
00367                 )
00368         {};
00369 
00370         Result<L> *LGetAll(
00371                 const class RefBase &right,
00372                 const class QueRefProto &query = EQUERY
00373                 )
00374         {
00375                 return (Result<L> *)_LGetAll(new Result<L>,right,query);
00376         };
00377 
00378         Result<R> *RGetAll(
00379                 const class RefBase &left,
00380                 const class QueRefProto &query = EQUERY
00381                 )
00382         {
00383                 return (Result<R> *)_RGetAll(new Result<L>,left,query);
00384         };
00385 
00386         Result<L> *LGetAll(
00387                 const class QueRefProto &qL,
00388                 const class QueRefProto &qR
00389                 )
00390         {
00391                 return (Result<L> *)_LGetAll(new Result<L>,qL,qR);
00392         };
00393 
00394         Result<R> *RGetAll(
00395                 const class QueRefProto &qL,
00396                 const class QueRefProto &qR
00397                 )
00398         {
00399                 return (Result<R> *)_RGetAll(new Result<L>,qL,qR);
00400         };
00401 
00402         ManyToManyRelation<R,L> operator -() const
00403         {
00404                 return ManyToManyRelation<R,L>(
00405                         _tableName,
00406                         _databaseConnection,
00407                         _rightColumnName,
00408                         _leftColumnName
00409                         );
00410         };
00411 
00412         ManyToManyRelation<L,R> &operator =(const ManyToManyRelation<L,R> &X)
00413         {
00414                 if (this != &X)
00415                 {
00416                         _leftClassName=X._leftClassName;
00417                         _rightClassName=X._rightClassName;
00418                         StrCpy(_tableName,X._tableName);
00419                         _databaseConnection,X._databaseConnection;
00420                         StrCpy(_leftColumnName,X._leftColumnName);
00421                         StrCpy(_rightColumnName,X._rightColumnName);
00422                 };
00423                 return *this;
00424         };
00425 
00426 protected:
00427         ResultBase *_LGetAll(
00428                 ResultBase * rb,
00429                 const class QueRefProto &qL,
00430                 const class QueRefProto &qR
00431         )
00432                 //Gets all objects on the left side fulfilling query qL connected to object
00433                 //on the right fulfilling query qR
00434         {
00435                 return ChainedRelation<L,R>(*this)._LGetAll(rb,qL,qR);
00436         };
00437 
00438         ResultBase *_RGetAll(
00439                 ResultBase * rb,
00440                 const class QueRefProto &qL,
00441                 const class QueRefProto &qR
00442         )
00443                 //Gets all objects on the right side fulfilling query qR connected to object
00444                 //on the left fulfilling query qL
00445         {
00446                 return ChainedRelation<L,R>(*this)._RGetAll(rb,qL,qR);
00447         };
00448 };
00449 
00450 template<class L, class R> class ChainedRelation : public ChainedRelationBase
00451 {
00452 #ifdef POLITE_TEST_FRIEND
00453         friend POLITE_TEST_FRIEND;
00454 #endif // POLITE_TEST_FRIEND
00455 
00456 friend ChainedRelation<L,R> operator *(const QueRefProto &Q, const OneToOneRelation<L,R> &X);
00457 friend ChainedRelation<L,R> operator *(const OneToOneRelation<L,R> &X, const QueRefProto &Q);
00458 friend ChainedRelation<L,R> operator *(const QueRefProto &Q, const OneToManyRelation<L,R> &X);
00459 friend ChainedRelation<L,R> operator *(const OneToManyRelation<L,R> &X, const QueRefProto &Q);
00460 friend ChainedRelation<L,R> operator *(const QueRefProto &Q, const ManyToOneRelation<L,R> &X);
00461 friend ChainedRelation<L,R> operator *(const ManyToOneRelation<L,R> &X, const QueRefProto &Q);
00462 friend ChainedRelation<L,R> operator *(const QueRefProto &Q, const ManyToManyRelation<L,R> &X);
00463 friend ChainedRelation<L,R> operator *(const ManyToManyRelation<L,R> &X, const QueRefProto &Q);
00464 friend ChainedRelation<L,R> operator *(const QueRefProto &Q, const ChainedRelation<L,R> &X);
00465 friend ChainedRelation<L,R> operator *(const ChainedRelation<L,R> &X, const QueRefProto &Q);
00466 
00467 friend class OneToOneRelation<L,R>;
00468 friend class OneToManyRelation<L,R>;
00469 friend class ManyToOneRelation<L,R>;
00470 friend class ManyToManyRelation<L,R>;
00471 //friend class ChainedRelation<L,R>;
00472 
00473 public:
00474         ChainedRelation(
00475                 const char *a_table_name,
00476                 class Connection *a_database_connection,
00477                 const char *a_left_column_name = NULL,
00478                 const char *a_right_column_name = NULL,
00479                 const char *a_inner_columns = NULL,
00480                 const int a_relnum = 1,
00481                 const int a_qnum = 0,
00482                 const class Query &a_left_query = EQUERY,
00483                 const class Query &a_right_query = EQUERY
00484                 )
00485         : ChainedRelationBase(
00486                 L::ClassName(),
00487                 R::ClassName(),
00488                 a_table_name,
00489                 a_database_connection,
00490                 a_left_column_name,
00491                 a_right_column_name,
00492                 a_inner_columns,
00493                 a_relnum,
00494                 a_qnum,
00495                 a_left_query,
00496                 a_right_query
00497                 )
00498         {};
00499 
00500         ChainedRelation(const OneToOneRelation<L,R> &X) : ChainedRelationBase(NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,EQUERY,EQUERY)
00501         {_Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00502         ChainedRelation<L,R> &operator =(const OneToOneRelation<L,R> &X)
00503         {if (this!=&X) _Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00504 
00505         ChainedRelation(const OneToManyRelation<L,R> &X) : ChainedRelationBase(NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,EQUERY,EQUERY)
00506         {_Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00507         ChainedRelation<L,R> &operator =(const OneToManyRelation<L,R> &X)
00508         {if (this!=&X) _Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00509 
00510         ChainedRelation(const ManyToOneRelation<L,R> &X) : ChainedRelationBase(NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,EQUERY,EQUERY)
00511         {_Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00512         ChainedRelation<L,R> &operator =(const ManyToOneRelation<L,R> &X)
00513         {if (this!=&X) _Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00514 
00515         ChainedRelation(const ManyToManyRelation<L,R> &X) : ChainedRelationBase(NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,EQUERY,EQUERY)
00516         {_Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00517         ChainedRelation<L,R> &operator =(const ManyToManyRelation<L,R> &X)
00518         {if (this!=&X) _Init(X._leftClassName,X._rightClassName,X._TableName(),X._databaseConnection,X._leftColumnName,X._rightColumnName,NULL,1,0,EQUERY,EQUERY);};
00519 
00520         ChainedRelation(const ChainedRelation<L,R> &X) 
00521         : ChainedRelationBase(
00522                 X._leftClassName,X._rightClassName,X._tableName,X._databaseConnection,X._leftColumnName,X._rightColumnName,X._inner_columns,X._relnum,X._qnum,X._left_query,X._right_query
00523                 )
00524         {};
00525 
00526         ChainedRelation(Proto<L> &X, Proto<R> &Y) 
00527         : ChainedRelationBase(
00528                 X,Y
00529                 )
00530         {};
00531 
00532         ChainedRelation(const ChainedRelationBase &X, const ChainedRelationBase &Y) 
00533         : ChainedRelationBase(
00534                 X,Y
00535                 )
00536         {
00537         };
00538 
00539         Result<L> *LGetAll(
00540                 const class RefBase &right,
00541                 const class QueRefProto &query = EQUERY
00542                 )
00543         {
00544                 return (Result<L> *)_LGetAll(new Result<L>,right,query);
00545         };
00546 
00547         Result<R> *RGetAll(
00548                 const class RefBase &left,
00549                 const class QueRefProto &query = EQUERY
00550                 )
00551         {
00552                 return (Result<R> *)_RGetAll(new Result<L>,left,query);
00553         };
00554 
00555         Result<L> *LGetAll(
00556                 const class QueRefProto &qL,
00557                 const class QueRefProto &qR
00558                 )
00559         {
00560                 return (Result<L> *)_LGetAll(new Result<L>,qL,qR);
00561         };
00562 
00563         Result<R> *RGetAll(
00564                 const class QueRefProto &qL,
00565                 const class QueRefProto &qR
00566                 )
00567         {
00568                 return (Result<R> *)_RGetAll(new Result<L>,qL,qR);
00569         };
00570 
00571         ChainedRelation<R,L> operator -() const
00572         {
00573                 return ChainedRelation<R,L>(
00574                         _tableName,
00575                         _databaseConnection,
00576                         _rightColumnName,
00577                         _leftColumnName
00578                         );
00579         };
00580 
00581         ChainedRelation<L,R> &operator =(const ChainedRelation<L,R> &X)
00582         {
00583                 if (this != &X)
00584                 {
00585                         _leftClassName=X._leftClassName;
00586                         _rightClassName=X._rightClassName;
00587                         StrCpy(_tableName,X._tableName);
00588                         _databaseConnection,X._databaseConnection;
00589                         StrCpy(_leftColumnName,X._leftColumnName);
00590                         StrCpy(_rightColumnName,X._rightColumnName);
00591                         StrCpy(_inner_columns,X._inner_columns);
00592                         _relnum=X._relnum;
00593                         _qnum=X._qnum;
00594                         _left_query=X._left_query;
00595                         _right_query=X._right_query;
00596                 };
00597                 return *this;
00598         };
00599 };
00600 
00601 //Left and Right operators
00602 template<class L,class R> Result<L> *Left(OneToOneRelation<L,R> &X,const class QueRefProto &qR = EQUERY) {return X.LGetAll(EQUERY,qR);};
00603 template<class L,class R> Result<L> *Left(OneToManyRelation<L,R> &X,const class QueRefProto &qR = EQUERY) {return X.LGetAll(EQUERY,qR);};
00604 template<class L,class R> Result<L> *Left(ManyToOneRelation<L,R> &X,const class QueRefProto &qR = EQUERY) {return X.LGetAll(EQUERY,qR);};
00605 template<class L,class R> Result<L> *Left(ManyToManyRelation<L,R> &X,const class QueRefProto &qR = EQUERY) {return X.LGetAll(EQUERY,qR);};
00606 template<class L,class R> Result<L> *Left(ChainedRelation<L,R> &X,const class QueRefProto &qR = EQUERY) {return X.LGetAll(EQUERY,qR);};
00607 template<class L,class R> Result<R> *Right(OneToOneRelation<L,R> &X,const class QueRefProto &qL = EQUERY) {return X.RGetAll(qL,EQUERY);};
00608 template<class L,class R> Result<R> *Right(OneToManyRelation<L,R> &X,const class QueRefProto &qL = EQUERY) {return X.RGetAll(qL,EQUERY);};
00609 template<class L,class R> Result<R> *Right(ManyToOneRelation<L,R> &X,const class QueRefProto &qL = EQUERY) {return X.RGetAll(qL,EQUERY);};
00610 template<class L,class R> Result<R> *Right(ManyToManyRelation<L,R> &X,const class QueRefProto &qL = EQUERY) {return X.RGetAll(qL,EQUERY);};
00611 template<class L,class R> Result<R> *Right(ChainedRelation<L,R> &X,const class QueRefProto &qL = EQUERY) {return X.RGetAll(qL,EQUERY);};
00612 
00613 // Relation*QueRefProto and vice versa
00614 // i.e. right and left restrictions
00615 template<class L, class R> ChainedRelation<L,R> operator *(const QueRefProto &Q, const OneToOneRelation<L,R> &X) {ChainedRelation<L,R> S = X; S._left_query.And(Q); return S;};
00616 template<class L, class R> ChainedRelation<L,R> operator *(const OneToOneRelation<L,R> &X, const QueRefProto &Q) {ChainedRelation<L,R> S = X; S._right_query.And(Q); return S;};
00617 template<class L, class R> ChainedRelation<L,R> operator *(const QueRefProto &Q, const OneToManyRelation<L,R> &X) {ChainedRelation<L,R> S = X; S._left_query.And(Q); return S;};
00618 template<class L, class R> ChainedRelation<L,R> operator *(const OneToManyRelation<L,R> &X, const QueRefProto &Q) {ChainedRelation<L,R> S = X; S._right_query.And(Q); return S;};
00619 template<class L, class R> ChainedRelation<L,R> operator *(const QueRefProto &Q, const ManyToOneRelation<L,R> &X) {ChainedRelation<L,R> S = X; S._left_query.And(Q); return S;};
00620 template<class L, class R> ChainedRelation<L,R> operator *(const ManyToOneRelation<L,R> &X, const QueRefProto &Q) {ChainedRelation<L,R> S = X; S._right_query.And(Q); return S;};
00621 template<class L, class R> ChainedRelation<L,R> operator *(const QueRefProto &Q, const ManyToManyRelation<L,R> &X) {ChainedRelation<L,R> S = X; S._left_query.And(Q); return S;};
00622 template<class L, class R> ChainedRelation<L,R> operator *(const ManyToManyRelation<L,R> &X, const QueRefProto &Q) {ChainedRelation<L,R> S = X; S._right_query.And(Q); return S;};
00623 template<class L, class R> ChainedRelation<L,R> operator *(const QueRefProto &Q, const ChainedRelation<L,R> &X) {ChainedRelation<L,R> S = X; S._left_query.And(Q); return S;};
00624 template<class L, class R> ChainedRelation<L,R> operator *(const ChainedRelation<L,R> &X, const QueRefProto &Q) {ChainedRelation<L,R> S = X; S._right_query.And(Q); return S;};
00625 
00626 // Join of two prototypes
00627 template<class L, class R> ChainedRelation<L,R> operator *(Proto<L> &X, Proto<R> &Y) {return ChainedRelation<L,R>(X,Y);};
00628 
00629 // Chaining operators
00630 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ChainedRelation<L,M> &X, const ChainedRelation<N,R> &Y) {return ChainedRelation<L,R>(X,Y);};
00631 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ChainedRelation<L,M> &X, const ManyToManyRelation<N,R> &Y) {return X*ChainedRelation<N,R>(Y);};
00632 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ChainedRelation<L,M> &X, const ManyToOneRelation<N,R> &Y) {return X*ChainedRelation<N,R>(Y);};
00633 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ChainedRelation<L,M> &X, const OneToManyRelation<N,R> &Y) {return X*ChainedRelation<N,R>(Y);};
00634 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ChainedRelation<L,M> &X, const OneToOneRelation<N,R> &Y) {return X*ChainedRelation<N,R>(Y);};
00635 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToManyRelation<L,M> &X, const ChainedRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00636 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToManyRelation<L,M> &X, const ManyToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00637 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToManyRelation<L,M> &X, const ManyToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00638 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToManyRelation<L,M> &X, const OneToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00639 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToManyRelation<L,M> &X, const OneToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00640 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToOneRelation<L,M> &X, const ChainedRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00641 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToOneRelation<L,M> &X, const ManyToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00642 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToOneRelation<L,M> &X, const ManyToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00643 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToOneRelation<L,M> &X, const OneToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00644 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const ManyToOneRelation<L,M> &X, const OneToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00645 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToManyRelation<L,M> &X, const ChainedRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00646 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToManyRelation<L,M> &X, const ManyToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00647 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToManyRelation<L,M> &X, const ManyToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00648 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToManyRelation<L,M> &X, const OneToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00649 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToManyRelation<L,M> &X, const OneToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00650 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToOneRelation<L,M> &X, const ChainedRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00651 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToOneRelation<L,M> &X, const ManyToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00652 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToOneRelation<L,M> &X, const ManyToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00653 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToOneRelation<L,M> &X, const OneToManyRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00654 template<class L, class M, class N, class R> ChainedRelation<L,R> operator *(const OneToOneRelation<L,M> &X, const OneToOneRelation<N,R> &Y) {return ChainedRelation<L,M>(X)*ChainedRelation<N,R>(Y);};
00655 
00656 #endif //__T_RELATION_H__

Generated on Sun Jul 14 20:51:15 2002 for POLiTe by doxygen1.2.16