|
antioch-0.4.0
|
Seven integers to characterize the power vector. More...
#include <insi.h>
Public Member Functions | |
| InSI (int i0=0, int i1=0, int i2=0, int i3=0, int i4=0, int i5=0, int i6=0, int i7=0) | |
| Building constructor, fully descriptive, with zeros as default values to simplify coder's interface. More... | |
| bool | operator== (const InSI &rhs) const |
| Bool equalize operator, true if all the powers are equal. More... | |
| bool | operator!= (const InSI &rhs) const |
| Not bool const operator==(const InSI&) More... | |
| InSI & | operator= (const InSI &rhs) |
| Assignement operator, equalize all the powers. More... | |
| InSI & | operator+= (const InSI &rhs) |
| Adding operator, add all the powers. More... | |
| InSI & | operator-= (const InSI &rhs) |
| Substracting operator, substract all the powers. More... | |
| InSI & | operator*= (int rhs) |
| Multiplying operator, multiply all the powers. More... | |
| InSI & | operator/= (int rhs) |
| Dividing operator. More... | |
| InSI | operator+ (const InSI &rhs) const |
| Adding operator, add all the powers. More... | |
| InSI | operator- (const InSI &rhs) const |
| Substracting operator, substract all the powers. More... | |
| InSI | operator* (int rhs) const |
| Multiplying operator, multiply all the powers. More... | |
| InSI | operator/ (int rhs) const |
| Dividing operator, see InSi & operator/=(int) for details. More... | |
| void | clear () |
| Set all the powers to zeros. More... | |
| int | get_m () const |
| meter power getter More... | |
| int | get_kg () const |
| kilogramme power getter More... | |
| int | get_s () const |
| second power getter More... | |
| int | get_A () const |
| ampere power getter More... | |
| int | get_K () const |
| kelvin power getter More... | |
| int | get_mol () const |
| mol power getter More... | |
| int | get_cd () const |
| candela power getter More... | |
| int | get_rad () const |
| radian power getter More... | |
| bool | empty () const |
| Check if empty (all values to zero) More... | |
Private Attributes | |
| int | m |
| int | kg |
| int | s |
| int | A |
| int | K |
| int | mol |
| int | cd |
| int | rad |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const InSI &rhs) |
| << operator, to format the power vector More... | |
Seven integers to characterize the power vector.
A unit is caracterize by the power associated to every base unit, this class stores those power.
|
inline |
Building constructor, fully descriptive, with zeros as default values to simplify coder's interface.
Definition at line 48 of file insi.h.
Referenced by operator*(), operator+(), operator-(), and operator/().
|
inline |
|
inline |
|
inline |
ampere power getter
Definition at line 106 of file insi.h.
References A.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
candela power getter
Definition at line 112 of file insi.h.
References cd.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
kelvin power getter
Definition at line 108 of file insi.h.
References K.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
kilogramme power getter
Definition at line 102 of file insi.h.
References kg.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
meter power getter
Definition at line 100 of file insi.h.
References m.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
mol power getter
Definition at line 110 of file insi.h.
References mol.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
radian power getter
Definition at line 114 of file insi.h.
References rad.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
second power getter
Definition at line 104 of file insi.h.
References s.
Referenced by operator+(), operator+=(), operator-(), operator-=(), operator=(), and operator==().
|
inline |
|
inline |
Multiplying operator, multiply all the powers.
Definition at line 255 of file insi.h.
References A, cd, InSI(), K, kg, m, mol, rad, and s.
|
inline |
Adding operator, add all the powers.
Definition at line 160 of file insi.h.
References A, cd, get_A(), get_cd(), get_K(), get_kg(), get_m(), get_mol(), get_rad(), get_s(), InSI(), K, kg, m, mol, rad, and s.
Substracting operator, substract all the powers.
Definition at line 175 of file insi.h.
References A, cd, get_A(), get_cd(), get_K(), get_kg(), get_m(), get_mol(), get_rad(), get_s(), InSI(), K, kg, m, mol, rad, and s.
|
inline |
Dividing operator, see InSi & operator/=(int) for details.
Definition at line 270 of file insi.h.
References InSI().
|
inline |
Dividing operator.
Dividing a power needs first to check that the division is possible, i.e. if the power is not null, it must be a multiple of the divider. If not it sends back an error and stops. This division exist for root purposes.
Definition at line 232 of file insi.h.
References A, antioch_unit_error, cd, K, kg, m, mol, rad, and s.
|
inline |
|
friend |
<< operator, to format the power vector
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_A(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_cd(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_K(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_kg(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_m(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_mol(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_rad(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().
|
private |
Definition at line 120 of file insi.h.
Referenced by clear(), empty(), get_s(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator==().