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


Public Member Functions | |
| int | arraydim () |
| int | bplen_a () |
| int | bplen_coef () |
| int | bplen_mpsizeb () |
| int | bplen_n () |
| virtual void | clear () |
| DCFmpBase (const int bplen_mpsizeb, const int bplen_coef, const int bplen_n) | |
| DCFmpBase (const int bplen_mpsizeb, const int bplen_coef, const int bplen_n, const int bplen_a) | |
| bool | empty () |
| int | m () |
| 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) |
| ~DCFmpBase () | |
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 | |
| DCFmpBase () | |
Friends | |
| ostream & | operator<< (ostream &, DCFmpBase &) |
| istream & | operator>> (istream &, DCFmpBase &) |
|
||||||||||||||||||||
|
Definition at line 16 of file DCFmpBase.cpp. References _data.
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 DCFmpBase.cpp. References _data.
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 DCFmpBase.cpp. References _data.
|
|
|
Definition at line 97 of file DCFmpBase.h.
00097 {}
|
|
|
Definition at line 60 of file DCFmpBase.h. References _arraydim.
00060 { return _arraydim; }
|
|
|
Definition at line 64 of file DCFmpBase.h.
00064 { return _bplen_a; }
|
|
|
Definition at line 62 of file DCFmpBase.h.
00062 { return _bplen_coef; }
|
|
|
Definition at line 61 of file DCFmpBase.h. References _bplen_mpsizeb.
00061 { return _bplen_mpsizeb; }
|
|
|
Definition at line 63 of file DCFmpBase.h.
00063 { return _bplen_n; }
|
|
|
Definition at line 136 of file DCFmpBase.h. References _data. Referenced by DCFsbifstream< Data_t >.findmpacket(), and read().
|
|
|
Definition at line 155 of file DCFmpBase.h. Referenced by DCFsbifstream< Data_t >.findmpacket(), and write().
00155 { return ( (*_data).size() == 0 ); }
|
|
|
Definition at line 161 of file DCFmpBase.h. References mcode_to_m().
00161 { return mcode_to_m( _mcode ); }
|
|
|
Definition at line 158 of file DCFmpBase.h.
00158 { return _mcode; };
|
|
|
Definition at line 176 of file DCFmpBase.h. Referenced by m().
00177 {
00178 return int( (unsigned char)( 0x1F & mcode ) );
00179 };
|
|
|
Definition at line 194 of file DCFmpBase.h. Referenced by order().
00195 {
00196 return int( (unsigned char)( ( 0x20 & mcode ) >> 5 ) );
00197 };
|
|
|
Definition at line 188 of file DCFmpBase.h. Referenced by rs().
00189 {
00190 return ( ( 0x40 & mcode ) >> 6 );
00191 };
|
|
|
Definition at line 182 of file DCFmpBase.h. Referenced by sw().
00183 {
00184 return int( (unsigned char)( ( 0x80 & mcode ) >> 7 ) );
00185 };
|
|
|
Definition at line 80 of file DCFmpBase.cpp. References _bplen_mpsizeb, and _null. 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 DCFmpBase.h.
00173 { return _n; };
|
|
|
Definition at line 152 of file DCFmpBase.h. References _null.
00152 { return _null; }
|
|
|
Definition at line 170 of file DCFmpBase.h. References mcode_to_order().
00170 { return mcode_to_order( _mcode ); }
|
|
|
Definition at line 146 of file DCFmpBase.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 DCFmpBase.h. Referenced by read().
00143 { (*_data).push_back(c); };
|
|
|
Definition at line 102 of file DCFmpBase.cpp. References _bplen_mpsizeb, _null, clear(), and push_back(). Referenced by operator>>().
00103 {
00104 clear();
00105 if ( is.good() ) {
00106 char c;
00107 bytepack bp;
00108 is >> bp( 0, _bplen_mpsizeb ); int sizeb = int(bp);
00109 if ( sizeb != 0 ) {
00110 _null = 0;
00111 is >> bp(0,1); _mcode = char(bp);
00112 is >> bp( 0, _bplen_n ); _n = int(bp);
00113 for( int i = 0; i < (sizeb - 2*_bplen_mpsizeb - 1 - _bplen_n); i++ ) {
00114 is.get(c);
00115 push_back(c);
00116 }
00117 is >> bp( 0, _bplen_mpsizeb ); int tmp = int(bp);
00118 if ( tmp != sizeb ) {
00119 _null = 1;
00120 #ifdef STORM_DEBUG
00121 cout << "DCFmpBase::read(istream&): "
00122 << "ERROR: read inconsistent mpsizeb"
00123 << sizeb << ' ' << tmp << endl;
00124 #endif
00125 }
00126 }
00127 else { _null = 1; }
00128 }
00129 };
|
|
|
Definition at line 167 of file DCFmpBase.h. References mcode_to_rs().
00167 { return mcode_to_rs( _mcode ); }
|
|
|
Definition at line 133 of file DCFmpBase.h. References _null.
00133 { _null = 1; }
|
|
|
Definition at line 130 of file DCFmpBase.h. References _null. Referenced by set().
00130 { _null = 0; }
|
|
|
Definition at line 115 of file DCFmpBase.h. References _null.
|
|
|
Definition at line 108 of file DCFmpBase.h. References _null.
|
|
||||||||||||
|
Definition at line 122 of file DCFmpBase.h.
|
|
||||||||||||||||
|
Definition at line 64 of file DCFmpBase.cpp. References _arraydim, _bplen_mpsizeb, _data, and _null.
|
|
||||||||||||||||||||
|
Definition at line 47 of file DCFmpBase.cpp. References _arraydim, _bplen_mpsizeb, _data, and _null. Referenced by DCFsbistream< Rtmra_t >.operator>>().
|
|
|
Definition at line 164 of file DCFmpBase.h. References mcode_to_sw().
00164 { return mcode_to_sw( _mcode ); }
|
|
|
Definition at line 87 of file DCFmpBase.cpp. References _bplen_mpsizeb, _data, 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 < (*_data).size(); i++ ) os.put( (*_data)[i] );
00095 os << bp( mpsizeb(), _bplen_mpsizeb );
00096 #ifdef STORM_DEBUG
00097 cout << "DCFmpBase::write(): mpsizeb() " << mpsizeb() << endl;
00098 #endif
00099 }
00100 }
|
|
||||||||||||
|
Definition at line 131 of file DCFmpBase.cpp.
00132 {
00133 mp.write(os);
00134 return os;
00135 };
|
|
||||||||||||
|
Definition at line 137 of file DCFmpBase.cpp.
00138 {
00139 mp.read(is);
00140 return is;
00141 };
|
|
|
Definition at line 81 of file DCFmpBase.h. Referenced by arraydim(), and set(). |
|
|
Definition at line 85 of file DCFmpBase.h. |
|
|
Definition at line 83 of file DCFmpBase.h. |
|
|
Definition at line 82 of file DCFmpBase.h. Referenced by bplen_mpsizeb(), mpsizeb(), read(), set(), and write(). |
|
|
Definition at line 84 of file DCFmpBase.h. |
|
|
Definition at line 92 of file DCFmpBase.h. Referenced by clear(), DCFmpBase(), set(), write(), and ~DCFmpBase(). |
|
|
Definition at line 89 of file DCFmpBase.h. |
|
|
Definition at line 87 of file DCFmpBase.h. |
|
|
Definition at line 90 of file DCFmpBase.h. |
|
|
Definition at line 94 of file DCFmpBase.h. |
1.3.6