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

DCFsbostream< Data_t > Class Template Reference

#include <DCFsbostream.h>

Inheritance diagram for DCFsbostream< Data_t >:

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

Collaboration graph
[legend]

Public Types

typedef Rtmra_t::DataType Data_t

Public Member Functions

virtual void close ()
 DCFsbostream (const string &descript="_", ostream &os=cout)
 DCFsbostream (const string &="_\0", ostream &=cout)
void descr (ostream &os=cout)
virtual void final (Rtmra_t &)
virtual void final (Data_t &)
DCFsbostream< Rtmra_t > & operator<< (Rtmra_t &)
DCFsbostream< Data_t > & operator<< (Data_t &)
virtual void outheader ()
void threshold (const Data_t threshold)
 ~DCFsbostream ()

Data Fields

DCFencode< Data_t_enc

Protected Attributes

Data_t _threshold

template<class Data_t>
class DCFsbostream< Data_t >


Member Typedef Documentation

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

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


Constructor & Destructor Documentation

template<class Data_t>
DCFsbostream< Data_t >::DCFsbostream const string &  = "_\0",
ostream &  = cout
 

Definition at line 41 of file DCFsbostream.h.

00042   : DCFsbostreamBase( descript, os ) 
00043 {
00044    _enctype = _enc.enctype();
00045    _encsizeb = _enc.encsizeb();
00046 };

template<class Data_t>
DCFsbostream< Data_t >.DCFsbostream const string &  descript = "_",
ostream &  os = cout
 

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

Definition at line 31 of file 2/DCFsbostream.h.

00031 {}


Member Function Documentation

template<class Data_t>
void DCFsbostream< Data_t >::close  )  [virtual]
 

Reimplemented from DCFsbostreamBase.

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

Definition at line 49 of file DCFsbostream.h.

References DCFsbostreamBase.isopen().

Referenced by DCFsbofstream< Data_t >.close(), DCFsbostream< Rtmra_t >.operator<<(), and DCFsbostream< Data_t >.operator<<().

00050 {
00051    if ( isopen() ) {
00052       bytepack bp;
00053       (*_os) << bp( 0, _bplen_sizeb );
00054       (*_os) << bp( _finalstep, _bplen_n );
00055       (*_os) << endl;
00056    }
00057 };

template<class Data_t>
void DCFsbostream< Data_t >::descr ostream &  os = cout  )  [virtual]
 

Reimplemented from DCFsbostreamBase.

Definition at line 105 of file DCFsbostream.h.

References DCFsbostreamBase.descr().

Referenced by DCFsbofstream< Data_t >.outheader().

00106 {
00107    DCFsbostreamBase::descr(os);
00108    _enc.descr(os);
00109 };

template<class Data_t>
virtual void DCFsbostream< Data_t >.final Rtmra_t  )  [virtual]
 

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

template<class Data_t>
void DCFsbostream< Data_t >::final Data_t  )  [virtual]
 

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

Definition at line 60 of file DCFsbostream.h.

Referenced by DCFsbofstream< Data_t >.final().

00061 {
00062    bool eob = ( x.mcycle() == x.mmax() );
00063    _lockfinalstep = true;
00064    while ( !eob ) {
00065       x.assign( 0.0 );
00066       x++;
00067       (*this) << x;
00068       eob = ( x.mcycle() == x.mmax() );
00069    }
00070 };

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

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

Definition at line 73 of file DCFsbostream.h.

References DCFsbostream< Data_t >.close(), DCF_DEFAULT_MPACKET, DCFsbostreamBase.isopen(), DCFsbostreamBase.open(), and DCFsbostream< Data_t >.outheader().

00074 {
00075    
00076    DCFmpacket<Data_t> mp(DCF_DEFAULT_MPACKET,
00077      _bplen_sizeb, _bplen_n, _enc);
00078 
00079    if ( !isopen() ) open();
00080 
00081    if ( isopen() ) {
00082       if ( _needheader ) outheader();
00083       int m = x.mcycle();
00084       bool eob = ( m == x.mmax() );
00085       if (eob) { 
00086          (*_os) << mp( x, char(m) ); 
00087       }
00088       while (m) { 
00089         (*_os) << mp(x,char(0x80|m));
00090         m--;
00091       }
00092       if ( !_lockfinalstep ) {
00093          _finalstep = x.mrastep() & ( ( 1 << _mmax ) - 1 );
00094       }
00095       if (eob) {
00096          close();
00097          _blocknum++;
00098          _needheader = true;
00099       }
00100    }
00101    return *this;
00102 };

template<class Data_t>
void DCFsbostream< Data_t >::outheader  )  [virtual]
 

Reimplemented from DCFsbostreamBase.

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

Definition at line 112 of file DCFsbostream.h.

References DCFsbostreamBase.outheader().

Referenced by DCFsbostream< Rtmra_t >.operator<<(), DCFsbostream< Data_t >.operator<<(), and DCFsbofstream< Data_t >.outheader().

00113 {
00114    DCFsbostreamBase::outheader();
00115    (*_os) << _enc;
00116 };

template<class Data_t>
void DCFsbostream< Data_t >.threshold const Data_t  threshold  ) 
 


Field Documentation

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

Definition at line 37 of file DCFsbostream.h.

template<class Data_t>
Data_t DCFsbostream< Data_t >._threshold [protected]
 

Definition at line 36 of file 2/DCFsbostream.h.


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