Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWreqistream


RWvistream RWvios RWreqistream 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 = ...;
RWreqistream orbIStream(req);

Required Libraries

orb, tls (and possibly std)

Description

Class RWreqistream is an input stream used to read an object's state from a CORBA::Request object. Class RWreqistream encapsulates the CORBA::Request extraction routines.

Class RWreqistream provides the capability to read all the standard data types and vectors of those data types from the CORBA::Request into an object. RWreqistream can be interrogated about 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 make use of RWreqistream to read in the object's state from the CORBA::Request.

Example

The example that follows shows the implementation of the extraction operator required to read the state of an object from a CORBA::Request. This operator must pass an object as an opaque type in an IDL operation.

Say, for example, there is a user-defined type called Telemetry. Suppose that the developer has already written an extraction operator for Telemetry from an RWvistream with the following signature:

The CORBA::Request extraction function would then appear as follows:

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

Public Constructors

RWreqistream(CORBA::Request &req);

Public Member Functions

virtual int
get();
virtual RWvistream&
get(char& c);
virtual RWvistream&
get(wchar_t& wc);
virtual RWvistream&
get(unsigned char& c);
virtual RWvistream&
get(char* v, size_t N);
virtual RWvistream&
get(unsigned char* v, size_t N);
virtual RWvistream&
get(double* v, size_t N);
virtual RWvistream&
get(float* v, size_t N);
virtual RWvistream&
get(int* v, size_t N);
virtual RWvistream&
get(unsigned int* v, size_t N);
virtual RWvistream&
get(long* v, size_t N);
virtual RWvistream&
get(unsigned long* v, size_t N);
virtual RWvistream&
get(short* v, size_t N);
virtual RWvistream&
get(unsigned short* v, size_t N);
virtual RWvistream&
get(wchar_t* v, size_t N);
virtual RWvistream&
getString(char* s, size_t maxlen);
virtual RWvistream&
operator>>(char& c );
virtual RWvistream&
operator>>(double& d);
virtual RWvistream&
operator>>(float& f);
virtual RWvistream&
operator>>(int&  i);
virtual RWvistream&
operator>>(long& l);
virtual RWvistream&
operator>>(short& s);
virtual RWvistream&
operator>>(wchar_t& wc);
virtual RWvistream&
operator>>(unsigned char& c);
virtual RWvistream&
operator>>(unsigned int& i);
virtual RWvistream&
operator>>(unsigned long& l);
virtual RWvistream&
operator>>(unsigned short& s);


Previous fileTop of DocumentContentsIndexNext file

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