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

MCFsbostreamBase.cpp

Go to the documentation of this file.
00001 // MCFsbostreamBase.cpp
00002 //////////////////////////////////////////////////////////////////////
00003 //          (c) Copyright 2001-2002 Brown Deer Technology, LLC.
00004 //                        All rights reserved.
00005 //////////////////////////////////////////////////////////////////////
00006 
00007 #ifdef USE_STD
00008 #include <iostream>
00009 #include <string>
00010 using namespace std;
00011 #else
00012 #include <iostream.h>
00013 #include <string.h>
00014 #endif
00015 
00016 #include "utility.h"
00017 
00018 #include "MCFsbostreamBase.h"
00019 
00020 void MCFsbostreamBase::report( ostream& os ) 
00021 {
00022    os << "MCF REPORT version= " <<_version << endl;
00023    os << "MCF REPORT revision= " << _revision << endl;
00024    os << "MCF REPORT release= " << _release << endl;
00025    os << "MCF REPORT author= " << _author << endl;
00026    os << "MCF REPORT descript.size()= " << _descript.size() << endl;
00027    os << "MCF REPORT descript= " << _descript << endl;
00028 
00029    os << "MCF REPORT grid_dim= " << 1 << endl;
00030    os << "MCF REPORT array_dim= " << _arraydim << endl;
00031    os << "MCF REPORT bplen_mpsizeb= " << _bplen_mpsizeb << endl;
00032    os << "MCF REPORT bplen_coef= " << _bplen_coef << endl;
00033    os << "MCF REPORT bplen_n= " << _bplen_n << endl;
00034    for( int d = 0; d < _arraydim; ++d ) {
00035       os << "MCF REPORT bplen_a[" << d << "]= " << _bplen_a << endl;
00036    }
00037 
00038    os << "MCF REPORT sbn= " << _sbn << endl;
00039    os << "MCF REPORT mmin_this= " << _mmin_this << endl;
00040    os << "MCF REPORT mmax_this= " << _mmax_this << endl;
00041    os << "MCF REPORT mmin_exist= " << _mmin_exist << endl;
00042    os << "MCF REPORT mmax_exist= " << _mmax_exist << endl;
00043    os << "MCF REPORT mmin_theory= " << _mmin_theory << endl;
00044    os << "MCF REPORT mmax_theory= " << _mmax_theory << endl;
00045    os << "MCF REPORT cmin_this= " << _cmin_this << endl;
00046    os << "MCF REPORT cmax_this= " << _cmax_this << endl;
00047    os << "MCF REPORT cmin_exist= " << _cmin_exist << endl;
00048    os << "MCF REPORT cmax_exist= " << _cmax_exist << endl;
00049    os << "MCF REPORT cmin_theory= " << _cmin_theory << endl;
00050    os << "MCF REPORT cmax_theory= " << _cmax_theory << endl;
00051    os << "MCF REPORT datatype_code= " << _datatype_code << endl;
00052 };
00053 
00054 void MCFsbostreamBase::outheader() 
00055 {
00056    bytepack bp;
00057 // MCF HEADER
00058    (*_os) << "MCF_____";
00059    (*_os) << bp( -1, 4 );       // CAN'T KNOW mcfsizeb YET
00060    (*_os) << bp( _version, 1 );
00061    (*_os) << bp( _revision, 1 );
00062    (*_os) << bp( _release, 1 );
00063    (*_os) << bp( _author, 1 );
00064    (*_os) << bp( int(_descript.size()), 1 );
00065    (*_os) << _descript;
00066 // MRAsb HEADER
00067    (*_os) << bp( -1, 4 );       // CAN'T KNOW sbsizeb YET
00068    (*_os) << bp( 1, 1 );
00069    (*_os) << bp( _arraydim, 1 );
00070    (*_os) << bp( _bplen_mpsizeb, 1 );
00071    (*_os) << bp( _bplen_coef, 1 );
00072    (*_os) << bp( _bplen_n, 1 );
00073    for( int d = 0; d < _arraydim; ++d ) {
00074       (*_os) << bp( _bplen_a, 1 );
00075    }
00076    (*_os) << bp( _sbn, 4 );
00077    (*_os) << bp( _mmin_this, 1 );
00078    (*_os) << bp( _mmax_this, 1 );
00079    (*_os) << bp( _mmin_exist, 1 );
00080    (*_os) << bp( _mmax_exist, 1 );
00081    (*_os) << bp( _mmin_theory, 1 );
00082    (*_os) << bp( _mmax_theory, 1 );
00083    (*_os) << bp( _cmin_this, 1 );
00084    (*_os) << bp( _cmax_this, 1 );
00085    (*_os) << bp( _cmin_exist, 1 );
00086    (*_os) << bp( _cmax_exist, 1 );
00087    (*_os) << bp( _cmin_theory, 1 );
00088    (*_os) << bp( _cmax_theory, 1 );
00089    (*_os) << bp( _datatype_code, 1 );
00090    (*_os) << bp( 3, 1 );
00091    (*_os) << bp( 0, 1 );
00092    (*_os) << bp( 3, 1 );
00093 
00094    _needheader = false;
00095 
00096 };
00097 
00098 void MCFsbostreamBase:: close() 
00099 {
00100    if ( isopen() ) {
00101       bytepack bp;
00102 
00103       (*_os) << bp( 0, _bplen_mpsizeb );
00104       (*_os) << bp( 0, _bplen_mpsizeb );        // NULL mp
00105 
00106       (*_os) << bp( -1, 4 );    // DON'T KNOW sbsizeb
00107 
00108       (*_os) << bp( -1, 4 );    // DON'T KNOW mcfsizeb
00109 
00110 // free-form postscript, usin to record finalsetp
00111       (*_os) << bp( _bplen_n+1, 4 );
00112       (*_os) << bp( _finalstep, _bplen_n );
00113       (*_os) << endl;
00114    }
00115 };
00116 
00117 

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