(file) Return to CIMPredicate.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common / Attic

Diff for /pegasus/src/Pegasus/Common/Attic/CIMPredicate.cpp between version 1.5 and 1.6

version 1.5, 2002/08/29 00:27:52 version 1.6, 2002/09/12 17:27:01
Line 175 
Line 175 
    return false;    return false;
 } }
  
 Predicate::Predicate(void) : KeyBinding() { }  Predicate::Predicate(void) : CIMKeyBinding() { }
  
 Predicate::Predicate(const Predicate& x) Predicate::Predicate(const Predicate& x)
    : KeyBinding(x), _op(x._op), _truth_value(x._truth_value) { }     : CIMKeyBinding(x), _op(x._op), _truth_value(x._truth_value) { }
  
 Predicate::Predicate(const KeyBinding& x, ExpressionOperator op = EQUAL, Boolean truth = true)  Predicate::Predicate(const CIMKeyBinding& x, ExpressionOperator op = EQUAL, Boolean truth = true)
 { {
    if(this != &x)    if(this != &x)
    {    {
       KeyBinding::operator=(x);        CIMKeyBinding::operator=(x);
       _op = op;       _op = op;
       _truth_value = truth;       _truth_value = truth;
    }    }
Line 196 
Line 196 
                      Type type,                      Type type,
                      ExpressionOperator op = EQUAL,                      ExpressionOperator op = EQUAL,
                      Boolean truth = true)                      Boolean truth = true)
    : KeyBinding(name, value, type), _op(op), _truth_value(truth) { }     : CIMKeyBinding(name, value, type), _op(op), _truth_value(truth) { }
  
 Predicate::~Predicate() { } Predicate::~Predicate() { }
  
Line 204 
Line 204 
 { {
    if(this != &x)    if(this != &x)
    {    {
       KeyBinding::operator=(x);        CIMKeyBinding::operator=(x);
       _op = x._op;       _op = x._op;
       _truth_value = x._truth_value;       _truth_value = x._truth_value;
    }    }
    return *this;    return *this;
 } }
  
 Boolean  Predicate::evaluate(const KeyBinding& key)  Boolean  Predicate::evaluate(const CIMKeyBinding& key)
 { {
    _truth_value = false;    _truth_value = false;
    if(true == CIMName::equal(this->getName() , key.getName()))    if(true == CIMName::equal(this->getName() , key.getName()))
Line 275 
Line 275 
          const String& host,          const String& host,
          const String& nameSpace,          const String& nameSpace,
          const String& className,          const String& className,
          const KeyBindingArray& keyBindings,           const Array<CIMKeyBinding>& keyBindings,
          const PredicateArray& predicates,          const PredicateArray& predicates,
          Boolean truth ,          Boolean truth ,
          LogicalOperator lop )          LogicalOperator lop )
Line 326 
Line 326 
    const String& host,    const String& host,
    const String& nameSpace,    const String& nameSpace,
    const String& className,    const String& className,
    const KeyBindingArray& keyBindings,     const Array<CIMKeyBinding>& keyBindings,
    const PredicateArray& predicates,    const PredicateArray& predicates,
    Boolean truth ,    Boolean truth ,
    LogicalOperator lop )    LogicalOperator lop )
Line 365 
Line 365 
 { {
    _truth_value = false;    _truth_value = false;
  
    const Array<KeyBinding>& keys = CIMObjectPath::getKeyBindings();     const Array<CIMKeyBinding>& keys = CIMObjectPath::getKeyBindings();
    int x = _predicates.size();    int x = _predicates.size();
    int y = keys.size();    int y = keys.size();
    int i, j;    int i, j;
Line 375 
Line 375 
       Predicate& pred = _predicates[i];       Predicate& pred = _predicates[i];
       for ( j = 0; j < y; j++ )       for ( j = 0; j < y; j++ )
       {       {
          const KeyBinding& key = keys[i];           const CIMKeyBinding& key = keys[i];
          if(pred == key)          if(pred == key)
          {          {
             if(true == pred.evaluate(key))             if(true == pred.evaluate(key))


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2