quantity::ReadUnit< U > Class Template Reference

definition of template ReadUnit More...

#include <Quantity.h>

List of all members.

Private Member Functions

void set (std::string unit) const
 store the status in ReadStatus

Friends

std::istream & operator>> (std::istream &is, const ReadUnit< U > &unit)
 apply ReadUnit in an input stream chain


Detailed Description

template<typename U>
class quantity::ReadUnit< U >

definition of template ReadUnit

this template is parameterized by the Unit which should be assumed

Definition at line 349 of file Quantity.h.


Member Function Documentation

template<typename U>
void quantity::ReadUnit< U >::set ( std::string  unit  )  const [inline, private]

store the status in ReadStatus

ReadStatus has declared ReadUnit a friend, so this routine can access the private _unit data member.

Definition at line 355 of file Quantity.h.

References quantity::ReadStatus::_unit.


Friends And Related Function Documentation

template<typename U>
std::istream& operator>> ( std::istream &  is,
const ReadUnit< U > &  unit 
) [friend]

apply ReadUnit in an input stream chain

user code can place a ReadUnit<U> object in an std::istream chain, where U is the unit to be assumed; the corresponding unit symbol is then stored in ReadStatus through function set (); this function is a friend of ReadUnit, thus it can not access ReadStatus::_unit directly; the reference to the istream object is returned.

Definition at line 366 of file Quantity.h.


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

Generated on Wed Apr 11 18:07:11 2012 for Quantities by  doxygen 1.5.6