version 1.7, 2008/12/02 09:00:42
|
version 1.13, 2013/04/25 13:00:20
|
|
|
#include "StringRep.h" | #include "StringRep.h" |
#include "StringInline.h" | #include "StringInline.h" |
#include "Buffer.h" | #include "Buffer.h" |
#include "BinaryCodec.h" |
#include "SCMOStreamer.h" |
| |
#define INSTANCE_MAGIC 0xD6EF2219 | #define INSTANCE_MAGIC 0xD6EF2219 |
#define CLASS_MAGIC 0xA8D7DE41 | #define CLASS_MAGIC 0xA8D7DE41 |
|
|
| |
if (_validate) | if (_validate) |
{ | { |
// Get string without validation since we will validate namespace below. |
// Get string without validation and validate namespace below. |
| |
_validate = false; | _validate = false; |
| |
|
|
false, false); | false, false); |
break; | break; |
default: | default: |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
break; | break; |
} | } |
} | } |
|
|
putObject(*((CIMObject*)rep->u._instanceValue), false, false); | putObject(*((CIMObject*)rep->u._instanceValue), false, false); |
break; | break; |
default: | default: |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
break; | break; |
} | } |
} | } |
|
|
return true; | return true; |
} | } |
default: | default: |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
break; | break; |
} | } |
} | } |
|
|
return true; | return true; |
} | } |
default: | default: |
PEGASUS_ASSERT(0); |
PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);) |
break; | break; |
} | } |
} | } |
|
|
| |
for (Uint32 i = 0; i < n; i++) | for (Uint32 i = 0; i < n; i++) |
putName(rep->propertyNames[i]); | putName(rep->propertyNames[i]); |
|
|
|
Uint32 tagCount = rep->cimNameTags.size(); |
|
putUint32(tagCount); |
|
|
|
for(Uint32 j = 0; j < tagCount; j++) |
|
{ |
|
putUint32(rep->cimNameTags[j]); |
|
} |
} | } |
} | } |
| |
|
|
| |
x.~CIMPropertyList(); | x.~CIMPropertyList(); |
new(&x) CIMPropertyList(names); | new(&x) CIMPropertyList(names); |
|
|
|
Uint32 tagCount; |
|
if (!getUint32(tagCount)) |
|
{ |
|
return false; |
|
} |
|
|
|
for(Uint32 j=0;j<tagCount;j++) |
|
{ |
|
Uint32 tag; |
|
if (!getUint32(tag)) |
|
{ |
|
return false; |
|
} |
|
x.appendCIMNameTag(tag); |
|
} |
|
|
} | } |
| |
return true; | return true; |
|
|
putInstance(x[i], includeHostAndNamespace, includeKeyBindings); | putInstance(x[i], includeHostAndNamespace, includeKeyBindings); |
} | } |
| |
|
|
|
void CIMBuffer::putSCMOClass(const SCMOClass& scmoClass) |
|
{ |
|
SCMOStreamer::serializeClass(*this, scmoClass); |
|
} |
|
|
|
bool CIMBuffer::getSCMOClass(SCMOClass& scmoClass) |
|
{ |
|
return SCMOStreamer::deserializeClass(*this, scmoClass); |
|
} |
|
|
|
|
|
void CIMBuffer::putSCMOInstanceA(Array<SCMOInstance>& x) |
|
{ |
|
Uint32 n = x.size(); |
|
_grow(n<<13); |
|
|
|
putUint32(n); |
|
|
|
|
|
SCMOStreamer scmoStreamer(*this,x); |
|
scmoStreamer.serialize(); |
|
} |
|
|
|
bool CIMBuffer::getSCMOInstanceA(Array<SCMOInstance>& x) |
|
{ |
|
Uint32 n; |
|
|
|
if (!getUint32(n)) |
|
return false; |
|
|
|
SCMOStreamer scmoStreamer(*this,x); |
|
return scmoStreamer.deserialize(); |
|
} |
|
|
|
|
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |