Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

sint Class Reference

#include <sint.h>


Public Methods

void chop ()
 sint (const char *)
 sint (int)
 sint (real)
 sint (const sint &)
 ~sint ()
void operator= (const sint &)
sint operator+ (const sint &)
bool LessThan (const sint &rhs) const
void print (ostream &s=cerr) const
 sint (const char *)
 sint (int)
 sint (const sint &)
void operator= (const sint &)
sint operator+ (const sint &)
void print ()
 ~sint ()
 sint ()
 sint (int)
 sint (const sint &)
 ~sint ()
void operator+= (const sint &)
void operator *= (const sint &)
sint& operator= (const sint &)

Protected Types

enum  { negative, positive }

Protected Methods

 sint (char *d, int n)
bool is_negative () const
bool is_positive () const
bool equal (const sint &rhs) const
int NumDigits () const
int GetDigit (int k) const
int set_digit (int k) const
 sint (char *d, int n)

Protected Attributes

enum sint:: { ... }  sign
char* digits
int ndigits
friend digit_stream

Private Methods

void grow (int size)

Private Attributes

int capacity
int numDigits
int* digits

Static Private Attributes

const int INTDIGITS

Friends

ostream& operator<< (ostream &, const sint &)
ostream& operator<< (ostream &, const sint &)
int operator== (const sint &, const sint &)
int operator< (const sint &, const sint &)


Member Enumeration Documentation

anonymous enum [protected]
 

Enumeration values:
negative  
positive  

Definition at line 16 of file sint.h.


Constructor & Destructor Documentation

sint::sint ( char * d,
int n ) [inline, protected]
 

Definition at line 21 of file sint.h.

sint::sint ( const char * )
 

sint::sint ( int )
 

sint::sint ( real )
 

sint::sint ( const sint & )
 

sint::~sint ( ) [inline]
 

Definition at line 43 of file sint.h.

sint::sint ( char * d,
int n ) [inline, protected]
 

Definition at line 17 of file Version_1/sint.h.

sint::sint ( const char * )
 

sint::sint ( int )
 

sint::sint ( const sint & )
 

sint::~sint ( ) [inline]
 

Definition at line 31 of file Version_1/sint.h.

sint::sint ( )
 

sint::sint ( int )
 

sint::sint ( const sint & )
 

sint::~sint ( ) [inline]
 

Definition at line 43 of file sint.h.


Member Function Documentation

int sint::GetDigit ( int k ) const [protected]
 

bool sint::LessThan ( const sint & rhs ) const
 

Referenced by operator<().

int sint::NumDigits ( ) const [protected]
 

Referenced by operator<<().

void sint::chop ( )
 

Referenced by main().

bool sint::equal ( const sint & rhs ) const [protected]
 

void sint::grow ( int size ) [private]
 

bool sint::is_negative ( ) const [protected]
 

bool sint::is_positive ( ) const [protected]
 

void sint::operator *= ( const sint & )
 

sint sint::operator+ ( const sint & )
 

sint sint::operator+ ( const sint & )
 

void sint::operator+= ( const sint & )
 

sint& sint::operator= ( const sint & )
 

void sint::operator= ( const sint & )
 

void sint::operator= ( const sint & )
 

void sint::print ( )
 

Referenced by main().

void sint::print ( ostream & s = cerr ) const
 

int sint::set_digit ( int k ) const [protected]
 


Friends And Related Function Documentation

int operator< ( const sint & lhs,
const sint & rhs ) [friend]
 

Definition at line 240 of file sint.C.

ostream& operator<< ( ostream & os,
const sint & b ) [friend]
 

Definition at line 251 of file sint.C.

ostream& operator<< ( ostream & os,
const sint & b ) [friend]
 

Definition at line 251 of file sint.C.

int operator== ( const sint &,
const sint & ) [friend]
 


Field Documentation

const int sint::INTDIGITS [static, private]
 

Definition at line 89 of file Version_2/sint.h.

int sint::capacity [private]
 

Definition at line 91 of file Version_2/sint.h.

friend sint::digit_stream [protected]
 

Definition at line 21 of file Version_1/sint.h.

int* sint::digits [private]
 

Definition at line 93 of file Version_2/sint.h.

char* sint::digits [protected]
 

Definition at line 14 of file Version_1/sint.h.

int sint::ndigits [protected]
 

Definition at line 15 of file Version_1/sint.h.

int sint::numDigits [private]
 

Definition at line 92 of file Version_2/sint.h.

enum { ... } sint::sign [protected]
 


The documentation for this class was generated from the following files:
Generated at Sun Feb 24 09:57:34 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001