Gld unit

gld_unit - C++ Module API for units

Synopsis
class gld_unit { private: // data UNIT core; public: // constructors/casts operator UNIT*(void); public: // read accessors char* get_name(void); double get_c(void); double get_e(void); double get_h(void); double get_k(void); double get_m(void); double get_s(void); double get_a(void); double get_b(void); int get_prec(void); public: // iterators bool is_last(void); gld_unit* get_next(void); };

Description
The gld_unit class is simply a cast of the UNIT structure.

convert

 * bool convert(char* name, double &value)
 * bool convert(UNIT* unit, double &value)
 * bool convert(gld_unit &unit, double &value)
 * Convert a value given to a new unit.

get_a

 * double get_a(void) : Retrieve the scalar of the unit.

get_b

 * double get_b(void) : Retrieve the bias of the unit.

get_c

 * double get_c(void) : Retrieve the exponent to the unit constant c.

get_e

 * double get_e(void) : Retrieve the exponent to the unit constant e.

get_h

 * double get_h(void) : Retrieve the exponent to the unit constant h.

get_k

 * double get_k(void)</tt> : Retrieve the exponent to the unit constant k.

get_m

 * double get_m(void)</tt> : Retrieve the exponent to the unit constant m.

get_name

 * char* get_name(void)</tt> : Retrieve the name assigned to the unit.

get_next

 * gld_unit* get_next(void)</tt> : Retrieve the next unit in the unit list.

get_prec

 * int get_prec(void)</tt> : Retrieve the precision of the unit.

get_s

 * double get_s(void)</tt> : Retrieve the exponent to the unit constant s.

gld_type

 * gld_type(char *name)</tt> : Construct a unit handler.

is_last

 * bool is_last(void)</tt> : Determine whether the unit is the last in the unit list.

UNIT

 * (UNIT*)</tt> : Cast the gld_unit to a UNIT* pointer.

Version
The C++ Module API was introduced in to support multithreaded modules.