return _rep->buildPath(cimClass);
}
-String CIMInstance::toString() const
-{
- _checkRep();
- return _rep->toString();
-}
-
void CIMInstance::_checkRep() const
{
if (!_rep)
return _rep->buildPath(cimClass);
}
-String CIMConstInstance::toString() const
-{
- _checkRep();
- return _rep->toString();
-}
-
void CIMConstInstance::_checkRep() const
{
if (!_rep)
*/
Boolean isUninitialized() const;
-#ifdef PEGASUS_INTERNALONLY
- String toString() const;
-#endif
-
private:
CIMInstanceRep* _rep;
Boolean isUninitialized() const;
-#ifdef PEGASUS_INTERNALONLY
- String toString() const;
-#endif
-
private:
CIMInstanceRep* _rep;
return CIMObjectPath(String(), String(), className, keyBindings);
}
-String CIMInstanceRep::toString() const
-{
- String objectName;
- CIMObjectPath object = getPath();
-
- // Get the host:
-
- if (object.getHost().size() && !object.getNameSpace().isNull())
- {
- objectName = "//";
- objectName.append(object.getHost());
- objectName.append("/");
-
- objectName.append(object.getNameSpace().getString ());
- objectName.append(":");
- }
-
- // Get the class name:
-
- const CIMName& className = getClassName();
- objectName.append(className.getString ());
-
- //if (isClassName())
- // return objectName;
-
- objectName.append('.');
-
- // Append each key-value pair:
-
- //const Array<CIMKeyBinding>& keyBindings = getKeyBindings();
- CIMConstProperty prop;
-
- for (Uint32 i = 0, n = getPropertyCount(); i < n; i++)
- {
- prop = getProperty(i);
- objectName.append(prop.getName().getString ());
- objectName.append('=');
-
- //const String& value = _escapeSpecialCharacters(
- // prop.getValue());
- objectName.append(prop.getValue().toString());
-
- //CIMValue type = prop.getType();
-
- //if (type == CIMKeyBinding::REFERENCE)
- // objectName.append('R');
-
- //if (type == CIMKeyBinding::STRING || type == CIMKeyBinding::REFERENCE)
- // objectName.append('"');
-
- //objectName.append(value);
-
- //if (type == CIMKeyBinding::STRING || type == CIMKeyBinding::REFERENCE)
- // objectName.append('"');
-
- if (i + 1 != n)
- objectName.append(',');
- }
-
- return objectName;
-}
-
PEGASUS_NAMESPACE_END