#include <MCFmpBase.h>
Inheritance diagram for MCFmpBase:


Public Member Functions | |
| int | arraydim () |
| int | bplen_a () |
| int | bplen_coef () |
| int | bplen_mpsizeb () |
| int | bplen_n () |
| virtual void | clear () |
| bool | empty () |
| int | m () |
| MCFmpBase (const int bplen_mpsizeb, const int bplen_coef, const int bplen_n) | |
| MCFmpBase (const int bplen_mpsizeb, const int bplen_coef, const int bplen_n, const int bplen_a) | |
| char | mcode () |
| int | mcode_to_m (const char) |
| int | mcode_to_order (const char) |
| int | mcode_to_rs (const char) |
| int | mcode_to_sw (const char) |
| int | mpsizeb () |
| int | n () |
| bool | null () |
| int | order () |
| virtual void | push_back (bytepack &) |
| virtual void | push_back (const char) |
| void | read (istream &is) |
| int | rs () |
| virtual void | set (void *) |
| virtual void | set () |
| virtual void | set (const int n) |
| virtual void | set (const char mcode) |
| virtual void | set (const char mcode, const int n) |
| virtual void | set (const int bplen_mpsizeb, const int bplen_coef, const int bplen_n) |
| virtual void | set (const int bplen_mpsizeb, const int bplen_coef, const int bplen_n, const int bplen_a) |
| int | sw () |
| void | write (ostream &os) |
| virtual | ~MCFmpBase () |
Protected Attributes | |
| int | _arraydim |
| int | _bplen_a |
| int | _bplen_coef |
| int | _bplen_mpsizeb |
| int | _bplen_n |
| vector< char > * | _data |
| char | _mcode |
| int | _mpsizeb |
| int | _n |
| bool | _null |
Private Member Functions | |
| MCFmpBase () | |
Friends | |
| ostream & | operator<< (ostream &, MCFmpBase &) |
| istream & | operator>> (istream &, MCFmpBase &) |
|
||||||||||||||||||||
|
Definition at line 16 of file MCFmpBase.cpp.
00020 : _arraydim(1), 00021 _bplen_mpsizeb(bplen_mpsizeb), _bplen_coef(bplen_coef), 00022 _bplen_n(bplen_n), _bplen_a(bplen_a), 00023 _mcode(0), _null(1) 00024 { 00025 _n = -1; 00026 _data = new vector<char>; 00027 } |
|
||||||||||||||||
|
Definition at line 29 of file MCFmpBase.cpp.
00033 : _arraydim(0), 00034 _bplen_mpsizeb(bplen_mpsizeb), _bplen_coef(bplen_coef), 00035 _bplen_n(bplen_n), 00036 _mcode(0), _null(1) 00037 { 00038 _n = -1; 00039 _data = new vector<char>; 00040 } |
|
|
Definition at line 42 of file MCFmpBase.cpp.
|
|
|
Definition at line 97 of file MCFmpBase.h.
00097 {}
|
|
|
Definition at line 60 of file MCFmpBase.h.
00060 { return _arraydim; }
|
|
|
Definition at line 64 of file MCFmpBase.h.
00064 { return _bplen_a; }
|
|
|
Definition at line 62 of file MCFmpBase.h.
00062 { return _bplen_coef; }
|
|
|
Definition at line 61 of file MCFmpBase.h.
00061 { return _bplen_mpsizeb; }
|
|
|
Definition at line 63 of file MCFmpBase.h.
00063 { return _bplen_n; }
|
|
|
Definition at line 136 of file MCFmpBase.h. Referenced by MCFsbifstream< Rtmra_t >.findmpacket(), and read().
|
|
|
Definition at line 155 of file MCFmpBase.h. Referenced by MCFsbifstream< Rtmra_t >.findmpacket(), and write().
00155 { return ( (*_data).size() == 0 ); }
|
|
|
Definition at line 161 of file MCFmpBase.h. References mcode_to_m().
00161 { return mcode_to_m( _mcode ); }
|
|
|
Definition at line 158 of file MCFmpBase.h.
00158 { return _mcode; };
|
|
|
Definition at line 176 of file MCFmpBase.h. Referenced by m().
00177 {
00178 return int( (unsigned char)( 0x1F & mcode ) );
00179 };
|
|
|
Definition at line 194 of file MCFmpBase.h. Referenced by order().
00195 {
00196 return int( (unsigned char)( ( 0x20 & mcode ) >> 5 ) );
00197 };
|
|
|
Definition at line 188 of file MCFmpBase.h. Referenced by rs().
00189 {
00190 return ( ( 0x40 & mcode ) >> 6 );
00191 };
|
|
|
Definition at line 182 of file MCFmpBase.h. Referenced by sw().
00183 {
00184 return int( (unsigned char)( ( 0x80 & mcode ) >> 7 ) );
00185 };
|
|
|
Definition at line 80 of file MCFmpBase.cpp. Referenced by write().
00081 {
00082 if ( _null ) return 0;
00083 else return 2*_bplen_mpsizeb + 1 + _bplen_n + (*_data).size();
00084 }
|
|
|
Definition at line 173 of file MCFmpBase.h.
00173 { return _n; };
|
|
|
Definition at line 152 of file MCFmpBase.h.
00152 { return _null; }
|
|
|
Definition at line 170 of file MCFmpBase.h. References mcode_to_order().
00170 { return mcode_to_order( _mcode ); }
|
|
|
Definition at line 146 of file MCFmpBase.h. References bytepack.size().
00147 {
00148 for( int i = 0; i < bp.size(); i++ ) { (*_data).push_back(bp[i]); }
00149 }
|
|
|
Definition at line 143 of file MCFmpBase.h. Referenced by read().
00143 { (*_data).push_back(c); };
|
|
|
Definition at line 103 of file MCFmpBase.cpp. References clear(), and push_back(). Referenced by operator>>().
00104 {
00105 clear();
00106 if ( is.good() ) {
00107 char c;
00108 bytepack bp;
00109 is >> bp( 0, _bplen_mpsizeb ); int sizeb = int(bp);
00110 if ( sizeb != 0 ) {
00111 _null = 0;
00112 is >> bp(0,1); _mcode = char(bp);
00113 is >> bp( 0, _bplen_n ); _n = int(bp);
00114 for( int i = 0; i < (sizeb - 2*_bplen_mpsizeb - 1 - _bplen_n); i++ ) {
00115 is.get(c);
00116 push_back(c);
00117 }
00118 is >> bp( 0, _bplen_mpsizeb ); int tmp = int(bp);
00119 if ( tmp != sizeb ) {
00120 _null = 1;
00121 #ifdef STORM_DEBUG
00122 cout << "MCFmpBase::read(istream&): "
00123 << "ERROR: read inconsistent mpsizeb"
00124 << sizeb << ' ' << tmp << endl;
00125 #endif
00126 }
00127 }
00128 else { _null = 1; }
00129 }
00130 };
|
|
|
Definition at line 167 of file MCFmpBase.h. References mcode_to_rs().
00167 { return mcode_to_rs( _mcode ); }
|
|
|
Definition at line 133 of file MCFmpBase.h.
00133 { _null = 1; }
|
|
|
Definition at line 130 of file MCFmpBase.h. Referenced by set().
00130 { _null = 0; }
|
|
|
Definition at line 115 of file MCFmpBase.h.
|
|
|
Definition at line 108 of file MCFmpBase.h.
|
|
||||||||||||
|
Definition at line 122 of file MCFmpBase.h. References set().
|
|
||||||||||||||||
|
Definition at line 64 of file MCFmpBase.cpp.
|
|
||||||||||||||||||||
|
Definition at line 47 of file MCFmpBase.cpp. Referenced by MCFsbistream< Rtmra_t >.jump_read(), and MCFsbistream< Rtmra_t >.operator>>().
|
|
|
Definition at line 164 of file MCFmpBase.h. References mcode_to_sw().
00164 { return mcode_to_sw( _mcode ); }
|
|
|
Definition at line 87 of file MCFmpBase.cpp. References empty(), and mpsizeb(). Referenced by operator<<().
00088 {
00089 bytepack bp;
00090 if ( !empty() && os.good() ) {
00091 os << bp( mpsizeb(), _bplen_mpsizeb );
00092 os << bp( _mcode, 1 );
00093 os << bp( _n, _bplen_n );
00094 // for( int i = 0; i < (int)(*_data).size(); i++ ) os.put( (*_data)[i] );
00095 for( int i = 0; i < (int)_data->size(); i++ ) os.put( (*_data)[i] );
00096 os << bp( mpsizeb(), _bplen_mpsizeb );
00097 #ifdef STORM_DEBUG
00098 cout << "MCFmpBase::write(): mpsizeb() " << mpsizeb() << endl;
00099 #endif
00100 }
00101 }
|
|
||||||||||||
|
Definition at line 132 of file MCFmpBase.cpp.
00133 {
00134 mp.write(os);
00135 return os;
00136 };
|
|
||||||||||||
|
Definition at line 138 of file MCFmpBase.cpp.
00139 {
00140 mp.read(is);
00141 return is;
00142 };
|
|
|
Definition at line 81 of file MCFmpBase.h. |
|
|
Definition at line 85 of file MCFmpBase.h. |
|
|
Definition at line 83 of file MCFmpBase.h. |
|
|
Definition at line 82 of file MCFmpBase.h. |
|
|
Definition at line 84 of file MCFmpBase.h. |
|
|
Definition at line 92 of file MCFmpBase.h. |
|
|
Definition at line 89 of file MCFmpBase.h. |
|
|
Definition at line 87 of file MCFmpBase.h. |
|
|
Definition at line 90 of file MCFmpBase.h. |
|
|
Definition at line 94 of file MCFmpBase.h. |
1.3.6