version 1.40.2.2, 2005/09/30 20:35:55
|
version 1.41, 2005/10/31 17:39:11
|
|
|
| |
void CIMQualifierDeclRep::toXml(Buffer& out) const | void CIMQualifierDeclRep::toXml(Buffer& out) const |
{ | { |
out << LIT("<QUALIFIER.DECLARATION"); |
out << "<QUALIFIER.DECLARATION"; |
out << LIT(" NAME=\"") << _name; |
out << " NAME=\"" << _name << "\""; |
out.append('"'); |
out << " TYPE=\"" << cimTypeToString (_value.getType ()) << "\""; |
out << LIT(" TYPE=\"") << cimTypeToString (_value.getType ()); |
|
out.append('"'); |
|
| |
if (_value.isArray()) | if (_value.isArray()) |
{ | { |
out << LIT(" ISARRAY=\"true\""); |
out << " ISARRAY=\"true\""; |
| |
if (_arraySize) | if (_arraySize) |
{ | { |
|
|
| |
XmlWriter::appendQualifierFlavorEntity(out, _flavor); | XmlWriter::appendQualifierFlavorEntity(out, _flavor); |
| |
out << LIT(">\n"); |
out << ">\n"; |
| |
XmlWriter::appendScopeElement(out, _scope); | XmlWriter::appendScopeElement(out, _scope); |
XmlWriter::appendValueElement(out, _value); | XmlWriter::appendValueElement(out, _value); |
| |
out << LIT("</QUALIFIER.DECLARATION>\n"); |
out << "</QUALIFIER.DECLARATION>\n"; |
} | } |
| |
/** toMof - Generate the MOF output for the Qualifier Declaration object. | /** toMof - Generate the MOF output for the Qualifier Declaration object. |
|
|
*/ | */ |
void CIMQualifierDeclRep::toMof(Buffer& out) const | void CIMQualifierDeclRep::toMof(Buffer& out) const |
{ | { |
out.append('\n'); |
out << "\n"; |
| |
// output the "Qualifier" keyword and name | // output the "Qualifier" keyword and name |
out << LIT("Qualifier ") << _name; |
out << "Qualifier " << _name; |
| |
// output the qualifiertype | // output the qualifiertype |
out << LIT(" : ") << cimTypeToString (_value.getType ()); |
out << " : " << cimTypeToString (_value.getType ()); |
| |
// If array put the Array indicator "[]" and possible size after name. | // If array put the Array indicator "[]" and possible size after name. |
if (_value.isArray()) | if (_value.isArray()) |
|
|
out << buffer; | out << buffer; |
} | } |
else | else |
out << LIT("[]"); |
out << "[]"; |
} | } |
| |
Boolean hasValueField = false; | Boolean hasValueField = false; |
|
|
//if (!_value.isNull() || !(_value.getType() == CIMTYPE_BOOLEAN) ) | //if (!_value.isNull() || !(_value.getType() == CIMTYPE_BOOLEAN) ) |
//{ | //{ |
// KS With CIM Qualifier, this should be = | // KS With CIM Qualifier, this should be = |
out << LIT(" = "); |
out << " = "; |
hasValueField = true; | hasValueField = true; |
MofWriter::appendValueElement(out, _value); | MofWriter::appendValueElement(out, _value); |
//} | //} |
|
|
scopeString = MofWriter::getQualifierScope(_scope); | scopeString = MofWriter::getQualifierScope(_scope); |
//if (scopeString.size()) | //if (scopeString.size()) |
//{ | //{ |
out << LIT(", Scope(") << scopeString; |
out << ", Scope(" << scopeString << ")"; |
out.append(')'); |
|
//} | //} |
// Output Flavor Information | // Output Flavor Information |
String flavorString; | String flavorString; |
flavorString = MofWriter::getQualifierFlavor(_flavor); | flavorString = MofWriter::getQualifierFlavor(_flavor); |
if (flavorString.size()) | if (flavorString.size()) |
{ | { |
out << LIT(", Flavor(") << flavorString; |
out << ", Flavor(" << flavorString << ")"; |
out.append(')'); |
|
} | } |
// End each qualifier declaration with newline | // End each qualifier declaration with newline |
out << LIT(";\n"); |
out << ";\n"; |
} | } |
| |
| |