class CorStream : public CorBase

A simple stream class

Inheritance:


Public Classes

enum StreamFlow
$Id: CorStream

Public Methods

void become ( const CorStream& aRef )
void close ()
CorStream ( const RWCString& aFileName, StreamFlow aMode )
CorStream ( const CorStream& aRef )
CorStream ()
CorBool CorStream::isValid ()
RWCString getLine ( istream* aStream = 0 )
RWCString getName ()
CorBool isReading ()
CorBool isWriting ()
CorBool open ( StreamFlow aMode = CorStream::READ )
CorBool open ( const RWCString& aFileName, StreamFlow aMode )
CorStream& operator<< ( const char aChar )
CorStream& operator<< ( const int anInt )
CorStream& operator<< ( const short anInt )
CorStream& operator<< ( const unsigned short anInt )
CorStream& operator<< ( const double aDouble )
CorStream& operator<< ( const RWCString& aString )
friend CorStream& operator<< ( CorStream& aStream, const CorPersistent* anObject )
Purpose
Query whether this instance is in write mode
CorStream& operator<< ( const unsigned int anInt )
CorStream& operator<< ( const unsigned char aChar )
CorStream& operator= ( const CorStream& aRef )
CorStream& operator>> ( RWCString& aString )
CorStream& operator>> ( char& aChar )
CorStream& operator>> ( int& anInt )
CorStream& operator>> ( short& aValue )
CorStream& operator>> ( unsigned short& aValue )
CorStream& operator>> ( double& aDouble )
CorStream& operator>> ( unsigned char& aChar )
CorStream& operator>> ( unsigned int& anInt )
unsigned int read ( void* aBuffer, unsigned int aSize )
CorPersistent* readObject ( const CorRunTimeType* aType )
CorBool readText ( RWCString& aVal )
CorBool readText ( double& aVal )
CorBool readText ( int& aVal )
void write ( const void* aBuffer, unsigned int aSize )
void writeObject ( const CorPersistent* pOb )
void writeText ( const RWCString& aVal )
void writeText ( double aVal )
void writeText ( int aVal )
virtual ~CorStream ()

Public


Purpose
Close this instance

Purpose
Query whether this instance is valid (ie, the file could be openend successfullly, has not been closed yet etc)

Purpose
The default c'tor

Purpose
The d'tor

Purpose
Query whether this instance is in read mode
enum StreamFlow
$Id: CorStream

Protected Methods

CorBool clear ()

Protected


Purpose
Query the name of this stream (the file name)

Private Methods

friend void utest_CorStream (CorUnitTest&)
Purpose
Clear this instance

Documentation

A simple stream class
enum StreamFlow
$Id: CorStream.h,v 1.5 1997/07/11 08:33:51 mwiedmer Exp $

SYNOPSIS

    #include <CorStream.h>
  
    CorStream myObject;
  

DESCRIPTION
This class provides the stream operations for the basic types an a persistent object.

CAUTIONS

EXAMPLES

SEE ALSO
CorBase
CorPersistent

CorStream()

Purpose
The default c'tor.

Preconditions

  • Itemize this section if necessary. Remove itemization otherwise.

Exceptions

  • Itemize this section if necessary. Remove itemization otherwise.

CorStream( const RWCString& aFileName, StreamFlow aMode )

CorStream( const CorStream& aRef )

CorStream& operator=( const CorStream& aRef )

virtual ~CorStream()

Purpose
The d'tor.

Preconditions

  • Itemize this section if necessary. Remove itemization otherwise.

Exceptions

  • Itemize this section if necessary. Remove itemization otherwise.

CorStream& operator>>( char& aChar )

CorStream& operator>>( int& anInt )

CorStream& operator>>( short& aValue )

CorStream& operator>>( unsigned short& aValue )

CorStream& operator>>( double& aDouble )

CorStream& operator>>( RWCString& aString )

CorStream& operator<<( const char aChar )

CorStream& operator<<( const int anInt )

CorStream& operator<<( const short anInt )

CorStream& operator<<( const unsigned short anInt )

CorStream& operator<<( const double aDouble )

CorStream& operator<<( const RWCString& aString )

CorStream& operator>>( unsigned char& aChar )

CorStream& operator>>( unsigned int& anInt )

CorStream& operator<<( const unsigned char aChar )

CorStream& operator<<( const unsigned int anInt )

void write( const void* aBuffer, unsigned int aSize )

unsigned int read( void* aBuffer, unsigned int aSize )

void writeText( int aVal )

void writeText( double aVal )

void writeText( const RWCString& aVal )

CorBool readText( int& aVal )

CorBool readText( double& aVal )

CorBool readText( RWCString& aVal )

RWCString getLine( istream* aStream = 0 )

void close()

Purpose
Close this instance. Nothing can be written or read from it anymore.

Preconditions

  • Itemize this section if necessary. Remove itemization otherwise.

Exceptions

  • Itemize this section if necessary. Remove itemization otherwise.

CorBool open( const RWCString& aFileName, StreamFlow aMode )

CorBool open( StreamFlow aMode = CorStream::READ )

CorPersistent* readObject( const CorRunTimeType* aType )

void writeObject( const CorPersistent* pOb )

CorBool isReading()

Purpose
Query whether this instance is in read mode.

Preconditions

  • Itemize this section if necessary. Remove itemization otherwise.

Returns
This function returns corTRUE if this instance is in read mode.

Exceptions

  • Itemize this section if necessary. Remove itemization otherwise.

CorBool isWriting()

friend CorStream& operator<<( CorStream& aStream, const CorPersistent* anObject )
Purpose
Query whether this instance is in write mode.

Preconditions

Returns
This function returns corTRUE if this instance is in write mode.

Exceptions

CorBool CorStream::isValid()

Purpose
Query whether this instance is valid (ie, the file could be openend successfullly, has not been closed yet etc).

Preconditions

  • Itemize this section if necessary. Remove itemization otherwise.

Returns
This function returns corTRUE if this instance is valid.

Exceptions

  • Itemize this section if necessary. Remove itemization otherwise.

RWCString getName()

Purpose
Query the name of this stream (the file name).

Preconditions

  • Itemize this section if necessary. Remove itemization otherwise.

Returns
This function returns the file name of this stream.

Exceptions

  • Itemize this section if necessary. Remove itemization otherwise.

void become( const CorStream& aRef )

CorBool clear()

friend void utest_CorStream(CorUnitTest&)
Purpose
Clear this instance.

Preconditions

Exceptions


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de