version 1.18, 2004/10/17 20:39:16
|
version 1.23, 2005/10/31 17:39:11
|
|
|
//%2004//////////////////////////////////////////////////////////////////////// |
//%2005//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; | // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) | // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// Carol Ann Krug Graves, Hewlett-Packard Company | // Carol Ann Krug Graves, Hewlett-Packard Company |
// (carolann_graves@hp.com) | // (carolann_graves@hp.com) |
|
// David Dillard, VERITAS Software Corp. |
|
// (david.dillard@veritas.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
Boolean isTyped) | Boolean isTyped) |
: _parameterName(parameterName), _value(value), _isTyped(isTyped) | : _parameterName(parameterName), _value(value), _isTyped(isTyped) |
{ | { |
|
// ensure parameterName is not null |
|
if(parameterName.size() == 0) |
|
{ |
|
throw UninitializedObjectException(); |
|
} |
} | } |
| |
CIMParamValueRep::~CIMParamValueRep() | CIMParamValueRep::~CIMParamValueRep() |
|
|
// <!ELEMENT PARAMVALUE (VALUE|VALUE.REFERENCE|VALUE.ARRAY|VALUE.REFARRAY)?> | // <!ELEMENT PARAMVALUE (VALUE|VALUE.REFERENCE|VALUE.ARRAY|VALUE.REFARRAY)?> |
// <!ATTLIST PARAMVALUE | // <!ATTLIST PARAMVALUE |
// %CIMName; | // %CIMName; |
|
// %EmbeddedObject; #IMPLIED |
// %ParamType;> | // %ParamType;> |
// | // |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
void CIMParamValueRep::toXml(Array<Sint8>& out) const |
void CIMParamValueRep::toXml(Buffer& out) const |
{ | { |
out << "<PARAMVALUE NAME=\"" << _parameterName << "\""; | out << "<PARAMVALUE NAME=\"" << _parameterName << "\""; |
| |
|
|
| |
if (_isTyped) | if (_isTyped) |
{ | { |
|
// If the property type is CIMObject, then |
|
// encode the property in CIM-XML as a string with the EMBEDDEDOBJECT attribute |
|
// (there is not currently a CIM-XML "object" datatype) |
|
// else |
|
// output the real type |
|
if (type == CIMTYPE_OBJECT) |
|
{ |
|
out << " PARAMTYPE=\"string\""; |
|
out << " EMBEDDEDOBJECT=\"object\""; |
|
} |
|
else |
|
{ |
out << " PARAMTYPE=\"" << cimTypeToString (type) << "\""; | out << " PARAMTYPE=\"" << cimTypeToString (type) << "\""; |
} | } |
|
} |
| |
out << ">\n"; | out << ">\n"; |
XmlWriter::appendValueElement(out, _value); | XmlWriter::appendValueElement(out, _value); |
|
|
| |
void CIMParamValueRep::setParameterName(String& parameterName) | void CIMParamValueRep::setParameterName(String& parameterName) |
{ | { |
|
// ensure parameterName is not null |
|
if(parameterName.size() == 0) |
|
{ |
|
throw UninitializedObjectException(); |
|
} |
|
|
_parameterName = parameterName; | _parameterName = parameterName; |
} | } |
| |