Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

Prefix Class Reference

A class for unit scale prefixes (i.e. micro, giga, ... ). More...

Collaboration diagram for Prefix:

Collaboration graph
[legend]
List of all members.

Public Methods

 Prefix ()
 Prefix ( const char* name, const char* abbr, int exp )
 ~Prefix ()
char* name ()
char* abbr ()
int exp ()
Prefix* next ()
void avoid ( const bool& state )
bool avoid () const

Protected Attributes

char* m_name
char* m_abbr
int m_exp
bool m_avoid
Prefix* m_next

Detailed Description

A class for unit scale prefixes (i.e. micro, giga, ... ).


Constructor & Destructor Documentation

Prefix::Prefix ( ) [inline]
 

Default constructor. For use only by XML parser.

Prefix::Prefix ( const char * name,
const char * abbr,
int exp )
 

Constructor for normal use.

Prefix::~Prefix ( )
 

Destructor.


Member Function Documentation

char * Prefix::abbr ( ) [inline]
 

Return the abbreviation of a prefix

bool Prefix::avoid ( ) const [inline]
 

Is this prefix to be avoided?

void Prefix::avoid ( const bool & state ) [inline]
 

Denote this prefix as one to be avoided for common use.

int Prefix::exp ( ) [inline]
 

Return the exponent associated with the prefix. If this prefix is present in front of a unit, then the number must be multiplied by 10^exp() to remove the prefix. For example, since the quantity "101 kPa" is preceded by "k", the abbreviation for "kilo", then we must multiply by 10^3 (=1000) in order to remove the "k". So "101 kPa = 101000 Pa".

char * Prefix::name ( ) [inline]
 

Return the name of the prefix (i.e., "kilo" or "mega"). No dash should appear at the end of a name. The name should be entirely lowercase letters (no capitalization).

Prefix * Prefix::next ( ) [inline]
 

Return the next prefix in the list of all prefixes.


Member Data Documentation

char * Prefix::m_abbr [protected]
 

The abbreviation that specifies the prefix

bool Prefix::m_avoid [protected]
 

Whether to avoid using this prefix in output

int Prefix::m_exp [protected]
 

The power of ten this prefix represents

char * Prefix::m_name [protected]
 

The name of the prefix

Prefix * Prefix::m_next [protected]
 

The next in a list of all Prefixes


The documentation for this class was generated from the following files:
Citrus C++ Reference Manual  20010520