SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Handle class for all the object output stream implementation classes. More...
#include <rw/serial/RWObjectOutputStream.h>
Public Member Functions | |
RWObjectOutputStream (RWObjectOutputStreamImp *body) | |
RWObjectOutputStream (const RWObjectOutputStream &handle) | |
void | closeContext (bool writeContext=true) |
void | endAssoc () |
void | endBlock () |
void | endElement () |
void | endMap () |
void | endMember (const RWSymbol &memberName) |
void | endParent () |
void | endSequence () |
bool | needToWrite (const void *obj) |
void | newObjectMarker () |
void | openContext (bool writeContext=true) |
RWObjectOutputStream & | operator= (const RWObjectOutputStream &handle) |
void | putString (const RWCString &str) |
void | putString (const std::string &str) |
void | putSymbol (const RWSymbol &sym) |
void | putUString (const RWBasicUString &str) |
void | putWString (const RWWString &str) |
void | rememberObject (const void *obj) |
void | setNameForNextObject (const RWCString &instanceName) |
void | startAssocKey () |
void | startAssocValue () |
void | startBlock (const RWSymbol &typeInfo) |
void | startElement (int position) |
void | startMap (int count, RWStreamType keyType, RWStreamType valueType, const RWSymbol &typeInfo) |
void | startParent (const RWSymbol &typeInfo) |
void | startSequence (int count, RWStreamType elementType, const RWSymbol &typeInfo) |
void | writeMemberInfo (const RWSymbol &memberName, RWStreamType memberType) |
void | writeNullPtr () |
void | writeTypeInfo (const RWSymbol &typeInfo) |
Public Member Functions inherited from RWDataOutputStream | |
RWDataOutputStream (RWDataOutputStreamImp *ptr) | |
RWDataOutputStream (const RWDataOutputStream &handle) | |
void | close () |
void | flush () |
bool | isBad () const |
bool | isFail () const |
bool | isGood () const |
RWDataOutputStream & | operator<< (RWDataOutputStream &(*pf)(RWDataOutputStream &)) |
RWDataOutputStream | operator<< (RWDataOutputStream(*pf)(RWDataOutputStream &)) |
RWDataOutputStream & | operator<< (bool value) |
RWDataOutputStream & | operator<< (char value) |
RWDataOutputStream & | operator<< (unsigned char value) |
RWDataOutputStream & | operator<< (signed char value) |
RWDataOutputStream & | operator<< (short value) |
RWDataOutputStream & | operator<< (unsigned short value) |
RWDataOutputStream & | operator<< (int value) |
RWDataOutputStream & | operator<< (unsigned int value) |
RWDataOutputStream & | operator<< (long value) |
RWDataOutputStream & | operator<< (unsigned long value) |
RWDataOutputStream & | operator<< (float value) |
RWDataOutputStream & | operator<< (double value) |
RWDataOutputStream & | operator<< (wchar_t value) |
RWDataOutputStream & | operator<< (long long value) |
RWDataOutputStream & | operator<< (long double value) |
RWDataOutputStream & | operator= (const RWDataOutputStream &handle) |
void | putBool (bool value) |
void | putBools (const bool *arrayPt, RWSize count) |
void | putChar (char value) |
virtual void | putCharacter (char value) |
void | putChars (const char *arrayPt, RWSize count) |
void | putDouble (double value) |
void | putDoubles (const double *arrayPt, RWSize count) |
void | putFloat (float value) |
void | putFloats (const float *arrayPt, RWSize count) |
void | putInt (int value) |
void | putInts (const int *arrayPt, RWSize count) |
void | putLong (long value) |
void | putLongDouble (long double value) |
void | putLongDoubles (const long double *arrayPt, RWSize count) |
void | putLongLong (long long value) |
void | putLongLongs (const long long *arrayPt, RWSize count) |
void | putLongs (const long *arrayPt, RWSize count) |
void | putShort (short value) |
void | putShorts (const short *arrayPt, RWSize count) |
void | putSignedChar (signed char value) |
void | putSignedChars (const signed char *arrayPt, RWSize count) |
virtual void | putSizeT (size_t value) |
void | putString (const char *string, RWSize count) |
virtual void | putUCharacter (RWUChar value) |
void | putUnsignedChar (unsigned char value) |
void | putUnsignedChars (const unsigned char *arrayPt, RWSize count) |
void | putUnsignedInt (unsigned int value) |
void | putUnsignedInts (const unsigned int *arrayPt, RWSize count) |
void | putUnsignedLong (unsigned long value) |
void | putUnsignedLongs (const unsigned long *arrayPt, RWSize count) |
void | putUnsignedShort (unsigned short value) |
void | putUnsignedShorts (const unsigned short *arrayPt, RWSize count) |
void | putUString (const RWUChar *ustring, RWSize count) |
void | putWchar_t (wchar_t value) |
void | putWchar_ts (const wchar_t *arrayPt, RWSize count) |
virtual void | putWCharacter (wchar_t value) |
void | putWString (const wchar_t *wstring, RWSize count) |
Public Member Functions inherited from RWHandleBase | |
bool | isValid (void) const |
bool | operator!= (const RWHandleBase &second) const |
bool | operator< (const RWHandleBase &second) const |
bool | operator== (const RWHandleBase &second) const |
Additional Inherited Members | |
Protected Member Functions inherited from RWHandleBase | |
RWHandleBase (void) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (const RWHandleBase &second) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
Related Functions inherited from RWDataOutputStream | |
RWDataOutputStream & | rwEndl (RWDataOutputStream &stream) |
RWDataOutputStream & | rwEnds (RWDataOutputStream &stream) |
RWDataOutputStream & | rwFlush (RWDataOutputStream &stream) |
RWDataOutputStream | rwGuard (RWDataOutputStream &stream) |
RWDataOutputStream & | rwWEndl (RWDataOutputStream &stream) |
RWDataOutputStream & | rwWEnds (RWDataOutputStream &stream) |
Handle class for all the object output stream implementation classes. Implements the handle idiom from the handle/body pattern. With the exception of constructors and assignment operators, all member functions forward directly to the implementation associated with this handle during construction.
|
inlineexplicit |
Constructor.
body | The stream implementation to associate with this handle. |
|
inline |
Copy constructor. Throws no exceptions.
handle | A data stream handle used to initialize the newly created handle. |
|
inline |
Called by RWWithObjectOutputContext dtor
to close an open context.
|
inline |
Called by the output operators for association types after each value.
|
inline |
Outputs tokens that identify the end of an object.
|
inline |
Called by the output operators for collection types after each element in a sequence.
|
inline |
Called by the output operators for association types after all the pairs.
|
inline |
Called by streamContents() after each data member is written.
memberName | Identifies the name of the member. |
|
inline |
Outputs tokens that identify the end of an parent class.
|
inline |
Called by the output operators for collection types at the end of a sequence.
|
inline |
Returns true
when the referenced object has not yet been written to the stream in the current context. Otherwise, outputs tokens identifying this object as having been previously streamed, and the function returns false
.
|
inline |
Output is a token indicating that an object will be created by the factory.
|
inline |
Called by RWWithObjectOutputContext ctor
to open a context in which multiple references to a single object are resolved.
|
inline |
Assignment operator. Throws no exceptions.
handle | A data stream handle used to initialize this handle. |
|
inline |
Writes an RWCString to the stream.
|
inline |
Writes a std::string to the stream.
|
inline |
Writes an RWSymbol to the stream.
|
inline |
Writes an RWBasicUString to the stream.
|
inline |
Writes an RWWString to the stream.
|
inline |
Called by streaming operators to record each instance streamed out, in case it is referenced again in the same context.
obj | Holds the address of the instance. |
|
inline |
Sets up the instance name for the next object to be written out.
|
inline |
Called by the output operators for association types before each key.
|
inline |
Called by the output operators for association types after each key and before each value.
|
inline |
Outputs tokens that identify the start of a new object.
typeInfo | Identifies the type of the new object, if such information is available. |
|
inline |
Called by the output operators for collection types before each element in a sequence.
position | Contains the position of the element. |
|
inline |
Called by the output operators for association types (hash tables, etc.) at the start.
count | Contains the number of items in the association. |
keyType | Contains the type of key in the association. |
valueType | Contains the type of value in the association. |
typeInfo | Contains the type of the association (collection) itself. |
|
inline |
Outputs tokens that identify the start of a parent class.
typeInfo | Identifies the type of the parent class, if such information is available. |
|
inline |
Called by the output operators for collection types at the start of a sequence.
count | Contains the number of items in the collection. |
elementType | Contains the type of element in the collection. |
typeInfo | Contains the type of the collection itself. |
|
inline |
Called for before each data member by the streamContents() function. Metadata about the field may or may not be written to the stream, depending on the implementation. This function returns true
if data is actually written out; otherwise returns false
.
memberName | Identifies the name of the member. |
memberType | Identifies the type of the member. |
|
inline |
Output is a token representing a null pointer.
|
inline |
Outputs the type information required to factory an object of the correct dynamic type (derived class) on input.
typeInfo | Identifies the type of the new object, if such information is available. |
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |