version 1.1.2.5, 2009/12/04 13:57:19
|
version 1.6, 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 |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_SCMOStreamer_h | #ifndef Pegasus_SCMOStreamer_h |
|
|
| |
struct SCMOResolutionTable | struct SCMOResolutionTable |
{ | { |
// Though we really store a pointer here, it is stored as Uint64 to |
// Though we only store pointers here, it is stored as union of size 64bit |
// become independent from 64bit versus 32bit incarnations of the struct. |
// to become independent from 64bit versus 32bit incarnations of the struct. |
Uint64 scmbptr; |
union |
Uint32 index; |
{ |
|
Uint64 uint64; |
|
SCMOInstance* scmoInst; |
|
SCMBInstance_Main * scmbMain; |
|
} scmbptr; |
|
|
|
Uint64 index; |
}; | }; |
| |
#define PEGASUS_ARRAY_T SCMOResolutionTable | #define PEGASUS_ARRAY_T SCMOResolutionTable |
|
|
// | // |
// Returns the index position at which the instance was inserted in the | // Returns the index position at which the instance was inserted in the |
// instance resolver table. | // instance resolver table. |
Uint32 _appendToInstResolverTable(const SCMOInstance& inst, Uint32 idx); |
Uint32 _appendToInstResolverTable(SCMOInstance& inst, Uint32 idx); |
| |
| |
// Adds an instance to the class resolution table. | // Adds an instance to the class resolution table. |
|
|
// The array of SCMOInstances to be streamed | // The array of SCMOInstances to be streamed |
Array<SCMOInstance>& _scmoInstances; | Array<SCMOInstance>& _scmoInstances; |
| |
// Counters for the total number of classes and scmo instances |
|
// to be streamed. These counters increase during streaming process. |
|
Uint32 _ttlNumInstances; |
|
Uint32 _ttlNumClasses; |
|
|
|
// Index table used to resolve the absolute pointers to SCMOClasses | // Index table used to resolve the absolute pointers to SCMOClasses |
// to a relative sequence number (index) in the stream | // to a relative sequence number (index) in the stream |
Array<SCMOResolutionTable> _clsResolverTable; | Array<SCMOResolutionTable> _clsResolverTable; |