Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

MCFsbistreamBase Class Reference

#include <MCFsbistreamBase.h>

Inheritance diagram for MCFsbistreamBase:

Inheritance graph
[legend]
Collaboration diagram for MCFsbistreamBase:

Collaboration graph
[legend]

Public Member Functions

int arraydim ()
int author ()
int bplen_a ()
int bplen_coef ()
int bplen_mpsizeb ()
int bplen_n ()
void clear_openfail ()
virtual void close ()
int cmax_exist ()
int cmax_theory ()
int cmax_this ()
int cmin_exist ()
int cmin_theory ()
int cmin_this ()
string & descript ()
int finalstep ()
void finalstep (const int)
virtual void findmpacket (MCFmpBase &, const char mcode, const int n)
virtual void inheader ()
virtual void initmfilepos ()
virtual bool isopen ()
 MCFsbistreamBase (istream &is=cin)
int mmax_exist ()
int mmax_theory ()
int mmax_this ()
int mmin_exist ()
int mmin_theory ()
int mmin_this ()
virtual void open ()
bool openfail ()
int release ()
virtual void report (ostream &os=cout)
int revision ()
int sbn ()
int version ()
virtual ~MCFsbistreamBase ()

Protected Attributes

int _arraydim
int _author
int _bplen_a
int _bplen_coef
int _bplen_mpsizeb
int _bplen_n
int _cmax_exist
int _cmax_theory
int _cmax_this
int _cmin_exist
int _cmin_theory
int _cmin_this
int _datatype_code
string _descript
int _finalstep
istream * _is
int _mmax_exist
int _mmax_theory
int _mmax_this
int _mmin_exist
int _mmin_theory
int _mmin_this
bool _openfail
int _release
int _revision
int _sbn
int _version

Constructor & Destructor Documentation

MCFsbistreamBase::MCFsbistreamBase istream &  is = cin  ) 
 

Definition at line 18 of file MCFsbistreamBase.cpp.

References MCF_CODE_UNKNOWN.

00019   : _openfail(false),
00020     _version(0), _revision(2), _release(0), _author(0), _descript(""),
00021     _arraydim(0), _sbn(0),
00022     _mmin_this(0), _mmax_this(31), _mmin_exist(0), _mmax_exist(31),
00023     _mmin_theory(0), _mmax_theory(31), 
00024     _cmin_this(0), _cmax_this(255), _cmin_exist(0), _cmax_exist(255),
00025     _cmin_theory(0), _cmax_theory(255), 
00026     _bplen_mpsizeb(2), _bplen_coef(8), 
00027     _datatype_code(MCF_CODE_UNKNOWN),
00028     _bplen_n(2), _bplen_a(2),
00029     _is(&is)
00030 {
00031 #ifdef STORM_DEBUG
00032    cout << "MCFsbistreamBase Constructor.\n";
00033 #endif
00034 //   _finalstep =( 1 << _mmax ) - 1;    HACK
00035    _finalstep = -1;
00036 }

virtual MCFsbistreamBase.~MCFsbistreamBase  )  [virtual]
 

Definition at line 27 of file MCFsbistreamBase.h.

00027 {}


Member Function Documentation

int MCFsbistreamBase.arraydim  ) 
 

Definition at line 46 of file MCFsbistreamBase.h.

00046 { return _arraydim; }

int MCFsbistreamBase.author  ) 
 

Definition at line 44 of file MCFsbistreamBase.h.

00044 { return _author; }

int MCFsbistreamBase.bplen_a  ) 
 

Definition at line 63 of file MCFsbistreamBase.h.

00063 { return _bplen_a; }

int MCFsbistreamBase.bplen_coef  ) 
 

Definition at line 61 of file MCFsbistreamBase.h.

00061 { return _bplen_coef; }

int MCFsbistreamBase.bplen_mpsizeb  ) 
 

Definition at line 60 of file MCFsbistreamBase.h.

00060 { return _bplen_mpsizeb; }

int MCFsbistreamBase.bplen_n  ) 
 

Definition at line 62 of file MCFsbistreamBase.h.

00062 { return _bplen_n; }

void MCFsbistreamBase.clear_openfail  ) 
 

Definition at line 68 of file MCFsbistreamBase.h.

References _openfail.

00068 { _openfail = false; } // NEW HACK

virtual void MCFsbistreamBase.close  )  [virtual]
 

Reimplemented in MCFsbifstream< Rtmra_t >.

Definition at line 37 of file MCFsbistreamBase.h.

00037 {}

int MCFsbistreamBase.cmax_exist  ) 
 

Definition at line 57 of file MCFsbistreamBase.h.

00057 { return _cmax_exist; }

int MCFsbistreamBase.cmax_theory  ) 
 

Definition at line 59 of file MCFsbistreamBase.h.

00059 { return _cmax_theory; }

int MCFsbistreamBase.cmax_this  ) 
 

Definition at line 55 of file MCFsbistreamBase.h.

00055 { return _cmax_this; }

int MCFsbistreamBase.cmin_exist  ) 
 

Definition at line 56 of file MCFsbistreamBase.h.

00056 { return _cmin_exist; }

int MCFsbistreamBase.cmin_theory  ) 
 

Definition at line 58 of file MCFsbistreamBase.h.

00058 { return _cmin_theory; }

int MCFsbistreamBase.cmin_this  ) 
 

Definition at line 54 of file MCFsbistreamBase.h.

00054 { return _cmin_this; }

string& MCFsbistreamBase.descript  ) 
 

Definition at line 45 of file MCFsbistreamBase.h.

00045 { return _descript; }

int MCFsbistreamBase.finalstep  ) 
 

Definition at line 65 of file MCFsbistreamBase.h.

00065 { return _finalstep; }

void MCFsbistreamBase::finalstep const  int  ) 
 

Definition at line 102 of file MCFsbistreamBase.h.

00103 { 
00104    _finalstep = finalstep; 
00105 }

virtual void MCFsbistreamBase.findmpacket MCFmpBase ,
const char  mcode,
const int  n
[virtual]
 

Reimplemented in MCFsbifstream< Rtmra_t >.

Definition at line 39 of file MCFsbistreamBase.h.

Referenced by MCFsbistream< Rtmra_t >.jump_read(), and MCFsbistream< Rtmra_t >.operator>>().

00039 {}

void MCFsbistreamBase::inheader  )  [virtual]
 

Definition at line 74 of file MCFsbistreamBase.cpp.

References ii.

Referenced by open().

00075 {
00076    char c;
00077    bytepack bp;
00078 
00079    char ptc[9];
00080    for( int i = 0; i < 8; i++ ) { 
00081       (*_is) >> ptc[i]; 
00082 #ifdef STORM_DEBUG
00083       cout << ptc[i];  
00084 #endif
00085    }
00086    ptc[8] = 0;
00087    if ( strcmp(ptc,"MCF_____\0") ) { 
00088      cout << ptc << " not a MCFsb file!\n"; 
00089    }
00090 
00091    (*_is) >> bp( 0, 4 ); int mcfsizeb1 = int(bp);
00092 
00093    (*_is) >> bp( 0, 1 ); _version = int(bp);
00094    (*_is) >> bp( 0, 1 ); _revision = int(bp);
00095    (*_is) >> bp( 0, 1 ); _release = int(bp);
00096    (*_is) >> bp( 0, 1 ); _author = int(bp);
00097    
00098    (*_is) >> bp( 0, 1 ); int ii = int(bp);
00099    _descript="";
00100    for( int i = 0; i < ii; i++ ) { 
00101       (*_is).get(c); 
00102       _descript += c; 
00103    }
00104 
00105 //   (*_is) >> bp( 0, 4 ); int mpsizeb1 = int(bp);
00106    (*_is) >> bp( 0, 4 ); int sbsizeb1 = int(bp);
00107 
00108    (*_is) >> bp( 0, 1 );
00109    (*_is) >> bp( 0, 1 ); _arraydim = int(bp);
00110    (*_is) >> bp( 0, 1 ); _bplen_mpsizeb = int(bp);
00111    (*_is) >> bp( 0, 1 ); _bplen_coef = int(bp);
00112    (*_is) >> bp( 0, 1 ); _bplen_n = int(bp);
00113    for( int d = 0; d < _arraydim; ++d ) {
00114       (*_is) >> bp( 0, 1 ); _bplen_a = int(bp);
00115    }
00116 
00117    (*_is) >> bp( 0, 4 ); _sbn = int(bp);
00118    (*_is) >> bp( 0, 1 ); _mmin_this = int(bp);
00119    (*_is) >> bp( 0, 1 ); _mmax_this = int(bp);
00120    (*_is) >> bp( 0, 1 ); _mmin_exist = int(bp);
00121    (*_is) >> bp( 0, 1 ); _mmax_exist = int(bp);
00122    (*_is) >> bp( 0, 1 ); _mmin_theory = int(bp);
00123    (*_is) >> bp( 0, 1 ); _mmax_theory = int(bp);
00124    (*_is) >> bp( 0, 1 ); _cmin_this = int(bp);
00125    (*_is) >> bp( 0, 1 ); _cmax_this = int(bp);
00126    (*_is) >> bp( 0, 1 ); _cmin_exist = int(bp);
00127    (*_is) >> bp( 0, 1 ); _cmax_exist = int(bp);
00128    (*_is) >> bp( 0, 1 ); _cmin_theory = int(bp);
00129    (*_is) >> bp( 0, 1 ); _cmax_theory = int(bp);
00130    (*_is) >> bp( 0, 1 ); int datatype_code = int(bp);
00131    (*_is) >> bp( 0, 1 );
00132    (*_is) >> bp( 0, 1 );
00133    (*_is) >> bp( 0, 1 );
00134 
00135 //   _finalstep = ( 1 << _mmax ) - 1;   HACK
00136    _finalstep = -1;
00137 
00138    if (datatype_code != _datatype_code )
00139      cout << "MCFsbistreamBase::inheader(): WARNING: datatype_code mismatch\n";
00140 
00141 };

virtual void MCFsbistreamBase.initmfilepos  )  [virtual]
 

Reimplemented in MCFsbifstream< Rtmra_t >.

Definition at line 38 of file MCFsbistreamBase.h.

00038 {}

bool MCFsbistreamBase::isopen  )  [virtual]
 

Reimplemented in MCFsbifstream< Rtmra_t >.

Definition at line 114 of file MCFsbistreamBase.h.

00114 { return (*_is).good(); }

int MCFsbistreamBase.mmax_exist  ) 
 

Definition at line 51 of file MCFsbistreamBase.h.

00051 { return _mmax_exist; }

int MCFsbistreamBase.mmax_theory  ) 
 

Definition at line 53 of file MCFsbistreamBase.h.

00053 { return _mmax_theory; }

int MCFsbistreamBase.mmax_this  ) 
 

Definition at line 49 of file MCFsbistreamBase.h.

00049 { return _mmax_this; }

int MCFsbistreamBase.mmin_exist  ) 
 

Definition at line 50 of file MCFsbistreamBase.h.

00050 { return _mmin_exist; }

int MCFsbistreamBase.mmin_theory  ) 
 

Definition at line 52 of file MCFsbistreamBase.h.

00052 { return _mmin_theory; }

int MCFsbistreamBase.mmin_this  ) 
 

Definition at line 48 of file MCFsbistreamBase.h.

00048 { return _mmin_this; }

void MCFsbistreamBase::open  )  [virtual]
 

Reimplemented in MCFsbifstream< Rtmra_t >.

Definition at line 111 of file MCFsbistreamBase.h.

References inheader().

Referenced by MCFsbistream< Rtmra_t >.jump_read(), MCFsbifstream< Rtmra_t >.open(), and MCFsbistream< Rtmra_t >.operator>>().

00111 { inheader(); }

bool MCFsbistreamBase.openfail  ) 
 

Definition at line 67 of file MCFsbistreamBase.h.

References _openfail.

00067 { return _openfail; } // NEW HACK

int MCFsbistreamBase.release  ) 
 

Definition at line 43 of file MCFsbistreamBase.h.

00043 { return _release; }

void MCFsbistreamBase::report ostream &  os = cout  )  [virtual]
 

Definition at line 38 of file MCFsbistreamBase.cpp.

Referenced by MCFsbifstream< Rtmra_t >.open().

00039 {
00040    os << "MCFsbistreamBase::report():\n";
00041    os << "   MCF REPORT version= " <<_version << endl;
00042    os << "   MCF REPORT revision= " << _revision << endl;
00043    os << "   MCF REPORT release= " << _release << endl;
00044    os << "   MCF REPORT author= " << _author << endl;
00045    os << "   MCF REPORT descript.size()= " << _descript.size() << endl;
00046    os << "   MCF REPORT descript= " << _descript << endl;
00047 
00048    os << "   MCF REPORT arraydim= " << _arraydim << endl;
00049    os << "   MCF REPORT bplen_mpsizeb= " << _bplen_mpsizeb << endl;
00050    os << "   MCF REPORT bplen_coef= " << _bplen_coef << endl;
00051    os << "   MCF REPORT bplen_n= " << _bplen_n << endl;
00052    for( int d = 0; d < _arraydim; ++d ) {
00053       os << "   MCF REPORT bplen_a[" << d << "]= " << _bplen_a << endl;
00054    }
00055 
00056    os << "   MCF REPORT sbn= " << _sbn << endl;
00057    os << "   MCF REPORT mmin_this= " << _mmin_this << endl;
00058    os << "   MCF REPORT mmax_this= " << _mmax_this << endl;
00059    os << "   MCF REPORT mmin_exist= " << _mmin_exist << endl;
00060    os << "   MCF REPORT mmax_exist= " << _mmax_exist << endl;
00061    os << "   MCF REPORT mmin_theory= " << _mmin_theory << endl;
00062    os << "   MCF REPORT mmax_theory= " << _mmax_theory << endl;
00063    os << "   MCF REPORT cmin_this= " << _cmin_this << endl;
00064    os << "   MCF REPORT cmax_this= " << _cmax_this << endl;
00065    os << "   MCF REPORT cmin_exist= " << _cmin_exist << endl;
00066    os << "   MCF REPORT cmax_exist= " << _cmax_exist << endl;
00067    os << "   MCF REPORT cmin_theory= " << _cmin_theory << endl;
00068    os << "   MCF REPORT cmax_theory= " << _cmax_theory << endl;
00069    os << "   MCF REPORT datatype_code= " << _datatype_code << endl;
00070 
00071    os << "   MCF REPORT finalstep=" << _finalstep << '\n';
00072 };

int MCFsbistreamBase.revision  ) 
 

Definition at line 42 of file MCFsbistreamBase.h.

00042 { return _revision; }

int MCFsbistreamBase.sbn  ) 
 

Definition at line 47 of file MCFsbistreamBase.h.

00047 { return _sbn; }

int MCFsbistreamBase.version  ) 
 

Definition at line 41 of file MCFsbistreamBase.h.

00041 { return _version; }


Field Documentation

int MCFsbistreamBase._arraydim [protected]
 

Definition at line 79 of file MCFsbistreamBase.h.

int MCFsbistreamBase._author [protected]
 

Definition at line 76 of file MCFsbistreamBase.h.

int MCFsbistreamBase._bplen_a [protected]
 

Definition at line 94 of file MCFsbistreamBase.h.

int MCFsbistreamBase._bplen_coef [protected]
 

Definition at line 91 of file MCFsbistreamBase.h.

int MCFsbistreamBase._bplen_mpsizeb [protected]
 

Definition at line 90 of file MCFsbistreamBase.h.

int MCFsbistreamBase._bplen_n [protected]
 

Definition at line 93 of file MCFsbistreamBase.h.

int MCFsbistreamBase._cmax_exist [protected]
 

Definition at line 87 of file MCFsbistreamBase.h.

int MCFsbistreamBase._cmax_theory [protected]
 

Definition at line 88 of file MCFsbistreamBase.h.

int MCFsbistreamBase._cmax_this [protected]
 

Definition at line 86 of file MCFsbistreamBase.h.

int MCFsbistreamBase._cmin_exist [protected]
 

Definition at line 87 of file MCFsbistreamBase.h.

int MCFsbistreamBase._cmin_theory [protected]
 

Definition at line 88 of file MCFsbistreamBase.h.

int MCFsbistreamBase._cmin_this [protected]
 

Definition at line 86 of file MCFsbistreamBase.h.

int MCFsbistreamBase._datatype_code [protected]
 

Definition at line 92 of file MCFsbistreamBase.h.

string MCFsbistreamBase._descript [protected]
 

Definition at line 77 of file MCFsbistreamBase.h.

int MCFsbistreamBase._finalstep [protected]
 

Definition at line 98 of file MCFsbistreamBase.h.

istream* MCFsbistreamBase._is [protected]
 

Definition at line 96 of file MCFsbistreamBase.h.

int MCFsbistreamBase._mmax_exist [protected]
 

Definition at line 83 of file MCFsbistreamBase.h.

int MCFsbistreamBase._mmax_theory [protected]
 

Definition at line 84 of file MCFsbistreamBase.h.

int MCFsbistreamBase._mmax_this [protected]
 

Definition at line 82 of file MCFsbistreamBase.h.

int MCFsbistreamBase._mmin_exist [protected]
 

Definition at line 83 of file MCFsbistreamBase.h.

int MCFsbistreamBase._mmin_theory [protected]
 

Definition at line 84 of file MCFsbistreamBase.h.

int MCFsbistreamBase._mmin_this [protected]
 

Definition at line 82 of file MCFsbistreamBase.h.

bool MCFsbistreamBase._openfail [protected]
 

Definition at line 71 of file MCFsbistreamBase.h.

Referenced by clear_openfail(), and openfail().

int MCFsbistreamBase._release [protected]
 

Definition at line 75 of file MCFsbistreamBase.h.

int MCFsbistreamBase._revision [protected]
 

Definition at line 74 of file MCFsbistreamBase.h.

int MCFsbistreamBase._sbn [protected]
 

Definition at line 80 of file MCFsbistreamBase.h.

int MCFsbistreamBase._version [protected]
 

Definition at line 73 of file MCFsbistreamBase.h.


The documentation for this class was generated from the following files:
Generated on Mon May 31 21:41:15 2004 for SR2k4 Assembler by doxygen 1.3.6