version 1.67, 2002/07/30 16:14:53
|
version 1.68, 2002/07/31 15:45:25
|
|
|
} | } |
else { | else { |
out << "<KEYVALUE VALUETYPE=\""; | out << "<KEYVALUE VALUETYPE=\""; |
out << KeyBinding::typeToString(keyBindings[i].getType()); |
out << keyBindingTypeToString(keyBindings[i].getType()); |
out << "\">"; | out << "\">"; |
| |
// fixed the special character problem - Markus | // fixed the special character problem - Markus |
|
|
Array<Sint8>& out, | Array<Sint8>& out, |
const CIMObjectPath& objectPath) | const CIMObjectPath& objectPath) |
{ | { |
if (objectPath.isInstanceName()) |
// |
|
// ATTN-CAKG-P2-20020726: The following condition does not correctly |
|
// distinguish instanceNames from classNames in every case |
|
// The instanceName of a singleton instance of a keyless class has no |
|
// key bindings |
|
// |
|
if (objectPath.getKeyBindings ().size () != 0) |
{ | { |
appendLocalInstancePathElement(out, objectPath); | appendLocalInstancePathElement(out, objectPath); |
} | } |
|
|
| |
// See if it is a class or instance reference (instance references have | // See if it is a class or instance reference (instance references have |
// key-bindings; class references do not). | // key-bindings; class references do not). |
|
// |
|
// ATTN-CAKG-P2-20020726: The following condition does not correctly |
|
// distinguish instanceNames from classNames in every case |
|
// The instanceName of a singleton instance of a keyless class has no |
|
// key bindings |
|
// |
| |
//KeyBindingArray kbs = reference.getKeyBindingArray(); |
|
KeyBindingArray kbs = reference.getKeyBindings(); | KeyBindingArray kbs = reference.getKeyBindings(); |
| |
if (kbs.size()) | if (kbs.size()) |
|
|
const char* name, | const char* name, |
const CIMObjectPath& objectName) | const CIMObjectPath& objectName) |
{ | { |
if (objectName.isClassName()) |
// |
|
// ATTN-CAKG-P2-20020726: The following condition does not correctly |
|
// distinguish instanceNames from classNames in every case |
|
// The instanceName of a singleton instance of a keyless class also |
|
// has no key bindings |
|
// |
|
if (objectName.getKeyBindings ().size () == 0) |
{ | { |
XmlWriter::appendClassNameIParameter( | XmlWriter::appendClassNameIParameter( |
out, name, objectName.getClassName()); | out, name, objectName.getClassName()); |
|
|
return buffer; | return buffer; |
} | } |
| |
|
//------------------------------------------------------------------------------ |
|
// |
|
// XmlWriter::keyBindingTypeToString |
|
// |
|
//------------------------------------------------------------------------------ |
|
const char* XmlWriter::keyBindingTypeToString (KeyBinding::Type type) |
|
{ |
|
switch (type) |
|
{ |
|
case KeyBinding::BOOLEAN: |
|
return "boolean"; |
|
|
|
case KeyBinding::STRING: |
|
return "string"; |
|
|
|
case KeyBinding::NUMERIC: |
|
return "numeric"; |
|
|
|
case KeyBinding::REFERENCE: |
|
default: |
|
PEGASUS_ASSERT(false); |
|
} |
|
|
|
return "unknown"; |
|
} |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |