Main Page | Class Hierarchy | Class List | File List | Class Members

matchClassad.h

00001 /*********************************************************************
00002  *
00003  * Condor ClassAd library
00004  * Copyright (C) 1990-2003, Condor Team, Computer Sciences Department,
00005  * University of Wisconsin-Madison, WI and Rajesh Raman.
00006  *
00007  * This source code is covered by the Condor Public License, which can
00008  * be found in the accompanying LICENSE file, or online at
00009  * www.condorproject.org.
00010  *
00011  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00012  * AND THE UNIVERSITY OF WISCONSIN-MADISON "AS IS" AND ANY EXPRESS OR
00013  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00014  * WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS
00015  * FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE COPYRIGHT
00016  * HOLDERS AND CONTRIBUTORS AND THE UNIVERSITY OF WISCONSIN-MADISON
00017  * MAKE NO MAKE NO REPRESENTATION THAT THE SOFTWARE, MODIFICATIONS,
00018  * ENHANCEMENTS OR DERIVATIVE WORKS THEREOF, WILL NOT INFRINGE ANY
00019  * PATENT, COPYRIGHT, TRADEMARK, TRADE SECRET OR OTHER PROPRIETARY
00020  * RIGHT.
00021  *
00022  *********************************************************************/
00023 
00024 #ifndef __MATCH_CLASSAD_H__
00025 #define __MATCH_CLASSAD_H__
00026 
00027 #include "classad.h"
00028 
00029 BEGIN_NAMESPACE( classad )
00030 
00031 
00063 class MatchClassAd : public ClassAd
00064 {
00065         public:
00067                 MatchClassAd();
00072                 MatchClassAd( ClassAd* al, ClassAd* ar );
00074                 ~MatchClassAd();
00075 
00082                 static MatchClassAd *MakeMatchClassAd( ClassAd* al, ClassAd* ar );
00083 
00090                 bool InitMatchClassAd( ClassAd* al, ClassAd *ar );
00091 
00097                 bool ReplaceLeftAd( ClassAd *al );
00098 
00104                 bool ReplaceRightAd( ClassAd *ar );
00105 
00109                 ClassAd *GetLeftAd();
00110 
00114                 ClassAd *GetRightAd();
00115 
00120                 ClassAd *GetLeftContext( );
00121 
00126                 ClassAd *GetRightContext( );
00127 
00134                 ClassAd *RemoveLeftAd( );
00135 
00142                 ClassAd *RemoveRightAd( );
00143 
00144         protected:
00145                 const ClassAd *ladParent, *radParent;
00146                 ClassAd *lCtx, *rCtx, *lad, *rad;
00147 
00148     private:
00149         // The copy constructor and assignment operator are defined
00150         // to be private so we don't have to write them, or worry about
00151         // them being inappropriately used. The day we want them, we can 
00152         // write them. 
00153         MatchClassAd(const MatchClassAd &match)            { return;       }
00154         MatchClassAd &operator=(const MatchClassAd &match) { return *this; }
00155 
00156 };
00157 
00158 END_NAMESPACE // classad
00159 
00160 #endif