antioch-0.4.0
|
Prefixes in unit. More...
#include <siprefix.h>
Public Member Functions | |
SIPrefixes (const std::string &str, const std::string &na, const T &num) | |
Default constructor, a std::string and a value. More... | |
~SIPrefixes () | |
Default destructor. More... | |
template<typename P = T> | |
const P | value () const |
Value getter. More... | |
const std::string | symbol () const |
Symbol getter. More... | |
const std::string | name () const |
Name getter. More... | |
template<typename P > | |
SIPrefixes & | operator= (const SIPrefixes< P > &rhs) |
Assignement operator, copy value and std::string. More... | |
template<typename P > | |
bool | operator== (const SIPrefixes< P > &rhs) const |
Comparison operator, equal if values are equal. More... | |
template<typename P > | |
bool | operator!= (const SIPrefixes< P > &rhs) const |
Comparison operator, not equal is not "equal". More... | |
template<typename P > | |
SIPrefixes< T > & | operator= (const SIPrefixes< P > &rhs) |
Private Member Functions | |
SIPrefixes () | |
Default constructor, never uninitialize this stuff. More... | |
Private Attributes | |
std::string | _symbol |
Two std::strings for the symbol and the name. More... | |
std::string | _name |
T | _value |
A double for the value. More... | |
Prefixes in unit.
This class associates a std::string and a double. We store here the prefixes and the associated value defined in the file unit_defs.hpp
To add prefixes, one needs to add a SIPrefixes instance in the const SIPrefixes Prefixes[] variable in the unit_defs.hpp file:
SIPrefixes("prefix",value)
Definition at line 52 of file siprefix.h.
|
inline |
Default constructor, a std::string and a value.
Definition at line 56 of file siprefix.h.
|
inline |
|
inlineprivate |
Default constructor, never uninitialize this stuff.
Definition at line 81 of file siprefix.h.
References antioch_error.
|
inline |
|
inline |
Comparison operator, not equal is not "equal".
Definition at line 77 of file siprefix.h.
SIPrefixes& Antioch::SIPrefixes< T >::operator= | ( | const SIPrefixes< P > & | rhs | ) |
Assignement operator, copy value and std::string.
|
inline |
Definition at line 91 of file siprefix.h.
References Antioch::init_clone(), Antioch::SIPrefixes< T >::symbol(), and Antioch::SIPrefixes< T >::value().
|
inline |
Comparison operator, equal if values are equal.
Definition at line 74 of file siprefix.h.
References Antioch::SIPrefixes< T >::_value, and Antioch::SIPrefixes< T >::value().
|
inline |
Symbol getter.
Definition at line 65 of file siprefix.h.
References Antioch::SIPrefixes< T >::_symbol.
Referenced by Antioch::SIPrefixes< T >::operator=().
|
inline |
Value getter.
Definition at line 63 of file siprefix.h.
References Antioch::SIPrefixes< T >::_value.
Referenced by Antioch::SIPrefixes< T >::operator=(), and Antioch::SIPrefixes< T >::operator==().
|
private |
Definition at line 83 of file siprefix.h.
Referenced by Antioch::SIPrefixes< T >::name().
|
private |
Two std::strings for the symbol and the name.
Definition at line 83 of file siprefix.h.
Referenced by Antioch::SIPrefixes< T >::symbol().
|
private |
A double for the value.
Definition at line 85 of file siprefix.h.
Referenced by Antioch::SIPrefixes< T >::operator==(), and Antioch::SIPrefixes< T >::value().