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

DCFsbistream< Data_t > Class Template Reference

#include <DCFsbistream.h>

Inheritance diagram for DCFsbistream< Data_t >:

Inheritance graph
[legend]
Collaboration diagram for DCFsbistream< Data_t >:

Collaboration graph
[legend]

Public Types

typedef Rtmra_t::DataType Data_t

Public Member Functions

 DCFsbistream (istream &is=cin)
 DCFsbistream (istream &is=cin)
void descr ()
virtual void open ()
DCFsbistream< Rtmra_t > & operator>> (Rtmra_t &)
DCFsbistream< Data_t > & operator>> (Data_t &)
 ~DCFsbistream ()
 ~DCFsbistream ()

Data Fields

DCFencode< Data_t_enc

template<class Data_t>
class DCFsbistream< Data_t >


Member Typedef Documentation

template<class Data_t>
typedef Rtmra_t::DataType DCFsbistream< Data_t >.Data_t
 

Definition at line 27 of file 2/DCFsbistream.h.


Constructor & Destructor Documentation

template<class Data_t>
DCFsbistream< Data_t >::DCFsbistream istream &  is = cin  ) 
 

Definition at line 36 of file DCFsbistream.h.

00037   : DCFsbistreamBase( is ) 
00038 {
00039    _enctype = _enc.enctype();
00040    _encsizeb = _enc.encsizeb();
00041 }

template<class Data_t>
DCFsbistream< Data_t >::~DCFsbistream  ) 
 

Definition at line 44 of file DCFsbistream.h.

00044 { }

template<class Data_t>
DCFsbistream< Data_t >.DCFsbistream istream &  is = cin  ) 
 

template<class Data_t>
DCFsbistream< Data_t >.~DCFsbistream  ) 
 

Definition at line 29 of file 2/DCFsbistream.h.

00029 {}


Member Function Documentation

template<class Data_t>
void DCFsbistream< Data_t >::descr  )  [virtual]
 

Reimplemented from DCFsbistreamBase.

Definition at line 47 of file DCFsbistream.h.

References DCFsbistreamBase.descr().

Referenced by DCFsbifstream< Data_t >.open().

00048 {
00049     DCFsbistreamBase::descr();
00050     _enc.descr();
00051 }

template<class Data_t>
void DCFsbistream< Data_t >::open  )  [virtual]
 

Reimplemented from DCFsbistreamBase.

Reimplemented in DCFsbifstream< Data_t >, and DCFsbifstream< Data_t >.

Definition at line 54 of file DCFsbistream.h.

References DCFsbistreamBase.open().

Referenced by DCFsbifstream< Data_t >.open(), DCFsbistream< Rtmra_t >.operator>>(), and DCFsbistream< Data_t >.operator>>().

00055 {
00056    DCFsbistreamBase::open();
00057    (*_is) >> _enc;
00058 }

template<class Data_t>
DCFsbistream<Rtmra_t>& DCFsbistream< Data_t >.operator>> Rtmra_t  ) 
 

template<class Data_t>
DCFsbistream< Data_t > & DCFsbistream< Data_t >::operator>> Data_t  ) 
 

Definition at line 61 of file DCFsbistream.h.

References DCFsbistreamBase.bplen_n(), DCFsbistreamBase.bplen_sizeb(), DCF_DEFAULT_MPACKET, DCFsbistreamBase.findmpacket(), DCFsbistream< Data_t >.open(), and DCFmpacketBase.setencode().

00062 {
00063    DCFmpacket<Data_t> mp( DCF_DEFAULT_MPACKET, _bplen_sizeb, _bplen_n,_enc );
00064    int m = x.imcycle();
00065    bool bob = ( m == x.mmax() );
00066 
00067 #ifdef STORM_DEBUG
00068    cout << "DCFsbistream<Data_t>::operator>>(): m bob "
00069         << m << ' ' << bob << '\n';
00070 #endif
00071 
00072    if (bob) {
00073       _blocknum = ( ( x.mrastep() + 1 ) >> x.mmax() );
00074       open();
00075       mp.setencode( DCF_DEFAULT_MPACKET, bplen_sizeb(), bplen_n(), _enc );
00076       findmpacket( mp, char(m), 0 );
00077       mp.replace(x);
00078    }
00079 
00080    int n;
00081    while (m) {
00082       n = ( ( x.mrastep() + 1 ) & ( ( 1 << x.mmax() ) - 1 ) ) >> m;
00083       findmpacket( mp, char( 0x80 | m ), n );
00084       mp.replace(x);
00085       m--;
00086    }
00087 
00088    return *this;
00089 };


Field Documentation

template<class Data_t>
DCFencode<Data_t> DCFsbistream< Data_t >._enc
 

Definition at line 32 of file DCFsbistream.h.


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