CLHEP/StdHepC++/StdStreams.hh
// $Id: StdStreams.hh,v 1.2 2000/04/25 14:26:22 evc Exp $
// -*- C++ -*-
//
// StdStreams.hh
//
// used internally to keep track of stream information
//
#ifndef STDSTREAMS_HH
#define STDSTREAMS_HH
#include <string>
#include <vector>
#include "CLHEP/config/CLHEP.h"
HEP_BEGIN_NAMESPACE(StdHep)
class StreamElement {
public:
// --- birth/death:
//
inline StreamElement( int stream, HepStdString xfile );
inline StreamElement( );
inline StreamElement( const StreamElement & orig );
~StreamElement() { ; }
// --- accessors:
//
int XDRStream() const { return itsXDRStream; }
HepStdString XDRFile() const { return itsXDRFile; }
// --- mutators:
//
void setXDRStream ( int nmbr ) { itsXDRStream = nmbr; }
void setXDRFile ( HepStdString fl ) { itsXDRFile = fl; }
// --- forbidden operations:
//
StreamElement & operator=( const StreamElement & ) { return *this; }
private:
int itsXDRStream;
HepStdString itsXDRFile;
}; // StreamElement
class Streams {
public:
// --- birth/death:
//
Streams( int nstr ): itsNumberOfStreams ( nstr ) { ; }
Streams( const Streams & orig ): itsNumberOfStreams ( orig.itsNumberOfStreams ) { ; }
~Streams() { ; }
// --- accessors:
//
int NumberOfStreams() const { return itsNumberOfStreams; }
StreamElement IOSreams( int i ) const { return itsStreamList[i]; }
// --- mutators:
//
void setNumberOfStreams ( int nmbr ) { itsNumberOfStreams = nmbr; }
void appendStream ( StreamElement c ) { itsStreamList.push_back( c ); }
private:
int itsNumberOfStreams;
HepStdVector<StreamElement> itsStreamList;
}; //Streams
// inline functions
StreamElement::StreamElement( int stream, HepStdString xfile )
: itsXDRStream ( stream ),
itsXDRFile ( xfile )
{ ; }
StreamElement::StreamElement( )
: itsXDRStream ( 0 ),
itsXDRFile ( 0 )
{ ; }
StreamElement::StreamElement( const StreamElement & orig )
: itsXDRStream ( orig.itsXDRStream ),
itsXDRFile ( orig.itsXDRFile )
{ ; }
HEP_END_NAMESPACE(StdHep)
#endif // STDSTREAMS_HH
Generated by GNU enscript 1.6.1.