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

DCFsbostreamBase.cpp

Go to the documentation of this file.
00001 // DCFsbostreamBase.cpp
00002 //////////////////////////////////////////////////////////////////////
00003 //          (c) Copyright 2001-2002 Brown Deer Technology, LLC.
00004 //                        All rights reserved.
00005 //////////////////////////////////////////////////////////////////////
00006 
00007 #ifdef USE_STD
00008 #include <string>
00009 using namespace std;
00010 #else
00011 #include <string.h>
00012 #endif
00013 
00014 #include "DCFsbostreamBase.h"
00015 
00016 DCFsbostreamBase::DCFsbostreamBase( const string& descript, ostream& os) 
00017   : _version(0), _revision(0), _author(0),
00018     _blocknum(0), _mthis0(0), _mthis1(0), _mmax(0),
00019     _bplen_sizeb(1), _bplen_n(1),
00020     _enctype(0), _encsizeb(2),
00021     _os(&os),
00022     _needheader(true), _lockfinalstep(false), _finalstep(-1)
00023 {
00024    _lendescript = descript.size();
00025    _descript = descript;
00026 };
00027 
00028 void DCFsbostreamBase::descr( ostream& os ) 
00029 {
00030    os << "DCF DESCR version= " <<_version << endl;
00031    os << "DCF DESCR revision= " << _revision << endl;
00032    os << "DCF DESCR author= " << _author << endl;
00033    os << "DCF DESCR lendescript= " << _lendescript << endl;
00034    os << "DCF DESCR descript= " << _descript << endl;
00035    os << "DCF DESCR blocknum= " << _blocknum << endl;
00036    os << "DCF DESCR mthis0= " << _mthis0 << endl;
00037    os << "DCF DESCR mthis1= " << _mthis1 << endl;
00038    os << "DCF DESCR mmax= " << _mmax << endl;
00039    os << "DCF DESCR bplen_sizeb= " << _bplen_sizeb << endl;
00040    os << "DCF DESCR bplen_n= " << _bplen_n << endl;
00041 
00042    os << "DCF DESCR enctype= " << _enctype << endl;
00043    os << "DCF DESCR encsizeb= " << _encsizeb << endl;
00044 };
00045 
00046 void DCFsbostreamBase::outheader() 
00047 {
00048    bytepack bp;
00049 
00050    (*_os) << "DCFsb_";
00051    (*_os) << bp(_version,1);
00052    (*_os) << bp(_revision,1);
00053    (*_os) << bp(_author,2);
00054    (*_os) << bp(_lendescript,1);
00055    (*_os) << _descript;
00056    (*_os) << bp(_blocknum,2);
00057    (*_os) << bp(_mthis0,1);
00058    (*_os) << bp(_mthis1,1);
00059    (*_os) << bp(_mmax,1);
00060    (*_os) << bp(_bplen_sizeb,1);
00061    (*_os) << bp(_bplen_n,1);
00062 
00063    (*_os) << bp(_enctype,1);
00064    (*_os) << bp(_encsizeb,1);
00065 
00066    _needheader = false;
00067 };
00068 
00069 

Generated on Mon May 31 21:38:44 2004 for SR2k4 Assembler by doxygen 1.3.6