00001 // DCFsbistreamBase.h 00002 ////////////////////////////////////////////////////////////////////// 00003 // (c) Copyright 2001-2002 Brown Deer Technology, LLC. 00004 // All rights reserved. 00005 ////////////////////////////////////////////////////////////////////// 00006 00007 #ifndef DCFSBISTREAMBASE_H 00008 #define DCFSBISTREAMBASE_H 00009 00010 #ifdef USE_STD 00011 #include <iostream> 00012 #include <string> 00013 using namespace std; 00014 #else 00015 #include <iostream.h> 00016 #include <string.h> 00017 #endif 00018 00019 #include "DCFutility.h" 00020 #include "DCFmpBase.h" 00021 00022 class DCFsbistreamBase 00023 { 00024 public: 00025 00026 DCFsbistreamBase( istream& is = cin ); 00027 ~DCFsbistreamBase() {} 00028 00029 void finalstep( const int ); 00030 // virtual void in(); 00031 virtual void open(); 00032 virtual bool isopen(); 00033 00034 virtual void report( ostream& os = cout ); 00035 virtual void inheader(); 00036 00037 virtual void close() {} 00038 virtual void findmpacket( DCFmpBase&, const char mcode, const int n ) {} 00039 00040 int version() { return _version; } 00041 int revision() { return _revision; } 00042 int release() { return _release; } 00043 int author() { return _author; } 00044 string& descript() { return _descript; } 00045 int arraydim() { return _arraydim; } 00046 int sbn() { return _sbn; } 00047 int mmin_this() { return _mmin_this; } 00048 int mmax_this() { return _mmax_this; } 00049 int mmin_exist() { return _mmin_exist; } 00050 int mmax_exist() { return _mmax_exist; } 00051 int mmin_theory() { return _mmin_theory; } 00052 int mmax_theory() { return _mmax_theory; } 00053 int cmin_this() { return _cmin_this; } 00054 int cmax_this() { return _cmax_this; } 00055 int cmin_exist() { return _cmin_exist; } 00056 int cmax_exist() { return _cmax_exist; } 00057 int cmin_theory() { return _cmin_theory; } 00058 int cmax_theory() { return _cmax_theory; } 00059 int bplen_mpsizeb() { return _bplen_mpsizeb; } 00060 int bplen_coef() { return _bplen_coef; } 00061 int bplen_n() { return _bplen_n; } 00062 int bplen_a() { return _bplen_a; } 00063 00064 int finalstep() { return _finalstep; } 00065 00066 protected: 00067 int _version; 00068 int _revision; 00069 int _release; 00070 int _author; 00071 string _descript; 00072 00073 int _arraydim; 00074 int _sbn; 00075 00076 int _mmin_this, _mmax_this; 00077 int _mmin_exist, _mmax_exist; 00078 int _mmin_theory, _mmax_theory; 00079 00080 int _cmin_this, _cmax_this; 00081 int _cmin_exist, _cmax_exist; 00082 int _cmin_theory, _cmax_theory; 00083 00084 int _bplen_mpsizeb; 00085 int _bplen_coef; 00086 int _datatype_code; 00087 int _bplen_n; 00088 int _bplen_a; 00089 00090 istream* _is; 00091 00092 int _finalstep; 00093 }; 00094 00095 inline 00096 void DCFsbistreamBase::finalstep( const int finalstep ) 00097 { 00098 _finalstep = finalstep; 00099 } 00100 00101 //inline 00102 //void DCFsbistreamBase::in() { open(); } 00103 00104 inline 00105 void DCFsbistreamBase::open() { inheader(); } 00106 00107 inline 00108 bool DCFsbistreamBase::isopen() { return (*_is).good(); } 00109 00110 #endif 00111
1.3.6