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
[legend]
Collaboration diagram for Number:
Collaboration graph
[legend]

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
 

Friends

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.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m 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.

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

Member Function Documentation

const char* Number::getBuffer ( ) const
inline

Definition at line 100 of file numbers.h.

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

Definition at line 111 of file numbers.h.

Number::operator long ( )
inline

Definition at line 108 of file numbers.h.

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

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 
)
friend
long operator+ ( const long  val,
const Number num 
)
friend
long operator- ( const Number num,
long  val 
)
friend
long operator- ( const long  val,
const Number num 
)
friend

Field Documentation

char* Number::buffer
protected

Definition at line 88 of file numbers.h.

unsigned Number::size
protected

Definition at line 89 of file numbers.h.


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