(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.10 and 1.10.2.1

version 1.10, 2001/07/10 22:31:10 version 1.10.2.1, 2001/08/01 11:17:36
Line 103 
Line 103 
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
   /** toMof Generates MOF output for a qualifier.
       The BNF for this is:
       <pre>
       qualifier          = qualifierName [ qualifierParameter ] [ ":" 1*flavor]
   
       qualifierParameter = "(" constantValue ")" | arrayInitializer
   
       arrayInitializer   = "{" constantValue*( "," constantValue)"}"
       </pre>
   */
   void CIMQualifierRep::toMof(Array<Sint8>& out) const   //ATTNKS:
   {
       // Output Qualifier name
       out << _name;
   
       /* 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 qualifierdecl to compare with the default but the defaults
          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
          no value has been set.  Assumes that qualifiers are built
          with NULL set if no value has been placed in the qualifier.
       */
       Boolean hasValueField = false;
       if (!_value.isNull() || !(_value.getType() == CIMType::BOOLEAN) )
       {
           out << " (";
           hasValueField = true;
           _value.toMof(out);
       }
   
       // output the flavors
       // ATTNKS: This is a poor test to see if flavor output exists
       String flavorString;
       flavorString = FlavorToString(_flavor);
       if (flavorString.size())
       {
           if (hasValueField == false)
               out << " (";
           out << " : ";
           out << flavorString;
           hasValueField = true;
           //FlavorToMof(out, _flavor);
       }
   
       if (hasValueField)
           out << ")";
   }
   
 CIMQualifierRep::CIMQualifierRep() CIMQualifierRep::CIMQualifierRep()
 { {
  


Legend:
Removed from v.1.10  
changed lines
  Added in v.1.10.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2