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

MatchClassAd Class Reference

Special case of a ClassAd which make it easy to do matching. More...

#include <matchClassad.h>

Inheritance diagram for MatchClassAd:

Inheritance graph
[legend]
Collaboration diagram for MatchClassAd:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MatchClassAd ()
 Default constructor.

 MatchClassAd (ClassAd *al, ClassAd *ar)
 Constructor which builds the CondorClassad given two ads.

 ~MatchClassAd ()
 Default destructor.

bool InitMatchClassAd (ClassAd *al, ClassAd *ar)
 Method to initialize a MatchClassad given two ClassAds.

bool ReplaceLeftAd (ClassAd *al)
 Replaces ad in the left context, or insert one if an ad did not previously exist.

bool ReplaceRightAd (ClassAd *ar)
 Replaces ad in the right context, or insert one if an ad did not previously exist.

ClassAdGetLeftAd ()
 Gets the ad in the left context.

ClassAdGetRightAd ()
 Gets the ad in the right context.

ClassAdGetLeftContext ()
 Gets the left context ad.

ClassAdGetRightContext ()
 Gets the right context ad.

ClassAdRemoveLeftAd ()
 Removes the left candidate from the match classad.

ClassAdRemoveRightAd ()
 Removes the right candidate from the match classad.


Static Public Member Functions

MatchClassAdMakeMatchClassAd (ClassAd *al, ClassAd *ar)
 Factory method to make a MatchClassad given two ClassAds to be matched.


Protected Attributes

const ClassAdladParent
const ClassAdradParent
ClassAdlCtx
ClassAdrCtx
ClassAdlad
ClassAdrad

Detailed Description

Special case of a ClassAd which make it easy to do matching.

The top-level ClassAd is defined as follows:

[ symmetricMatch = leftMatchesRight && rightMatchesLeft; leftMatchesRight = adcr.ad.requirements; rightMatchesLeft = adcl.ad.requirements; leftRankValue = adcl.ad.rank; rightRankValue = adcr.ad.rank; adcl = [ other = adcr.ad; my = ad; // for condor backwards compatibility target = other; // for condor backwards compatibility ad = [ // the ``left'' match candidate goes here ] ]; adcr = [ other = adcl.ad; my = ad; // for condor backwards compatibility target = other; // for condor backwards compatibility ad = [ // the ``right'' match candidate goes here ] ]; ]


Constructor & Destructor Documentation

MatchClassAd::MatchClassAd ClassAd al,
ClassAd ar
 

Constructor which builds the CondorClassad given two ads.

Parameters:
al The left candidate ad
ar The right candidate ad


Member Function Documentation

ClassAd* MatchClassAd::GetLeftAd  ) 
 

Gets the ad in the left context.

Returns:
The ClassAd, or NULL if the ad doesn't exist.

ClassAd* MatchClassAd::GetLeftContext  ) 
 

Gets the left context ad.

(.adcl in the above example)

Returns:
The left context ad, or NULL if the MatchClassAd is not valid

ClassAd* MatchClassAd::GetRightAd  ) 
 

Gets the ad in the right context.

Returns:
The ClassAd, or NULL if the ad doesn't exist.

ClassAd* MatchClassAd::GetRightContext  ) 
 

Gets the right context ad.

(.adcr in the above example)

Returns:
The left context ad, or NULL if the MatchClassAd is not valid

bool MatchClassAd::InitMatchClassAd ClassAd al,
ClassAd ar
 

Method to initialize a MatchClassad given two ClassAds.

The old expressions in the classad are deleted.

Parameters:
al The ad to be placed in the left context.
ar The ad to be placed in the right context.
Returns:
true if the operation succeeded, false otherwise

MatchClassAd* MatchClassAd::MakeMatchClassAd ClassAd al,
ClassAd ar
[static]
 

Factory method to make a MatchClassad given two ClassAds to be matched.

Parameters:
al The ad to be placed in the left context.
ar The ad to be placed in the right context.
Returns:
A CondorClassad, or NULL if the operation failed.

ClassAd* MatchClassAd::RemoveLeftAd  ) 
 

Removes the left candidate from the match classad.

If the candidate ``lives'' in another data structure, this method should be called so that the match classad doesn't delete the candidate.

Returns:
The left candidate ad.

ClassAd* MatchClassAd::RemoveRightAd  ) 
 

Removes the right candidate from the match classad.

If the candidate ``lives'' in another data structure, this method should be called so that the match classad doesn't delete the candidate.

Returns:
The right candidate ad.

bool MatchClassAd::ReplaceLeftAd ClassAd al  ) 
 

Replaces ad in the left context, or insert one if an ad did not previously exist.

Parameters:
al The ad to be placed in the left context.
Returns:
true if the operation succeeded and false otherwise.

bool MatchClassAd::ReplaceRightAd ClassAd ar  ) 
 

Replaces ad in the right context, or insert one if an ad did not previously exist.

Parameters:
ar The ad to be placed in the right context.
Returns:
true if the operation succeeded and false otherwise.


The documentation for this class was generated from the following file: