Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Friends
Number Class Reference

A number manipulation class. More...

#include <numbers.h>

Inheritance diagram for Number:
Inheritance graph
Collaboration diagram for Number:
Collaboration graph

Public Member Functions

 Number (char *buffer, unsigned size)
 Create an instance of a number. More...
void setValue (long value)
const char * getBuffer () const
long getValue () const
long operator() ()
 operator long ()
 operator char * ()
long operator= (const long value)
long operator+= (const long value)
long operator-= (const long value)
long operator-- ()
long operator++ ()
int operator== (const Number &num)
int operator!= (const Number &num)
int operator< (const Number &num)
int operator<= (const Number &num)
int operator> (const Number &num)
int operator>= (const Number &num)

Protected Attributes

char * buffer
unsigned size


long operator+ (const Number &num, const long val)
long operator+ (const long val, const Number &num)
long operator- (const Number &num, long val)
long operator- (const long val, const Number &num)

Detailed Description

A number manipulation class.

This is used to extract, convert, and manage simple numbers that are represented in C ascii strings in a very quick and optimal way.

David Sugar number manipulation.

Definition at line 85 of file numbers.h.

Constructor & Destructor Documentation

Number::Number ( char *  buffer,
unsigned  size 

Create an instance of a number.

bufferor NULL if created internally.
sizeuse - values for zero filled.

Member Function Documentation

const char* Number::getBuffer ( ) const

Definition at line 100 of file numbers.h.

long Number::getValue ( ) const
Number::operator char * ( )

Definition at line 111 of file numbers.h.

Number::operator long ( )

Definition at line 108 of file numbers.h.

int Number::operator!= ( const Number num)
long Number::operator() ( )

Definition at line 105 of file numbers.h.

long Number::operator++ ( )
long Number::operator+= ( const long  value)
long Number::operator-- ( )
long Number::operator-= ( const long  value)
int Number::operator< ( const Number num)
int Number::operator<= ( const Number num)
long Number::operator= ( const long  value)
int Number::operator== ( const Number num)
int Number::operator> ( const Number num)
int Number::operator>= ( const Number num)
void Number::setValue ( long  value)

Friends And Related Function Documentation

long operator+ ( const Number num,
const long  val 
long operator+ ( const long  val,
const Number num 
long operator- ( const Number num,
long  val 
long operator- ( const long  val,
const Number num 

Field Documentation

char* Number::buffer

Definition at line 88 of file numbers.h.

unsigned Number::size

Definition at line 89 of file numbers.h.

The documentation for this class was generated from the following file: