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


|
|
Definition at line 194 of file MRAmpBase.h. References set_null().
|
|
||||||||||||
|
Definition at line 202 of file MRAmpBase.h. References _mcode, _mpenc, _n, and MRAmpEncode.grid_dim().
|
|
||||||||||||
|
Definition at line 213 of file MRAmpBase.h. References _mpenc, and MRAmpEncode.grid_dim().
|
|
|
Definition at line 224 of file MRAmpBase.h. References _ptbuffer.
|
|
|
Definition at line 176 of file MRAmpBase.h.
00176 {}
|
|
|
Definition at line 576 of file MRAmpBase.h. References _mpenc, MRAmpEncode.bplen_a(), MRAmpEncode.bplen_coef(), and MRAmpEncode.grid_dim(). Referenced by MRAsbObject.cstattable_sbsizeb().
|
|
||||||||||||
|
Definition at line 442 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.array_dim(), MRAmpEncode.bplen_a(), MRAmpEncode.bplen_coef(), hdrfixed(), mpfixed(), setstate(), and BufferBase.write().
00443 {
00444 if ( hdrfixed() && !mpfixed() ) {
00445 bytepack bp;
00446 for( int d = 0; d < _mpenc.array_dim(); ++d ) {
00447 _ptbuffer->write( bp( a[d], _mpenc.bplen_a(d) ) );
00448 _mpsizeb += _mpenc.bplen_a(d);
00449 }
00450 // _ptbuffer->write( bp( coef, _mpenc.bplen_coef() ) );
00451 _ptbuffer->write( bpcoef );
00452 _mpsizeb += _mpenc.bplen_coef();
00453 } else setstate(failbit);
00454 }
|
|
||||||||||||
|
Definition at line 428 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_a(), MRAmpEncode.bplen_coef(), hdrfixed(), mpfixed(), setstate(), and BufferBase.write(). Referenced by MRAsbBase.append(), and MRAsbBase.copy().
00429 {
00430 if ( hdrfixed() && !mpfixed() ) {
00431 bytepack bp;
00432 _ptbuffer->write( bp( a, _mpenc.bplen_a(0) ) );
00433 _mpsizeb += _mpenc.bplen_a(0);
00434 _ptbuffer->write( bpcoef );
00435 cout << "append " << float(bpcoef) << endl;
00436 _mpsizeb += _mpenc.bplen_coef();
00437 } else setstate(failbit);
00438 }
|
|
|
Definition at line 324 of file MRAmpBase.h. References baddimbit, and rdstate().
00324 { return rdstate(baddimbit) != 0; }
|
|
|
Definition at line 661 of file MRAmpBase.h. References MRAmpBase.iterator._pos, and hdrsizeb(). Referenced by MRAsbObject.cstattable_sbsizeb().
00662 {
00663 iterator iter(this);
00664 // if ( hdrfixed() && sbfixed() ) {
00665 iter._pos = hdrsizeb();
00666 // } else {
00667 // iter.set_null();
00668 // }
00669 return iter;
00670 }
|
|
|
Definition at line 306 of file MRAmpBase.h. Referenced by operator()(), and set_empty().
|
|
|
Definition at line 312 of file MRAmpBase.h. Referenced by unfix_mp().
00312 { _state &= ~s; }
|
|
|
Definition at line 230 of file MRAmpBase.h. References _mcode, _mpenc, _mpsizeb, _n, _ptbuffer, _state, BufferBase.erase(), BufferBase.get(), MRAmpEncode.grid_dim(), BufferBase.put(), and BufferBase.seekg(). Referenced by MRAmp.copy(), operator()(), and operator=().
00231 {
00232 if ( this != &mp ) {
00233 _state = mp._state;
00234 _mpenc = mp._mpenc;
00235 _mpsizeb = mp._mpsizeb;
00236 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00237 _mcode[d] = mp._mcode[d];
00238 _n[d] = mp._n[d];
00239 }
00240 mp._ptbuffer->seekg(0);
00241 _ptbuffer->erase();
00242 for( int i = 0; i < mp._mpsizeb; ++i ) {
00243 _ptbuffer->put( mp._ptbuffer->get() );
00244 }
00245 }
00246 return *this;
00247 }
|
|
|
Definition at line 673 of file MRAmpBase.h. References _mpenc, MRAmpBase.iterator._pos, MRAmpEncode.bplen_mpsizeb(), and mpsizeb(). Referenced by MRAsbObject.cstattable_sbsizeb().
00674 {
00675 iterator iter(this);
00676 // if ( hdrfixed() && sbfixed() ) {
00677 // iter._pos = _sbsizeb - 4 - _mpenc.bplen_mpsizeb() * 2;
00678 // iter._pos = mpsizeb();
00679 iter._pos = mpsizeb() - _mpenc.bplen_mpsizeb();
00680 // } else {
00681 // iter.set_null();
00682 // }
00683 return iter;
00684 }
|
|
|
Definition at line 321 of file MRAmpBase.h. References rdstate().
00321 { return rdstate(failbit) != 0; }
|
|
|
Definition at line 392 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), MRAmpEncode.bplen_n(), MRAmpEncode.grid_dim(), hdrfixed(), hdrfixedbit, hdrsizeb(), mpfixed(), BufferBase.seekp(), setstate(), and BufferBase.write(). Referenced by MRAsbBase.append(), and MRAsbBase.copy().
00392 {
00393 if ( !hdrfixed() && !mpfixed() ) {
00394 bytepack bp;
00395 setstate(hdrfixedbit);
00396 _mpsizeb = hdrsizeb();
00397 _ptbuffer->seekp(0);
00398 _ptbuffer->write( bp( _mpsizeb, _mpenc.bplen_mpsizeb() ) );
00399 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00400 _ptbuffer->write( bp( _mcode[d], 1 ) );
00401 }
00402 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00403 _ptbuffer->write( bp( _n[d], _mpenc.bplen_n(d) ) );
00404 }
00405 } else setstate(failbit);
00406 }
|
|
|
Definition at line 457 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), hdrfixed(), mpfixed(), mpfixedbit, BufferBase.seekp(), setstate(), and BufferBase.write(). Referenced by MRAsbBase.append(), and MRAsbBase.copy().
00458 {
00459 if ( hdrfixed() && !mpfixed() ) {
00460 bytepack bp;
00461 setstate(mpfixedbit);
00462 _mpsizeb += _mpenc.bplen_mpsizeb();
00463 _ptbuffer->write( bp( _mpsizeb, _mpenc.bplen_mpsizeb() ));
00464 _ptbuffer->seekp(0);
00465 _ptbuffer->write( bp( _mpsizeb, _mpenc.bplen_mpsizeb() ));
00466 _ptbuffer->seekp(0,BufferBase::end);
00467 } else setstate(failbit);
00468 }
|
|
|
Definition at line 318 of file MRAmpBase.h. References rdstate().
00318 { return rdstate(goodbit) != 0; }
|
|
|
Definition at line 327 of file MRAmpBase.h. References hdrfixedbit, and rdstate(). Referenced by append(), fix_hdr(), fix_mp(), refix_hdr(), set_mcode(), set_n(), and unfix_mp().
00327 { return rdstate(hdrfixedbit) != 0; }
|
|
|
Definition at line 568 of file MRAmpBase.h. References _mpenc, MRAmpEncode.bplen_mpsizeb(), MRAmpEncode.bplen_n(), and MRAmpEncode.grid_dim(). Referenced by begin(), MRAsbObject.cstattable_sbsizeb(), fix_hdr(), is_empty(), and set_empty().
|
|
|
Definition at line 356 of file MRAmpBase.h. References _mpenc, MRAmpEncode.bplen_mpsizeb(), and hdrsizeb().
00357 {
00358 return _mpsizeb <= hdrsizeb() + _mpenc.bplen_mpsizeb();
00359 }
|
|
|
Definition at line 276 of file MRAmpBase.h. References _mcode, _mpenc, _mpsizeb, _n, _ptbuffer, _state, BufferBase.get(), MRAmpEncode.grid_dim(), BufferBase.seekg(), and BufferBase.tellg(). Referenced by operator!=(), and operator==().
00277 {
00278 if ( this != &mp ) {
00279 if ( _state != mp._state ) return false;
00280 if ( _mpenc != mp._mpenc ) return false;
00281 if ( _mpsizeb != mp._mpsizeb ) return false;
00282 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00283 if ( _mcode[d] != mp._mcode[d] ) return false;
00284 if ( _n[d] != mp._n[d] ) return false;
00285 }
00286 int mark = _ptbuffer->tellg();
00287 int mpmark = mp._ptbuffer->tellg();
00288 _ptbuffer->seekg(0);
00289 mp._ptbuffer->seekg(0);
00290 for( int i = 0; i < _mpsizeb; ++i ) {
00291 if ( _ptbuffer->get() != mp._ptbuffer->get() ) return false;
00292 }
00293 _ptbuffer->seekg(mark);
00294 mp._ptbuffer->seekg(mpmark);
00295 }
00296 return true;
00297 }
|
|
|
Definition at line 341 of file MRAmpBase.h. Referenced by operator!(), and read().
00341 { return _mpsizeb == 0; }
|
|
|
Definition at line 49 of file MRAmpBase.h.
00049 { return "MRAmpBase"; }
|
|
|
Definition at line 590 of file MRAmpBase.h.
00590 { return _mcode[d]; }
|
|
|
Definition at line 599 of file MRAmpBase.h. References mcode_to_m(). Referenced by MRAsbBase.append(), MRAsbBase.copy(), MRAsbBase.mmatch(), and MRAsbObject.mstattable_sbsizeb().
00600 {
00601 return ::mcode_to_m( _mcode[d] );
00602 }
|
|
|
Definition at line 617 of file MRAmpBase.h. References mcode_to_order().
00618 {
00619 return ::mcode_to_order( _mcode[d] );
00620 }
|
|
|
Definition at line 611 of file MRAmpBase.h. References mcode_to_rs().
00612 {
00613 return ::mcode_to_rs( _mcode[d] );
00614 }
|
|
|
Definition at line 605 of file MRAmpBase.h. References mcode_to_sw().
00606 {
00607 return ::mcode_to_sw( _mcode[d] );
00608 }
|
|
|
Definition at line 584 of file MRAmpBase.h. References _mpenc. Referenced by MRAsbBase.append(), and MRAsbObject.cstattable_sbsizeb().
00584 { return _mpenc; }
|
|
|
Definition at line 330 of file MRAmpBase.h. References mpfixedbit, and rdstate(). Referenced by append(), fix_hdr(), fix_mp(), refix_hdr(), set_mcode(), set_n(), and unfix_mp().
00330 { return rdstate(mpfixedbit) != 0; }
|
|
|
Definition at line 587 of file MRAmpBase.h. Referenced by MRAsbBase.append(), end(), and MRAsbObject.mstattable_sbsizeb().
00587 { return _mpsizeb; }
|
|
|
Definition at line 593 of file MRAmpBase.h.
00593 { return _n[d]; }
|
|
|
Definition at line 596 of file MRAmpBase.h. References _mpenc, and MRAmpEncode.bplen_mpsizeb(). Referenced by MRAsbBase.append_null(), and MRAsbBase.unfix_sb().
00596 { return 2 * _mpenc.bplen_mpsizeb(); }
|
|
|
Definition at line 344 of file MRAmpBase.h. References is_null().
00344 { return is_null(); }
|
|
|
Definition at line 303 of file MRAmpBase.h. References is_equal().
00303 { return !is_equal(rhs); }
|
|
|
Definition at line 262 of file MRAmpBase.h. References _mpenc, _ptbuffer, clear(), BufferBase.erase(), and MRAmpEncode.grid_dim().
|
|
|
Definition at line 256 of file MRAmpBase.h. References copy().
00257 {
00258 return copy(mp);
00259 }
|
|
|
Definition at line 253 of file MRAmpBase.h. References set_null().
00253 { return set_null(); }
|
|
|
Definition at line 504 of file MRAmpBase.h. References write().
00505 {
00506 write(buffer);
00507 return *this;
00508 }
|
|
|
Definition at line 250 of file MRAmpBase.h. References copy().
00250 { return copy(rhs); }
|
|
|
Definition at line 300 of file MRAmpBase.h. References is_equal().
00300 { return is_equal(rhs); }
|
|
|
Definition at line 527 of file MRAmpBase.h. References read().
00528 {
00529 read(buffer);
00530 return *this;
00531 }
|
|
|
Definition at line 315 of file MRAmpBase.h. Referenced by baddim(), fail(), good(), hdrfixed(), and mpfixed().
00315 { return (_state & s); }
|
|
|
Definition at line 552 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), BufferBase.get(), is_null(), and BufferBase.seekg().
|
|
|
Definition at line 511 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), BufferBase.get(), is_null(), BufferBase.put(), and BufferBase.seekg(). Referenced by MRAsbBase.append(), MRAsbBase.append_null(), operator<<(), and operator>>().
00512 {
00513 if ( !is_null() ) {
00514 _ptbuffer->seekg(0);
00515 for( int i = 0; i < _mpsizeb; ++i ) {
00516 buffer.put( _ptbuffer->get() );
00517 }
00518 }
00519 else {
00520 bytepack bp;
00521 buffer << bp( 0, _mpenc.bplen_mpsizeb() );
00522 buffer << bp( 0, _mpenc.bplen_mpsizeb() );
00523 }
00524 }
|
|
|
Definition at line 409 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), MRAmpEncode.bplen_n(), MRAmpEncode.grid_dim(), hdrfixed(), hdrfixedbit, mpfixed(), BufferBase.seekp(), setstate(), and BufferBase.write().
00409 {
00410 if ( hdrfixed() && !mpfixed() ) {
00411 bytepack bp;
00412 setstate(hdrfixedbit);
00413 // _mpsizeb = hdrsizeb();
00414 _ptbuffer->seekp(0);
00415 _ptbuffer->write( bp( _mpsizeb, _mpenc.bplen_mpsizeb() ) );
00416 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00417 _ptbuffer->write( bp( _mcode[d], 1 ) );
00418 }
00419 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00420 _ptbuffer->write( bp( _n[d], _mpenc.bplen_n(d) ) );
00421 }
00422 _ptbuffer->seekp(_mpsizeb);
00423 } else setstate(failbit);
00424 }
|
|
|
Definition at line 623 of file MRAmpBase.h. References _mpenc, MRAmpEncode.grid_dim(), and MRAmpEncode.report().
00624 {
00625 os << "MRAmpBase::report mpenc:\n";
00626 _mpenc.report(os);
00627 os << "MRAmpBase::report mpsizeb =" << _mpsizeb << '\n';
00628 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00629 os << "MRAmpBase::report int(mcode[" << d << "])="
00630 << int(_mcode[d]) << '\n';
00631 }
00632 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00633 os << "MRAmpBase::report n[" << d << "]="
00634 << _n[d] << '\n';
00635 }
00636 }
|
|
|
Definition at line 347 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), clear(), BufferBase.erase(), and hdrsizeb(). Referenced by MRAsbBase.append(), and MRAsbBase.copy().
|
|
||||||||||||
|
Definition at line 370 of file MRAmpBase.h. References hdrfixed(), mpfixed(), and setstate().
|
|
|
Definition at line 362 of file MRAmpBase.h. References _mpenc, MRAmpEncode.grid_dim(), hdrfixed(), mpfixed(), and setstate().
|
|
||||||||||||
|
Definition at line 385 of file MRAmpBase.h. References hdrfixed(), mpfixed(), and setstate().
|
|
|
Definition at line 377 of file MRAmpBase.h. References _mpenc, MRAmpEncode.grid_dim(), hdrfixed(), mpfixed(), and setstate().
|
|
|
Definition at line 333 of file MRAmpBase.h. References _ptbuffer, and BufferBase.erase(). Referenced by MRAsbBase.append_null(), MRAmpBase(), and operator()().
|
|
|
Definition at line 309 of file MRAmpBase.h. Referenced by append(), fix_hdr(), fix_mp(), refix_hdr(), set_mcode(), set_n(), and unfix_mp().
00309 { _state |= s; }
|
|
|
Definition at line 639 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), MRAmpEncode.bplen_n(), MRAmpEncode.grid_dim(), BufferBase.read(), and BufferBase.seekg(). Referenced by write().
00640 {
00641 bytepack bp;
00642 _ptbuffer->seekg(0);
00643 _ptbuffer->read( bp( 0, _mpenc.bplen_mpsizeb() ) ); _mpsizeb = int(bp);
00644 if ( _mpsizeb != 0 ) {
00645 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00646 _ptbuffer->read( bp(0,1) ); _mcode[d] = char(bp);
00647 }
00648 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00649 _ptbuffer->read( bp( 0, _mpenc.bplen_n(d) ) ); _n[d] = int(bp);
00650 }
00651 }
00652 else {
00653 for( int d = 0; d < _mpenc.grid_dim(); ++d ) {
00654 _mcode[d] = 0;
00655 _n[d] = 0;
00656 }
00657 }
00658 }
|
|
|
Definition at line 471 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), clrstate(), hdrfixed(), mpfixed(), mpfixedbit, BufferBase.seekp(), setstate(), and BufferBase.write().
00472 {
00473 if ( hdrfixed() && mpfixed() ) {
00474 bytepack bp;
00475 clrstate(mpfixedbit);
00476 _mpsizeb -= _mpenc.bplen_mpsizeb();
00477 // _ptbuffer->write( bp( _mpsizeb, _mpenc.bplen_mpsizeb() ));
00478 _ptbuffer->seekp(0);
00479 _ptbuffer->write( bp( _mpsizeb, _mpenc.bplen_mpsizeb() ));
00480 // _ptbuffer->seekp(0,BufferBase::end);
00481 _ptbuffer->seekp(_mpsizeb);
00482 } else setstate(failbit);
00483 }
|
|
|
Definition at line 534 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), BufferBase.erase(), BufferBase.put(), synchronize(), and BufferBase.write().
00535 {
00536 bytepack bp;
00537 _ptbuffer->erase();
00538 is >> bp( 0, _mpenc.bplen_mpsizeb() ); _mpsizeb = int(bp);
00539 _ptbuffer->write(bp);
00540 if ( _mpsizeb != 0 ) {
00541 for(int i = _mpenc.bplen_mpsizeb(); i < _mpsizeb; ++i) {
00542 _ptbuffer->put( is.get() );
00543 }
00544 }
00545 else {
00546 _ptbuffer->write(bp);
00547 }
00548 synchronize();
00549 }
|
|
|
Definition at line 486 of file MRAmpBase.h. References _mpenc, _ptbuffer, MRAmpEncode.bplen_mpsizeb(), BufferBase.erase(), BufferBase.get(), BufferBase.put(), synchronize(), and BufferBase.write(). Referenced by MRAsbBase.iterator.operator *(), MRAsbBase.iterator.operator++(), operator<<(), and operator>>().
00487 {
00488 bytepack bp;
00489 _ptbuffer->erase();
00490 buffer >> bp( 0, _mpenc.bplen_mpsizeb() ); _mpsizeb = int(bp);
00491 _ptbuffer->write(bp);
00492 if ( _mpsizeb != 0 ) {
00493 for(int i = _mpenc.bplen_mpsizeb(); i < _mpsizeb; ++i) {
00494 _ptbuffer->put( buffer.get() );
00495 }
00496 }
00497 else {
00498 _ptbuffer->write(bp);
00499 }
00500 synchronize();
00501 }
|
|
|
Definition at line 187 of file MRAmpBase.h. |
|
||||||||||||
|
Definition at line 812 of file MRAmpBase.h.
00813 {
00814 mp.read(os);
00815 return os;
00816 }
|
|
||||||||||||
|
Definition at line 798 of file MRAmpBase.h.
00799 {
00800 mp.read(buffer);
00801 return buffer;
00802 }
|
|
||||||||||||
|
Definition at line 819 of file MRAmpBase.h.
00820 {
00821 mp.write(is);
00822 return is;
00823 }
|
|
||||||||||||
|
Definition at line 805 of file MRAmpBase.h.
00806 {
00807 mp.write(buffer);
00808 return buffer;
00809 }
|
|
|
Definition at line 170 of file MRAmpBase.h. Referenced by copy(), is_equal(), and MRAmpBase(). |
|
|
Definition at line 166 of file MRAmpBase.h. Referenced by acoefsizeb(), append(), copy(), end(), fix_hdr(), fix_mp(), hdrsizeb(), is_empty(), is_equal(), mpenc(), MRAmpBase(), nullsizeb(), MRAmpBase.iterator.operator *(), operator()(), MRAmpBase.iterator.operator++(), read(), refix_hdr(), report(), set_empty(), set_mcode(), set_n(), synchronize(), unfix_mp(), and write(). |
|
|
Definition at line 168 of file MRAmpBase.h. Referenced by copy(), and is_equal(). |
|
|
Definition at line 171 of file MRAmpBase.h. Referenced by copy(), is_equal(), and MRAmpBase(). |
|
|
Definition at line 173 of file MRAmpBase.h. Referenced by append(), copy(), MRAmp.copy(), fix_hdr(), fix_mp(), is_equal(), MRAmpBase.iterator.operator *(), operator()(), MRAmpBase.iterator.operator++(), read(), refix_hdr(), set_empty(), set_null(), synchronize(), unfix_mp(), write(), and ~MRAmpBase(). |
|
|
Definition at line 164 of file MRAmpBase.h. Referenced by copy(), and is_equal(). |
|
|
Definition at line 53 of file MRAmpBase.h. Referenced by baddim(). |
|
|
Definition at line 52 of file MRAmpBase.h. |
|
|
Definition at line 51 of file MRAmpBase.h. |
|
|
Definition at line 55 of file MRAmpBase.h. Referenced by fix_hdr(), hdrfixed(), and refix_hdr(). |
|
|
Definition at line 56 of file MRAmpBase.h. Referenced by fix_mp(), mpfixed(), and unfix_mp(). |
1.3.6