Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

Dimension Class Reference

Collaboration diagram for Dimension:

Collaboration graph
[legend]
List of all members.

Public Methods

 Dimension ( const char* init)
 Dimension ( const char* name, const char symbol )
 ~Dimension ()
const char* name () const
char symbol () const
const Dimension* next () const

Protected Methods

void p_Dimension ( const char*, const char )

Protected Attributes

char m_symbol
char* m_name
Dimension* m_next

Detailed Description

A class that represents an irreducible measure, such as "mass", "length", or "time". Each dimension has a symbol associated with it that is used in the configuration file. Length is 'L', mass is 'M', time is 't', and so on. Groups of dimensions can then be created by specifying this symbol and a power that the dimension is raised to. For instance, the dimension group (DimensionGroup) for acceleration would be specified as "L*t(-2)". Then, any unit having these dimensions to the specified powers gets classified as an acceleration.


Constructor & Destructor Documentation

Dimension::Dimension ( const char * init )
 

Create a dimension.

Parameters:
init   a string in the format name 'symbol'

The string contains both the name (which can be many characters) and the symbol (a single character) used to represent the dimension.

Dimension::Dimension ( const char * name,
const char symbol )
 

Create a dimension.

Parameters:
name   a string containing the full name of the dimension (i.e. mass).
symbol   a single character representing the dimension (i.e. 'M').

Dimension::~Dimension ( )
 

Destroy a dimension. This should probably never happen for the duration of the program.


Member Function Documentation

const char * Dimension::name ( ) const [inline]
 

Return the text name of the dimension

const Dimension * Dimension::next ( ) const [inline]
 

Get the next dimension in a list of all dimensions

void Dimension::p_Dimension ( const char * name,
const symbol ) [protected]
 

A private subroutine called by several constructors. It initializes the name and symbol fields.

char Dimension::symbol ( ) const [inline]
 

Return the character used to represent the dimension


Member Data Documentation

char * Dimension::m_name [protected]
 

The name of the dimension

Dimension * Dimension::m_next [protected]
 

The next in a list of all dimensions.

char Dimension::m_symbol [protected]
 

The symbol representing the dimension.


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