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

Diff for /pegasus/src/Pegasus/Common/CIMQualifierRep.cpp between version 1.16 and 1.17

version 1.16, 2002/03/25 16:27:51 version 1.17, 2002/03/28 02:57:55
Line 52 
Line 52 
     _flavor(flavor),     _flavor(flavor),
     _propagated(propagated)     _propagated(propagated)
 { {
       //cout << "KSTEST Qualifer create " << name << " Flavor " << flavor << endl;
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
         throw IllegalName();         throw IllegalName();
  
Line 72 
Line 73 
     _name = name;     _name = name;
 } }
  
   void CIMQualifierRep::resolveFlavor(Uint32 inheritedFlavor, Boolean inherited)
           {
                   // ATTN: KS P3 Needs more tests and expansion so we treate first different
                   // from inheritance
   
                   // if the turnoff flags set, reset the functions.
                   if((inheritedFlavor & CIMFlavor::RESTRICTED) != 0) {
                           unsetFlavor(CIMFlavor::TOSUBCLASS + CIMFlavor::TOINSTANCE);
                   }
                   if((inheritedFlavor & CIMFlavor::DISABLEOVERRIDE)) {
                           unsetFlavor(CIMFlavor::ENABLEOVERRIDE);
                   }
   
                   _flavor = inheritedFlavor | _flavor;
           }
   
 static const char* _toString(Boolean x) static const char* _toString(Boolean x)
 { {
     return x ? "true" : "false";     return x ? "true" : "false";
Line 125 
Line 142 
  
     /* If the qualifier is Boolean, we do not put out a value. This is     /* If the qualifier is Boolean, we do not put out a value. This is
        the way MOF is shown.  Note that we should really be checking        the way MOF is shown.  Note that we should really be checking
        the qualifierdecl to compare with the default but the defaults         the qualifierdecl to compare with the default.
        on the current ones are all false so the existence of the qualifier  
        implies true.  
        Also if the value is Null, we do not put out a value because        Also if the value is Null, we do not put out a value because
        no value has been set.  Assumes that qualifiers are built        no value has been set.  Assumes that qualifiers are built
        with NULL set if no value has been placed in the qualifier.        with NULL set if no value has been placed in the qualifier.
     */     */
     Boolean hasValueField = false;     Boolean hasValueField = false;
     if (!_value.isNull() || !(_value.getType() == CIMType::BOOLEAN) )      if (!_value.isNull())
       {
              if (_value.getType() == CIMType::BOOLEAN)
              {
                       Boolean b;
                           _value.get(b);
                       if(!b)
                                   out << " (false)";
              }
              else
     {     {
         out << " (";         out << " (";
         hasValueField = true;         hasValueField = true;
         _value.toMof(out);         _value.toMof(out);
                      out << ")";
              }
     }     }
  
     // output the flavors     // output the flavors
     // ATTN: KS P3 This is a poor test to see if flavor output exists  
     String flavorString;     String flavorString;
     flavorString = FlavorToMof(_flavor);     flavorString = FlavorToMof(_flavor);
     if (flavorString.size())     if (flavorString.size())
     {     {
         if (hasValueField == false)  
             out << " (";  
         out << " : ";         out << " : ";
         out << flavorString;         out << flavorString;
         hasValueField = true;  
         //FlavorToMof(out, _flavor);  
     }     }
   
     if (hasValueField)  
         out << ")";  
 } }
  
 void CIMQualifierRep::printMof(PEGASUS_STD(ostream) &os) const void CIMQualifierRep::printMof(PEGASUS_STD(ostream) &os) const


Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2