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

MRAsbn Class Reference

#include <MRAsbn.h>

Collaboration diagram for MRAsbn:

Collaboration graph
[legend]

Public Member Functions

MRAsbncopy (int sbn)
MRAsbncopy (const MRAsbn &)
int dim ()
bool is_equal (const MRAsbn &rhs)
 MRAsbn (int dim=0)
 MRAsbn (const MRAsbn &)
bool operator!= (const MRAsbn &rhs)
MRAsbnoperator() (int dim=0)
MRAsbnoperator() (const MRAsbn &)
MRAsbnoperator<< (BufferBase &)
MRAsbnoperator= (int sbn)
MRAsbnoperator= (const MRAsbn &)
bool operator== (const MRAsbn &rhs)
MRAsbnoperator>> (BufferBase &)
intoperator[] (int d)
void read (ostream &)
void read (BufferBase &)
void report (ostream &os=cout)
void set_dim (int)
int sizeb ()
void write (istream &)
void write (BufferBase &)

Private Attributes

int _dim
int _n [MRA_MAXDIM]

Friends

ostream & operator<< (ostream &, MRAsbn &)
BufferBaseoperator<< (BufferBase &, MRAsbn &)
istream & operator>> (istream &, MRAsbn &)
BufferBaseoperator>> (BufferBase &, MRAsbn &)

Constructor & Destructor Documentation

MRAsbn::MRAsbn const MRAsbn  ) 
 

Definition at line 75 of file MRAsbn.h.

References _n.

00076   : _dim(sbn._dim)
00077 {
00078    for( int d = 0; d < _dim; ++d ) _n[d] = sbn._n[d];
00079 }

MRAsbn::MRAsbn int  dim = 0  )  [explicit]
 

Definition at line 72 of file MRAsbn.h.

00072 : _dim(dim) {}


Member Function Documentation

MRAsbn & MRAsbn::copy int  sbn  ) 
 

Definition at line 93 of file MRAsbn.h.

00094 {
00095    for( int d = 0; d < _dim; ++d ) _n[d] = sbn;
00096    return *this;
00097 }

MRAsbn & MRAsbn::copy const MRAsbn  ) 
 

Definition at line 82 of file MRAsbn.h.

References _dim, and _n.

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

00083 {
00084    _dim = sbn._dim;
00085    for( int d = 0; d < _dim; ++d ) _n[d] = sbn._n[d];
00086    return *this;
00087 }

int MRAsbn::dim  ) 
 

Definition at line 145 of file MRAsbn.h.

Referenced by MCFsbfilename().

00145 { return _dim; }

bool MRAsbn::is_equal const MRAsbn rhs  ) 
 

Definition at line 119 of file MRAsbn.h.

References _dim, and _n.

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

00120 {
00121    if ( _dim != rhs._dim ) return false;
00122    for( int d = 0; d < _dim; ++d ) 
00123       if ( _n[d] != rhs._n[d] ) return false;
00124    return true;
00125 }

bool MRAsbn::operator!= const MRAsbn rhs  ) 
 

Definition at line 131 of file MRAsbn.h.

References is_equal().

00131 { return !is_equal(rhs); }

MRAsbn & MRAsbn::operator() int  dim = 0  ) 
 

Definition at line 109 of file MRAsbn.h.

00110 { 
00111    _dim = dim;
00112    return *this;
00113 }

MRAsbn & MRAsbn::operator() const MRAsbn  ) 
 

Definition at line 103 of file MRAsbn.h.

References copy().

00104 { 
00105    return copy(sbn); 
00106 }

MRAsbn & MRAsbn::operator<< BufferBase  ) 
 

Definition at line 160 of file MRAsbn.h.

References write().

00161 {
00162    write(buffer);
00163    return *this;
00164 }

MRAsbn & MRAsbn::operator= int  sbn  ) 
 

Definition at line 100 of file MRAsbn.h.

References copy().

00100 { return copy(rhs); }

MRAsbn & MRAsbn::operator= const MRAsbn  ) 
 

Definition at line 90 of file MRAsbn.h.

References copy().

00090 { return copy(rhs); }

bool MRAsbn::operator== const MRAsbn rhs  ) 
 

Definition at line 128 of file MRAsbn.h.

References is_equal().

00128 { return is_equal(rhs); }

MRAsbn & MRAsbn::operator>> BufferBase  ) 
 

Definition at line 174 of file MRAsbn.h.

References read().

00175 {
00176    read(buffer);
00177    return *this;
00178 }

int & MRAsbn::operator[] int  d  ) 
 

Definition at line 116 of file MRAsbn.h.

00116 { return _n[d]; }

void MRAsbn::read ostream &   ) 
 

Definition at line 190 of file MRAsbn.h.

00191 {
00192    bytepack bp;
00193    for( int d = 0; d < _dim; ++d ) os << bp( _n[d], 4 );
00194 }

void MRAsbn::read BufferBase  ) 
 

Definition at line 167 of file MRAsbn.h.

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

00168 {
00169    bytepack bp;
00170    for( int d = 0; d < _dim; ++d ) buffer << bp( _n[d], 4 );
00171 }

void MRAsbn::report ostream &  os = cout  ) 
 

Definition at line 134 of file MRAsbn.h.

Referenced by MCFTPrequest.report(), and MCFTPquote.report().

00134                                  {
00135    os << "MRAsbn::report(){\n";
00136    os << "dim = " << _dim << '\n';
00137    for( int d = 0; d < _dim; ++d ) { os << "n[] = " << _n[d] << '\n'; }
00138    os << "}\n";
00139 }

void MRAsbn::set_dim int   ) 
 

Definition at line 142 of file MRAsbn.h.

00142 { _dim = dim; }

int MRAsbn::sizeb  ) 
 

Definition at line 148 of file MRAsbn.h.

Referenced by MRAsbBase.hdrsizeb(), MCFTPrequest.sizeb(), and MCFTPquote.sizeb().

00148 { return _dim * 4; }

void MRAsbn::write istream &   ) 
 

Definition at line 181 of file MRAsbn.h.

00182 {
00183    bytepack bp;
00184    for( int d = 0; d < _dim; ++d ) {
00185       is >> bp( 0, 4 ); _n[d] = int(bp);
00186    }
00187 }

void MRAsbn::write BufferBase  ) 
 

Definition at line 151 of file MRAsbn.h.

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

00152 {
00153    bytepack bp;
00154    for( int d = 0; d < _dim; ++d ) {
00155       buffer >> bp( 0, 4 ); _n[d] = int(bp);
00156    }
00157 }


Friends And Related Function Documentation

ostream& operator<< ostream &  os,
MRAsbn sbn
[friend]
 

Definition at line 220 of file MRAsbn.h.

00221 {
00222    sbn.read(os);
00223    return os;
00224 }

BufferBase& operator<< BufferBase buffer,
MRAsbn sbn
[friend]
 

Definition at line 206 of file MRAsbn.h.

00207 {
00208    sbn.read(buffer);
00209    return buffer;
00210 }

istream& operator>> istream &  is,
MRAsbn sbn
[friend]
 

Definition at line 213 of file MRAsbn.h.

00214 {
00215    sbn.write(is);
00216    return is;
00217 }

BufferBase& operator>> BufferBase buffer,
MRAsbn sbn
[friend]
 

Definition at line 199 of file MRAsbn.h.

00200 {
00201    sbn.write(buffer);
00202    return buffer;
00203 }


Field Documentation

int MRAsbn._dim [private]
 

Definition at line 61 of file MRAsbn.h.

Referenced by copy(), and is_equal().

int MRAsbn._n[MRA_MAXDIM] [private]
 

Definition at line 62 of file MRAsbn.h.

Referenced by copy(), is_equal(), and MRAsbn().


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