version 1.4.2.3, 2012/02/15 17:47:07
|
version 1.7, 2013/02/13 11:39:58
|
|
|
// | // |
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// |
// | // |
|
// This code implements part of PEP#348 - The CMPI infrastructure using SCMO |
|
// (Single Chunk Memory Objects). |
|
// The design document can be found on the OpenPegasus website openpegasus.org |
|
// at https://collaboration.opengroup.org/pegasus/pp/documents/21210/PEP_348.pdf |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
|
|
} | } |
} | } |
| |
// EXP_PULL_BEGIN |
|
void SCMOXmlWriter::appendValueSCMOInstanceWithPathElements( |
|
Buffer& out, |
|
const Array<SCMOInstance> & _scmoInstances, |
|
const CIMPropertyList & propertyList) |
|
{ |
|
if (propertyList.isNull()) |
|
{ |
|
Array<Uint32> emptyNodes; |
|
for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++) |
|
{ |
|
SCMOXmlWriter::appendValueSCMOInstanceWithPathElement( |
|
out, |
|
_scmoInstances[i], |
|
false, |
|
emptyNodes); |
|
} |
|
} |
|
else |
|
{ |
|
Array<propertyFilterNodesArray_t> propFilterNodesArrays; |
|
|
|
for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++) |
|
{ |
|
// This searches for an already created array of nodes, |
|
// if not found, creates it inside propFilterNodesArrays |
|
const Array<Uint32> & nodes= |
|
SCMOXmlWriter::getFilteredNodesArray( |
|
propFilterNodesArrays, |
|
_scmoInstances[i], |
|
propertyList); |
|
|
|
SCMOXmlWriter::appendValueSCMOInstanceWithPathElement( |
|
out, |
|
_scmoInstances[i], |
|
true, |
|
nodes); |
|
} |
|
} |
|
} |
|
//EXP_PULL_END |
|
|
|
// KS_TODO - Show the XML statement for this function |
|
void SCMOXmlWriter::appendValueSCMOInstanceElement( | void SCMOXmlWriter::appendValueSCMOInstanceElement( |
Buffer& out, | Buffer& out, |
const SCMOInstance& scmoInstance, | const SCMOInstance& scmoInstance, |
bool filtered, | bool filtered, |
const Array<Uint32> & nodes) | const Array<Uint32> & nodes) |
|
|
{ | { |
out << STRLIT("<VALUE.NAMEDINSTANCE>\n"); | out << STRLIT("<VALUE.NAMEDINSTANCE>\n"); |
| |
|
|
out << STRLIT("</VALUE.NAMEDINSTANCE>\n"); | out << STRLIT("</VALUE.NAMEDINSTANCE>\n"); |
} | } |
| |
// EXP_PULL_BEGIN |
|
//------------------------------------------------------------------------------ |
|
// |
|
// appendValueInstanceWithPathElement() -- Pull Operation support |
|
// |
|
// <!ELEMENT VALUE.INSTANCEWITHPATH (INSTANCEPATH,INSTANCE)> |
|
// |
|
//------------------------------------------------------------------------------ |
|
|
|
// KS_TODO - Double check to be sure this not duplication |
|
void SCMOXmlWriter::appendValueSCMOInstanceWithPathElement( |
|
Buffer& out, |
|
const SCMOInstance& scmoInstance, |
|
bool filtered, |
|
const Array<Uint32> & nodes) |
|
{ |
|
out << STRLIT("<VALUE.INSTANCEWITHPATH>\n"); |
|
|
|
appendInstancePathElement(out,scmoInstance); |
|
appendInstanceElement(out, scmoInstance, filtered, nodes); |
|
|
|
out << STRLIT("</VALUE.INSTANCEWITHPATH>\n"); |
|
} |
|
//EXP_PULL_END |
|
|
|
void SCMOXmlWriter::appendInstanceNameElement( | void SCMOXmlWriter::appendInstanceNameElement( |
Buffer& out, | Buffer& out, |
const SCMOInstance& scmoInstance) | const SCMOInstance& scmoInstance) |
|
|
} | } |
} | } |
| |
//EXP_PULL_BEGIN |
|
//------------------------------------------------------------------------------ |
|
// |
|
// appendValueInstanceWithPathElement() |
|
// |
|
// <!ELEMENT VALUE.INSTANCEWITHPATH (INSTANCEPATH,INSTANCE)> |
|
// |
|
//------------------------------------------------------------------------------ |
|
// EXP_PULL_TBD checkout the INSTANCEPATH vs NAMEDINSTANCE differences |
|
// Can we create something more common |
|
void SCMOXmlWriter::appendValueInstanceWithPathElement( |
|
Buffer& out, |
|
const SCMOInstance& namedInstance, |
|
bool filtered, |
|
const Array<Uint32> & nodes) |
|
{ |
|
out << STRLIT("<VALUE.INSTANCEWITHPATH>\n"); |
|
|
|
appendInstancePathElement(out, namedInstance); |
|
appendInstanceElement(out, namedInstance, filtered, nodes); |
|
|
|
out << STRLIT("</VALUE.INSTANCEWITHPATH>\n"); |
|
} |
|
//EXP_PULL_END |
|
|
|
// appendValueObjectWithPathElement() | // appendValueObjectWithPathElement() |
// <!ELEMENT VALUE.OBJECTWITHPATH | // <!ELEMENT VALUE.OBJECTWITHPATH |
// ((CLASSPATH,CLASS)|(INSTANCEPATH,INSTANCE))> | // ((CLASSPATH,CLASS)|(INSTANCEPATH,INSTANCE))> |