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

MCFsbostream< Rtmra_t > Class Template Reference

#include <MCFsbostream.h>

Inheritance diagram for MCFsbostream< Rtmra_t >:

Inheritance graph
[legend]
Collaboration diagram for MCFsbostream< Rtmra_t >:

Collaboration graph
[legend]

Public Types

typedef Rtmra_t::DataType Data_t

Public Member Functions

virtual void final (Rtmra_t &)
 MCFsbostream (const string &descript="_", ostream &os=cout)
MCFsbostream< Rtmra_t > & operator<< (Rtmra_t &)
void threshold (const Data_t threshold)
 ~MCFsbostream ()

Protected Attributes

Data_t _threshold

template<class Rtmra_t>
class MCFsbostream< Rtmra_t >


Member Typedef Documentation

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

Definition at line 29 of file MCFsbostream.h.


Constructor & Destructor Documentation

template<class Rtmra_t>
MCFsbostream< Rtmra_t >::MCFsbostream const string &  descript = "_",
ostream &  os = cout
 

Definition at line 40 of file MCFsbostream.h.

References DataType_Code< Data_t >.eval().

00041   : MCFsbostreamBase( descript, os ), _threshold(0)
00042 { 
00043    _arraydim = Rtmra_t::ArrayDim; 
00044    _datatype_code = DataType_Code<Data_t>::eval();
00045 }

template<class Rtmra_t>
MCFsbostream< Rtmra_t >.~MCFsbostream  ) 
 

Definition at line 31 of file MCFsbostream.h.

00031 {}


Member Function Documentation

template<class Rtmra_t>
void MCFsbostream< Rtmra_t >::final Rtmra_t  )  [virtual]
 

Reimplemented in MCFsbofstream< Rtmra_t >.

Definition at line 48 of file MCFsbostream.h.

Referenced by MCFsbofstream< Rtmra_t >.final().

00049 {
00050    bool eob = ( x.mcycle() == x.mmax() );
00051    _lockfinalstep = true;
00052    while ( !eob ) {
00053 //      x.assign( 0.0 );
00054       x.assign( typename Rtmra_t::DataType(0) );
00055       x++;
00056       (*this) << x;
00057       eob = ( x.mcycle() == x.mmax() );
00058    }
00059 }

template<class Rtmra_t>
MCFsbostream< Rtmra_t > & MCFsbostream< Rtmra_t >::operator<< Rtmra_t  ) 
 

Definition at line 62 of file MCFsbostream.h.

References MCFsbostreamBase.close(), MCFsbostreamBase.isopen(), MCFsbostreamBase.open(), MCFsbostreamBase.outheader(), and MCFmp< Rtmra_t >.threshold().

00063 {
00064 
00065    MCFmp<Rtmra_t> mp( _bplen_mpsizeb, _bplen_coef, _bplen_n, _bplen_a );
00066    mp.threshold(_threshold);
00067 
00068    if ( !isopen() ) open();
00069 
00070    if ( isopen() ) {
00071       if ( _needheader ) outheader();
00072       int m = x.mcycle();
00073       bool eob = ( m == x.mmax() );
00074       if (eob) { 
00075          (*_os) << mp( x, char(m) ); 
00076       }
00077       while ( m != 0 ) { 
00078         (*_os) << mp( x, char(0x80|m) );
00079         m--;
00080       }
00081 
00082       if ( !_lockfinalstep ) {
00083 //         _finalstep = x.mrastep() & ( ( 1 << _mmax ) - 1 );  HACK
00084          _finalstep = x.mrastep() & ( ( 1 << x.mmax() ) - 1 );
00085 #ifdef STORM_DEBUG
00086          cout << "locked with _finalstep = " << _finalstep << endl;
00087 #endif
00088       }
00089       if (eob) {
00090          close();
00091          _sbn++;
00092          _needheader = true;
00093       }
00094    }
00095    return *this;
00096 }

template<class Rtmra_t>
void MCFsbostream< Rtmra_t >::threshold const Data_t  threshold  ) 
 

Definition at line 99 of file MCFsbostream.h.

00100 {
00101    _threshold = threshold;
00102 }


Field Documentation

template<class Rtmra_t>
Data_t MCFsbostream< Rtmra_t >._threshold [protected]
 

Definition at line 36 of file MCFsbostream.h.


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