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

MCFTPrequest Class Reference

#include <MCFTPrequest.h>

Collaboration diagram for MCFTPrequest:

Collaboration graph
[legend]

Public Member Functions

int array_dim ()
MCFTPrequestcopy (const MCFTPquote &)
MCFTPrequestcopy (const MCFTPrequest &)
MRAcspeccspec ()
int grid_dim ()
bool is_equal (const MCFTPquote &)
bool is_equal (const MCFTPrequest &)
 MCFTPrequest (const MCFTPrequest &rhs)
 MCFTPrequest (const MCFTPquote &rhs)
 MCFTPrequest (int grid_dim, int array_dim=0)
 MCFTPrequest ()
MRAmspecmspec ()
string name ()
bool operator!= (const MCFTPquote &rhs)
bool operator!= (const MCFTPrequest &rhs)
MCFTPrequestoperator() (const MCFTPrequest &)
MCFTPrequestoperator() (const MCFTPquote &)
MCFTPrequestoperator() (int grid_dim, int array_dim=0)
MCFTPrequestoperator() ()
MCFTPrequest operator+ (const MCFTPquote &rhs)
MCFTPrequest operator+ (const MCFTPrequest &rhs)
MCFTPrequestoperator+= (const MCFTPquote &rhs)
MCFTPrequestoperator+= (const MCFTPrequest &rhs)
MCFTPrequest operator- (const MCFTPquote &rhs)
MCFTPrequest operator- (const MCFTPrequest &rhs)
MCFTPrequestoperator-= (const MCFTPquote &rhs)
MCFTPrequestoperator-= (const MCFTPrequest &rhs)
MCFTPrequestoperator<< (istream &)
MCFTPrequestoperator<< (BufferBase &)
MCFTPrequestoperator= (const MCFTPquote &rhs)
MCFTPrequestoperator= (const MCFTPrequest &rhs)
bool operator== (const MCFTPquote &rhs)
bool operator== (const MCFTPrequest &rhs)
MCFTPrequestoperator>> (ostream &)
MCFTPrequestoperator>> (BufferBase &)
void read (ostream &)
void read (BufferBase &)
void report (ostream &=cout)
MRAsbnsbn ()
void set_cspec (const MRAcrange &cthis, const MRAcrange &cexist, const MRAcrange &ctheory)
void set_cspec (const MRAcspec &)
void set_cspec ()
void set_mspec (const MRAmrange &mthis, const MRAmrange &mexist, const MRAmrange &mtheory)
void set_mspec (const MRAmspec &)
void set_mspec ()
void set_name (string)
void set_sbn (const MRAsbn &)
void set_sbn ()
int sizeb ()
void write (istream &)
void write (BufferBase &)

Protected Attributes

int _array_dim
MRAcspec _cspec
int _grid_dim
MRAmspec _mspec
string _name
MRAsbn _sbn

Friends

class MCFTPquote
ostream & operator<< (ostream &, MCFTPrequest &)
BufferBaseoperator<< (BufferBase &, MCFTPrequest &)
istream & operator>> (istream &, MCFTPrequest &)
BufferBaseoperator>> (BufferBase &, MCFTPrequest &)

Constructor & Destructor Documentation

MCFTPrequest::MCFTPrequest  ) 
 

Definition at line 134 of file MCFTPrequest.h.

00134 : _grid_dim(0), _array_dim(0), _name("") {}

MCFTPrequest::MCFTPrequest int  grid_dim,
int  array_dim = 0
 

Definition at line 23 of file MCFTPrequest.cpp.

References _mspec, and _sbn.

00024   : _grid_dim(grid_dim), _array_dim(array_dim), _name("")
00025 {
00026    _sbn(_grid_dim);
00027    _mspec(_grid_dim);
00028 }

MCFTPrequest::MCFTPrequest const MCFTPquote rhs  ) 
 

Definition at line 40 of file MCFTPrequest.cpp.

References MCFTPquote._array_dim, MCFTPquote._cspec, MCFTPquote._grid_dim, MCFTPquote._mspec, MCFTPquote._name, and MCFTPquote._sbn.

00041 {
00042    _grid_dim = quote._grid_dim;
00043    _array_dim = quote._array_dim;
00044    _name = quote._name;
00045    _sbn = quote._sbn;
00046    _mspec = quote._mspec;
00047    _cspec = quote._cspec;
00048 }

MCFTPrequest::MCFTPrequest const MCFTPrequest rhs  ) 
 

Definition at line 30 of file MCFTPrequest.cpp.

References _array_dim, _cspec, _grid_dim, _mspec, _name, and _sbn.

00031 {
00032    _grid_dim = request._grid_dim;
00033    _array_dim = request._array_dim;
00034    _name = request._name;
00035    _sbn = request._sbn;
00036    _mspec = request._mspec;
00037    _cspec = request._cspec;
00038 }


Member Function Documentation

int MCFTPrequest::array_dim  ) 
 

Definition at line 328 of file MCFTPrequest.h.

00328 { return _array_dim; }

MCFTPrequest & MCFTPrequest::copy const MCFTPquote  ) 
 

Definition at line 105 of file MCFTPrequest.cpp.

References MCFTPquote._array_dim, MCFTPquote._cspec, MCFTPquote._grid_dim, MCFTPquote._mspec, MCFTPquote._name, and MCFTPquote._sbn.

00106 {
00107    _grid_dim = quote._grid_dim;
00108    _array_dim = quote._array_dim;
00109    _name = quote._name;
00110    _sbn = quote._sbn;
00111    _mspec = quote._mspec;
00112    _cspec = quote._cspec;
00113    return *this;
00114 }

MCFTPrequest & MCFTPrequest::copy const MCFTPrequest  ) 
 

Definition at line 92 of file MCFTPrequest.cpp.

References _array_dim, _cspec, _grid_dim, _mspec, _name, and _sbn.

Referenced by operator=().

00093 {
00094    if ( this != &request ) {
00095       _grid_dim = request._grid_dim;
00096       _array_dim = request._array_dim;
00097       _name = request._name;
00098       _sbn = request._sbn;
00099       _mspec = request._mspec;
00100       _cspec = request._cspec;
00101    }
00102    return *this;
00103 }

MRAcspec & MCFTPrequest::cspec  ) 
 

Definition at line 340 of file MCFTPrequest.h.

00340 { return _cspec; }

int MCFTPrequest::grid_dim  ) 
 

Definition at line 325 of file MCFTPrequest.h.

00325 { return _grid_dim; }

bool MCFTPrequest::is_equal const MCFTPquote  ) 
 

Definition at line 129 of file MCFTPrequest.cpp.

References MCFTPquote._array_dim, MCFTPquote._cspec, MCFTPquote._grid_dim, MCFTPquote._mspec, MCFTPquote._name, and MCFTPquote._sbn.

00130 {
00131    if ( _grid_dim != quote._grid_dim ) return false;
00132    if ( _array_dim != quote._array_dim ) return false;
00133    if ( _name != quote._name ) return false;
00134    if ( _sbn != quote._sbn ) return false;
00135    if ( _mspec != quote._mspec ) return false;
00136    if ( _cspec != quote._cspec ) return false;
00137    return true;
00138 }

bool MCFTPrequest::is_equal const MCFTPrequest  ) 
 

Definition at line 116 of file MCFTPrequest.cpp.

References _array_dim, _cspec, _grid_dim, _mspec, _name, and _sbn.

Referenced by operator!=(), and operator==().

00117 {
00118    if ( this != &request ) {
00119       if ( _grid_dim != request._grid_dim ) return false;
00120       if ( _array_dim != request._array_dim ) return false;
00121       if ( _name != request._name ) return false;
00122       if ( _sbn != request._sbn ) return false;
00123       if ( _mspec != request._mspec ) return false;
00124       if ( _cspec != request._cspec ) return false;
00125    }
00126    return true;
00127 }

MRAmspec & MCFTPrequest::mspec  ) 
 

Definition at line 337 of file MCFTPrequest.h.

00337 { return _mspec; }

string MCFTPrequest::name  ) 
 

Definition at line 331 of file MCFTPrequest.h.

00331 { return _name; }

bool MCFTPrequest::operator!= const MCFTPquote rhs  ) 
 

Definition at line 167 of file MCFTPrequest.h.

References is_equal().

00168 { 
00169    return !is_equal(rhs);
00170 }

bool MCFTPrequest::operator!= const MCFTPrequest rhs  ) 
 

Definition at line 161 of file MCFTPrequest.h.

References is_equal().

00162 { 
00163    return !is_equal(rhs);
00164 }

MCFTPrequest & MCFTPrequest::operator() const MCFTPrequest  ) 
 

Definition at line 81 of file MCFTPrequest.cpp.

References _array_dim, _cspec, _grid_dim, _mspec, _name, and _sbn.

00082 {
00083    _grid_dim = request._grid_dim;
00084    _array_dim = request._array_dim;
00085    _name = request._name;
00086    _sbn(_grid_dim) = request._sbn;
00087    _mspec(_grid_dim) = request._mspec;
00088    _cspec = request._cspec;
00089    return *this;
00090 }

MCFTPrequest & MCFTPrequest::operator() const MCFTPquote  ) 
 

Definition at line 70 of file MCFTPrequest.cpp.

References MCFTPquote._array_dim, MCFTPquote._cspec, MCFTPquote._grid_dim, MCFTPquote._mspec, _mspec, MCFTPquote._name, MCFTPquote._sbn, and _sbn.

00071 {
00072    _grid_dim = quote._grid_dim;
00073    _array_dim = quote._array_dim;
00074    _name = quote._name;
00075    _sbn(_grid_dim) = quote._sbn;
00076    _mspec(_grid_dim) = quote._mspec;
00077    _cspec = quote._cspec;
00078    return *this;
00079 }

MCFTPrequest & MCFTPrequest::operator() int  grid_dim,
int  array_dim = 0
 

Definition at line 60 of file MCFTPrequest.cpp.

References _mspec, and _sbn.

00061 {
00062    _grid_dim = grid_dim;
00063    _array_dim = array_dim;
00064    _name = "";
00065    _sbn(_grid_dim);
00066    _mspec(_grid_dim);
00067    return *this;
00068 }

MCFTPrequest & MCFTPrequest::operator()  ) 
 

Definition at line 50 of file MCFTPrequest.cpp.

References _mspec, and _sbn.

00051 {
00052    _grid_dim = 0;
00053    _array_dim = 0;
00054    _name = "";
00055    _sbn(0);
00056    _mspec(0);
00057    return *this;
00058 }

MCFTPrequest MCFTPrequest::operator+ const MCFTPquote rhs  ) 
 

Definition at line 181 of file MCFTPrequest.h.

References MCFTPquote._mspec, _mspec, and MRAmspec.mthis.

00182 { 
00183    MCFTPrequest request(*this);
00184    request._mspec.mthis += rhs._mspec.mthis;
00185    return request;
00186 }

MCFTPrequest MCFTPrequest::operator+ const MCFTPrequest rhs  ) 
 

Definition at line 173 of file MCFTPrequest.h.

References _mspec, and MRAmspec.mthis.

00174 { 
00175    MCFTPrequest request(*this);
00176    request._mspec.mthis += rhs._mspec.mthis;
00177    return request;
00178 }

MCFTPrequest & MCFTPrequest::operator+= const MCFTPquote rhs  ) 
 

Definition at line 196 of file MCFTPrequest.h.

References MCFTPquote._mspec, and MRAmspec.mthis.

00197 { 
00198    _mspec.mthis += rhs._mspec.mthis;
00199    return *this;
00200 }

MCFTPrequest & MCFTPrequest::operator+= const MCFTPrequest rhs  ) 
 

Definition at line 189 of file MCFTPrequest.h.

References _mspec, and MRAmspec.mthis.

00190 { 
00191    _mspec.mthis += rhs._mspec.mthis;
00192    return *this;
00193 }

MCFTPrequest MCFTPrequest::operator- const MCFTPquote rhs  ) 
 

Definition at line 211 of file MCFTPrequest.h.

References MCFTPquote._mspec, _mspec, and MRAmspec.mthis.

00212 { 
00213    MCFTPrequest request(*this);
00214    request._mspec.mthis -= rhs._mspec.mthis;
00215    return request;
00216 }

MCFTPrequest MCFTPrequest::operator- const MCFTPrequest rhs  ) 
 

Definition at line 203 of file MCFTPrequest.h.

References _mspec, and MRAmspec.mthis.

00204 { 
00205    MCFTPrequest request(*this);
00206    request._mspec.mthis -= rhs._mspec.mthis;
00207    return request;
00208 }

MCFTPrequest & MCFTPrequest::operator-= const MCFTPquote rhs  ) 
 

Definition at line 226 of file MCFTPrequest.h.

References MCFTPquote._mspec, and MRAmspec.mthis.

00227 { 
00228    _mspec.mthis -= rhs._mspec.mthis;
00229    return *this;
00230 }

MCFTPrequest & MCFTPrequest::operator-= const MCFTPrequest rhs  ) 
 

Definition at line 219 of file MCFTPrequest.h.

References _mspec, and MRAmspec.mthis.

00220 { 
00221    _mspec.mthis -= rhs._mspec.mthis;
00222    return *this;
00223 }

MCFTPrequest & MCFTPrequest::operator<< istream &   ) 
 

Definition at line 247 of file MCFTPrequest.h.

References write().

00248 {
00249    write(is);
00250    return *this;
00251 }

MCFTPrequest & MCFTPrequest::operator<< BufferBase  ) 
 

Definition at line 233 of file MCFTPrequest.h.

References write().

00234 {
00235    write(buffer);
00236    return *this;
00237 }

MCFTPrequest & MCFTPrequest::operator= const MCFTPquote rhs  ) 
 

Definition at line 143 of file MCFTPrequest.h.

References copy().

00144 { 
00145    return copy(rhs); 
00146 }

MCFTPrequest & MCFTPrequest::operator= const MCFTPrequest rhs  ) 
 

Definition at line 137 of file MCFTPrequest.h.

References copy().

00138 { 
00139    return copy(rhs); 
00140 }

bool MCFTPrequest::operator== const MCFTPquote rhs  ) 
 

Definition at line 155 of file MCFTPrequest.h.

References is_equal().

00156 { 
00157    return is_equal(rhs);
00158 }

bool MCFTPrequest::operator== const MCFTPrequest rhs  ) 
 

Definition at line 149 of file MCFTPrequest.h.

References is_equal().

00150 { 
00151    return is_equal(rhs);
00152 }

MCFTPrequest & MCFTPrequest::operator>> ostream &   ) 
 

Definition at line 254 of file MCFTPrequest.h.

References read().

00255 {
00256    read(os);
00257    return *this;
00258 }

MCFTPrequest & MCFTPrequest::operator>> BufferBase  ) 
 

Definition at line 240 of file MCFTPrequest.h.

References read().

00241 {
00242    read(buffer);
00243    return *this;
00244 }

void MCFTPrequest::read ostream &   ) 
 

Definition at line 182 of file MCFTPrequest.cpp.

00184 {
00185    bytepack bp;
00186    os << bp( _grid_dim, 1 );
00187    os << bp( _array_dim, 1 );
00188    os << bp( int(_name.size()), 1 );
00189    for(unsigned int i = 0; i < _name.size(); ++i ) os.put( _name[i] );
00190    os << _sbn;
00191    os << _mspec;
00192    os << _cspec;
00193 }

void MCFTPrequest::read BufferBase  ) 
 

Definition at line 155 of file MCFTPrequest.cpp.

References BufferBase.put().

Referenced by operator<<(), and operator>>().

00156 {
00157    bytepack bp;
00158    buffer << bp( _grid_dim, 1 );
00159    buffer << bp( _array_dim, 1 );
00160    buffer << bp( int(_name.size()), 1 );
00161    for(unsigned int i = 0; i < _name.size(); ++i ) buffer.put( _name[i] );
00162    buffer << _sbn;
00163    buffer << _mspec;
00164    buffer << _cspec;
00165 }

void MCFTPrequest::report ostream &  = cout  ) 
 

Definition at line 200 of file MCFTPrequest.cpp.

References MRAcspec.report(), MRAmspec.report(), and MRAsbn.report().

00201 {
00202    os << "MCFTPrequest::report(){\n";
00203    os << "grid_dim = " << _grid_dim << '\n';
00204    os << "array_dim = " << _array_dim << '\n';
00205    os << "name.size() = " << _name.size() << '\n';
00206    os << "name = " << _name << '\n';
00207    os << "sbn = \n";
00208    _sbn.report(os);
00209    os << "mspec = \n";
00210    _mspec.report(os);
00211    os << "cspec = \n";
00212    _cspec.report(os);
00213    os << "}\n";
00214 }

MRAsbn & MCFTPrequest::sbn  ) 
 

Definition at line 334 of file MCFTPrequest.h.

00334 { return _sbn; }

void MCFTPrequest::set_cspec const MRAcrange cthis,
const MRAcrange cexist,
const MRAcrange ctheory
 

Definition at line 315 of file MCFTPrequest.h.

References MRAcspec.cexist, MRAcspec.ctheory, and MRAcspec.cthis.

00318 { 
00319    _cspec.cthis = cthis;
00320    _cspec.cexist = cexist;
00321    _cspec.ctheory = ctheory;
00322 }

void MCFTPrequest::set_cspec const MRAcspec  ) 
 

Definition at line 312 of file MCFTPrequest.h.

00312 { _cspec = cspec; }

void MCFTPrequest::set_cspec  ) 
 

Definition at line 299 of file MCFTPrequest.h.

References MRAcspec.cexist, MRAcrange.cmax, MRAcrange.cmin, MRAcspec.ctheory, and MRAcspec.cthis.

void MCFTPrequest::set_mspec const MRAmrange mthis,
const MRAmrange mexist,
const MRAmrange mtheory
 

Definition at line 289 of file MCFTPrequest.h.

References MRAmspec.mexist, MRAmspec.mtheory, and MRAmspec.mthis.

00292 { 
00293    _mspec.mthis = mthis;
00294    _mspec.mexist = mexist;
00295    _mspec.mtheory = mtheory;
00296 }

void MCFTPrequest::set_mspec const MRAmspec  ) 
 

Definition at line 286 of file MCFTPrequest.h.

00286 { _mspec = mspec; }

void MCFTPrequest::set_mspec  ) 
 

Definition at line 273 of file MCFTPrequest.h.

References MRAmspec.mexist, MRAmrange.mmax, MRAmrange.mmin, MRAmspec.mtheory, and MRAmspec.mthis.

void MCFTPrequest::set_name string   ) 
 

Definition at line 261 of file MCFTPrequest.h.

00261 { _name = name; }

void MCFTPrequest::set_sbn const MRAsbn  ) 
 

Definition at line 270 of file MCFTPrequest.h.

00270 { _sbn = sbn; }

void MCFTPrequest::set_sbn  ) 
 

Definition at line 264 of file MCFTPrequest.h.

00265 {
00266    _sbn =0;
00267 }

int MCFTPrequest::sizeb  ) 
 

Definition at line 195 of file MCFTPrequest.cpp.

References MRAcspec.sizeb(), MRAmspec.sizeb(), and MRAsbn.sizeb().

Referenced by MCFTPmssg.mcftpsizeb().

00196 {
00197    return 3 + _name.size() + _sbn.sizeb() + _mspec.sizeb() + _cspec.sizeb();
00198 }

void MCFTPrequest::write istream &   ) 
 

Definition at line 167 of file MCFTPrequest.cpp.

References _mspec, and _sbn.

00168 {
00169    bytepack bp;
00170    is >> bp( 0, 1 ); _grid_dim = int(bp);
00171    is >> bp( 0, 1 ); _array_dim = int(bp);
00172    is >> bp( 0, 1 ); int namesize = int(bp);
00173    _name = "";
00174    for( int i = 0; i < namesize; ++i ) _name += is.get();
00175    _sbn(_grid_dim);
00176    is >> _sbn;
00177    _mspec(_grid_dim);
00178    is >> _mspec;
00179    is >> _cspec;
00180 }

void MCFTPrequest::write BufferBase  ) 
 

Definition at line 140 of file MCFTPrequest.cpp.

References _mspec, _sbn, and BufferBase.get().

Referenced by operator<<(), and operator>>().

00141 {
00142    bytepack bp;
00143    buffer >> bp( 0, 1 ); _grid_dim = int(bp);
00144    buffer >> bp( 0, 1 ); _array_dim = int(bp);
00145    buffer >> bp( 0, 1 ); int namesize = int(bp);
00146    _name = "";
00147    for( int i = 0; i < namesize; ++i ) _name += buffer.get();
00148      _sbn(_grid_dim);
00149      buffer >> _sbn;
00150      _mspec(_grid_dim);
00151      buffer >> _mspec;
00152      buffer >> _cspec;
00153 }


Friends And Related Function Documentation

friend class MCFTPquote [friend]
 

Definition at line 121 of file MCFTPrequest.h.

ostream& operator<< ostream &  os,
MCFTPrequest request
[friend]
 

Definition at line 230 of file MCFTPrequest.cpp.

00231 {
00232    request.read(os);
00233    return os;
00234 }

BufferBase& operator<< BufferBase buffer,
MCFTPrequest request
[friend]
 

Definition at line 218 of file MCFTPrequest.cpp.

00219 {
00220    request.read(buffer);
00221    return buffer;
00222 }

istream& operator>> istream &  is,
MCFTPrequest request
[friend]
 

Definition at line 236 of file MCFTPrequest.cpp.

00237 {
00238    request.write(is);
00239    return is;
00240 }

BufferBase& operator>> BufferBase buffer,
MCFTPrequest request
[friend]
 

Definition at line 224 of file MCFTPrequest.cpp.

00225 {
00226    request.write(buffer);
00227    return buffer;
00228 }


Field Documentation

int MCFTPrequest._array_dim [protected]
 

Definition at line 113 of file MCFTPrequest.h.

Referenced by copy(), MCFTPquote.copy(), is_equal(), MCFTPquote.is_equal(), MCFTPquote.MCFTPquote(), MCFTPrequest(), operator()(), and MCFTPquote.operator()().

MRAcspec MCFTPrequest._cspec [protected]
 

Definition at line 119 of file MCFTPrequest.h.

Referenced by copy(), MCFTPquote.copy(), is_equal(), MCFTPquote.is_equal(), MCFTPquote.MCFTPquote(), MCFTPrequest(), operator()(), and MCFTPquote.operator()().

int MCFTPrequest._grid_dim [protected]
 

Definition at line 112 of file MCFTPrequest.h.

Referenced by copy(), MCFTPquote.copy(), is_equal(), MCFTPquote.is_equal(), MCFTPquote.MCFTPquote(), MCFTPrequest(), operator()(), and MCFTPquote.operator()().

MRAmspec MCFTPrequest._mspec [protected]
 

Definition at line 118 of file MCFTPrequest.h.

Referenced by copy(), MCFTPquote.copy(), is_equal(), MCFTPquote.is_equal(), MCFTPquote.MCFTPquote(), MCFTPrequest(), operator()(), MCFTPquote.operator()(), operator+(), MCFTPquote.operator+(), operator+=(), MCFTPquote.operator+=(), operator-(), MCFTPquote.operator-(), operator-=(), MCFTPquote.operator-=(), and write().

string MCFTPrequest._name [protected]
 

Definition at line 115 of file MCFTPrequest.h.

Referenced by copy(), MCFTPquote.copy(), is_equal(), MCFTPquote.is_equal(), MCFTPquote.MCFTPquote(), MCFTPrequest(), operator()(), and MCFTPquote.operator()().

MRAsbn MCFTPrequest._sbn [protected]
 

Definition at line 117 of file MCFTPrequest.h.

Referenced by copy(), MCFTPquote.copy(), is_equal(), MCFTPquote.is_equal(), MCFTPquote.MCFTPquote(), MCFTPrequest(), operator()(), MCFTPquote.operator()(), and write().


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