Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Data Fields | Protected Attributes
table_units Class Reference

Data table class with units. More...

#include <table_units.h>

Inheritance diagram for table_units:
table

Detailed Description

Idea for Future:
Make table methods virtual? (not necessary yet since delete_column() isn't referred to internally)

Definition at line 38 of file table_units.h.

Public Member Functions

 table_units (int cmaxlines=0)
 Create a new table_units with space for nlines<=cmaxlines.
std::string get_unit (std::string scol) const
 Get the unit for column scol.
int remove_unit (std::string scol)
 Remove the unit for column scol.
int set_unit (std::string scol, std::string unit)
 Set the unit for column scol to unit.
int convert_to_unit (std::string scol, std::string unit, bool err_on_fail=true)
 Convert the units of column scol to unit.
double get_conv (std::string old_unit, std::string new_unit)
 Get the conversion factor from old_unit to new_unit.
virtual int delete_column (std::string scol)
 Delete column named scol.
virtual const char * type ()
 Return the type, "table_units".
virtual int summary (std::ostream *out, int ncol=79) const
 Output a summary of the information stored.
int set_convert (convert_units &c)
 Set the convert units object.
int show_units ()
 Show the unit cache as given by convert_units::print_cache()
size_t get_nunits ()
 Return the number of columns with units.
Copy constructors
 table_units (const table_units &t)
 table_units (const table &t)
table_unitsoperator= (const table_units &t)
table_unitsoperator= (const table &t)
 Copy constructor.

Data Fields

convert_units def_cu
 The default object for unit conversions.

Protected Types

Unit map iterator types
typedef std::map< std::string,
std::string, string_comp >
::iterator 
uiter
typedef std::map< std::string,
std::string, string_comp >
::const_iterator 
uciter

Protected Attributes

convert_unitscup
 The pointer to the convert units object.
std::map< std::string,
std::string, string_comp
utree
 Unit map.

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.