NumberPrefix Class Reference

A prefix with a free numerical value. More...

#include <Prefix.h>

Inheritance diagram for NumberPrefix:

Prefix

List of all members.

Public Member Functions

 NumberPrefix (const Number &nr, string long_name, string short_name="", string unicode_name="")
void setValue (const Number &nr)
Number value (const Number &nexp) const
Number value (int iexp) const
Number value () const
int type () const

Protected Attributes

Number o_number


Detailed Description

A prefix with a free numerical value.

A prefix without any predefined base, which can use any number.


Constructor & Destructor Documentation

NumberPrefix::NumberPrefix ( const Number nr,
string  long_name,
string  short_name = "",
string  unicode_name = "" 
)

Create a number prefix.

Parameters:
nr Value of the prefix.
long_name Long name.
short_name Short name.
unicode_name Unicode name.


Member Function Documentation

void NumberPrefix::setValue ( const Number nr  ) 

Sets the value of the prefix.

Parameters:
nr New value for the prefix.

Number NumberPrefix::value ( const Number nexp  )  const [virtual]

Returns the value of the prefix.

Parameters:
nexp The power of the prefixed unit.
Returns:
The value of the prefix.

Implements Prefix.

Number NumberPrefix::value ( int  iexp  )  const [virtual]

Returns the value of the prefix.

Parameters:
iexp The power of the prefixed unit.
Returns:
The value of the prefix.

Implements Prefix.

Number NumberPrefix::value (  )  const [virtual]

Returns the value of the prefix.

Returns:
The value of the prefix.

Implements Prefix.

int NumberPrefix::type (  )  const [virtual]

Returns type, subclass, of the prefix. This can be PREFIX_DECIMAL for prefixes of the class DecimalPrefix, PREFIX_BINARY for BinaryPrefix, or PREFIX_NUMBER for NumberPrefix.

Returns:
The type of the prefix.

Implements Prefix.


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

Generated on Tue Jan 5 08:26:29 2010 for libqalculate-0.9.7 by  doxygen 1.5.5