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

Diff for /pegasus/src/Pegasus/Common/CIMFlavor.cpp between version 1.11 and 1.12

version 1.11, 2002/03/04 15:08:21 version 1.12, 2002/03/07 00:44:14
Line 30 
Line 30 
 #include "CIMFlavor.h" #include "CIMFlavor.h"
 #include "Exception.h" #include "Exception.h"
 #include "XmlWriter.h" #include "XmlWriter.h"
   //#include <iostream>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
   PEGASUS_USING_STD;
  
 const Uint32 CIMFlavor::NONE = 0; const Uint32 CIMFlavor::NONE = 0;
 const Uint32 CIMFlavor::OVERRIDABLE = 1; const Uint32 CIMFlavor::OVERRIDABLE = 1;
 const Uint32 CIMFlavor::TOSUBCLASS = 2; const Uint32 CIMFlavor::TOSUBCLASS = 2;
 const Uint32 CIMFlavor::TOINSTANCE = 4; const Uint32 CIMFlavor::TOINSTANCE = 4;
 const Uint32 CIMFlavor::TRANSLATABLE = 8; const Uint32 CIMFlavor::TRANSLATABLE = 8;
   const Uint32 CIMFlavor::TOSUBELEMENTS = TOSUBCLASS | TOINSTANCE;
 const Uint32 CIMFlavor::DEFAULTS = OVERRIDABLE | TOSUBCLASS; const Uint32 CIMFlavor::DEFAULTS = OVERRIDABLE | TOSUBCLASS;
  
 static const char* _toString(Boolean x) static const char* _toString(Boolean x)
Line 70 
Line 73 
  
     TRANSLATABLE      = "translatable"     TRANSLATABLE      = "translatable"
    </pre>    </pre>
    The keyword toinstance is not in the CIMspecification and so is not     The keyword toinstance is not in the CIMspecification. For the moment we are
    included in out output..     assuming that it is the same as the TOSubclass. We had a choice of using
      one entity for both or separating them and letting the compiler set both.
   
 */ */
 String FlavorToMof(Uint32 flavor) String FlavorToMof(Uint32 flavor)
 { {
Line 84 
Line 89 
  
     tmp = "";     tmp = "";
  
     if (overridable)      //cout << "KSTEST MOF " << flavor << "  overridable = " << overridable << endl;
         tmp += "EnableOverride, ";  
     else      if (!overridable)
         tmp += "DisableOverride, ";         tmp += "DisableOverride, ";
  
     if (!toSubClass)     if (!toSubClass)
         tmp += "Restricted, ";         tmp += "Restricted, ";
  
   
     /* this is not a legal MOF flavor  
     if (toInstance)  
         tmp += "TOINSTANCE ";  
     */  
   
     if (translatable)     if (translatable)
         tmp += "Translatable, ";         tmp += "Translatable, ";
  
Line 107 
Line 106 
     return tmp;     return tmp;
 } }
  
   /*
   The XML Definition is, from XML Specification
   <!ENTITY % QualifierFlavor "OVERRIDABLE  (true|false)   'true'
                                 TOSUBCLASS   (true|false)   'true'
                                 TOINSTANCE   (true|false)   'false'
                                 TRANSLATABLE (true|false)   'false'">
   */
 void FlavorToXml(Array<Sint8>& out, Uint32 flavor) void FlavorToXml(Array<Sint8>& out, Uint32 flavor)
 { {
     Boolean overridable = (flavor & CIMFlavor::OVERRIDABLE) != 0;     Boolean overridable = (flavor & CIMFlavor::OVERRIDABLE) != 0;
Line 117 
Line 123 
     if (!overridable)     if (!overridable)
         out << " OVERRIDABLE=\"" << _toString(overridable) << "\"";         out << " OVERRIDABLE=\"" << _toString(overridable) << "\"";
  
       /*cout << "KSTEST XML " << flavor << "  overridable = "
           << overridable
           << " " << FlavorToMof(flavor)
           << endl;*/
   
     if (!toSubClass)     if (!toSubClass)
         out << " TOSUBCLASS=\"" << _toString(toSubClass) << "\"";         out << " TOSUBCLASS=\"" << _toString(toSubClass) << "\"";
  


Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2