version 1.69, 2005/10/31 17:39:11
|
version 1.70, 2005/11/07 23:15:59
|
|
|
#include "MofWriter.h" | #include "MofWriter.h" |
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/Common/MessageLoader.h> //l10n | #include <Pegasus/Common/MessageLoader.h> //l10n |
|
#include "StrLit.h" |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
|
|
{ | { |
// Class opening element: | // Class opening element: |
| |
out << "<CLASS "; |
out << STRLIT("<CLASS "); |
out << " NAME=\"" << _reference.getClassName() << "\" "; |
out << STRLIT(" NAME=\"") << _reference.getClassName() << STRLIT("\" "); |
| |
if (!_superClassName.isNull()) | if (!_superClassName.isNull()) |
out << " SUPERCLASS=\"" << _superClassName << "\" "; |
out << STRLIT(" SUPERCLASS=\"") << _superClassName << STRLIT("\" "); |
| |
out << ">\n"; |
out << STRLIT(">\n"); |
| |
// Qualifiers: | // Qualifiers: |
| |
|
|
| |
// Class closing element: | // Class closing element: |
| |
out << "</CLASS>\n"; |
out << STRLIT("</CLASS>\n"); |
} | } |
/** toMof prepares an 8-bit string with the MOF for the class. | /** toMof prepares an 8-bit string with the MOF for the class. |
The BNF for this is: | The BNF for this is: |
|
|
void CIMClassRep::toMof(Buffer& out) const | void CIMClassRep::toMof(Buffer& out) const |
{ | { |
// Get and format the class qualifiers | // Get and format the class qualifiers |
out << "\n// Class " << _reference.getClassName(); |
out << STRLIT("\n// Class ") << _reference.getClassName(); |
if (_qualifiers.getCount()) | if (_qualifiers.getCount()) |
out << "\n"; |
out.append('\n'); |
out << "\n"; |
out.append('\n'); |
_qualifiers.toMof(out); | _qualifiers.toMof(out); |
| |
// Separate qualifiers from Class Name | // Separate qualifiers from Class Name |
out << "\n"; |
out.append('\n'); |
| |
// output class statement | // output class statement |
out << "class " << _reference.getClassName(); |
out << STRLIT("class ") << _reference.getClassName(); |
| |
if (!_superClassName.isNull()) | if (!_superClassName.isNull()) |
out << " : " << _superClassName; |
out << STRLIT(" : ") << _superClassName; |
| |
out << "\n{"; |
out << STRLIT("\n{"); |
| |
// format the Properties: | // format the Properties: |
for (Uint32 i = 0, n = _properties.size(); i < n; i++) | for (Uint32 i = 0, n = _properties.size(); i < n; i++) |
|
|
} | } |
| |
// Class closing element: | // Class closing element: |
out << "\n};\n"; |
out << STRLIT("\n};\n"); |
} | } |
| |
| |