Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWreqostream


RWvostream RWvios RWreqostream RWios

Module

CORBA Tools: CORBA Streaming Classes (orb library)

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Synopsis

#include <rw/toolpro/orbstrea.h>
CORBA::Request &req = ...;
RWreqostream orbOStream(req);

Required Libraries

orb, tls (and possibly std)

Description

Class RWreqostream is an output stream used to write an object's state to a CORBA::Request object. Class RWreqostream encapsulates the CORBA::Request insertion routines.

Class RWreqostream provides the capability to write all the standard data types and vectors of those data types from an object into a CORBA::Request. RWreqostream can be interrogated as to the status of the stream using the following member functions, inherited from the Tools.h++ class RWvios: bad(), clear(), eof(), fail(), good(), and rdstate().

ORB streams are used in conjunction with the IONA Orbix opaque mechanism. In order for a C++ object to be passed as an opaque type, the developer must write extraction and insertion operations for that object from and to a CORBA::Request. The implementation of the insertion operator can use RWreqostream to write the object's state to the CORBA::Request.

Example

The example that follows shows the implementation of the insertion operators required to write the state of an object to a CORBA::Request. These operators must pass an object as an opaque type in an IDL operation.

Say, for example, there is a user-defined type called Telemetry. Assuming that the developer has already written an insertion operator for Telemetry to an RWvostream with the following signature:

The CORBA::Request insertion functions would then appear as follows:

Note that under normal circumstances, whenever using the CORBA streaming classes you do not need to write these functions yourself. The expansion of the RWDEFINE_OPAQUE or RWDEFINE_OPAQUE_COLLECTABLE macro creates these functions for you.

Public Constructors

RWreqostream(CORBA::Request &req);

Public Member Functions

virtual RWvostream&
operator<<(const char* s);
virtual RWvostream&
operator<<(char c);
virtual RWvostream&
operator<<(wchar_t wc);
virtual RWvostream&
operator<<(unsigned char c);
virtual RWvostream&
operator<<(double d);
virtual RWvostream&
operator<<(float f);
virtual RWvostream&
operator<<(int i);
virtual RWvostream&
operator<<(unsigned int i);
virtual RWvostream&
operator<<(long l);
virtual RWvostream&
operator<<(unsigned long l);
virtual RWvostream&
operator<<(short s);
virtual RWvostream&
operator<<(unsigned short s);
virtual RWvostream&
put(char c);
virtual RWvostream&
put(unsigned char c);
virtual RWvostream&
put(wchar_t wc);
virtual RWvostream&
put(const char* p, size_t N);
virtual RWvostream&
put(const wchar_t* p, size_t N);
virtual RWvostream&
put(const short* p, size_t N);
virtual RWvostream&
put(const unsigned short* p, size_t N);
virtual RWvostream&
put(const int* p, size_t N);
virtual RWvostream&
put(const unsigned int* p, size_t N);
virtual RWvostream&
put(const long* p, size_t N);
virtual RWvostream&
put(const unsigned long* p, size_t N);
virtual RWvostream&
put(const float* p, size_t N);
virtual RWvostream&
put(const double* p, size_t N);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.