| libqalculate-2.8.1
    | 
A binary prefix. More...
#include <Prefix.h>
 
  
 | Public Member Functions | |
| BinaryPrefix (int exp2, string long_name, string short_name="", string unicode_name="") | |
| int | exponent (int iexp=1) const | 
| Number | exponent (const Number &nexp) const | 
| void | setExponent (int iexp) | 
| Number | value (const Number &nexp) const | 
| Number | value (int iexp) const | 
| Number | value () const | 
| int | type () const | 
|  Public Member Functions inherited from Prefix | |
| Prefix (string long_name, string short_name="", string unicode_name="") | |
| const string & | shortName (bool return_long_if_no_short=true, bool use_unicode=false) const | 
| const string & | longName (bool return_short_if_no_long=true, bool use_unicode=false) const | 
| const string & | unicodeName (bool return_short_if_no_uni=true) const | 
| void | setShortName (string short_name) | 
| void | setLongName (string long_name) | 
| void | setUnicodeName (string unicode_name) | 
| const string & | name (bool short_default=true, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const | 
| Protected Attributes | |
| int | exp | 
|  Protected Attributes inherited from Prefix | |
| string | l_name | 
| string | s_name | 
| string | u_name | 
A binary prefix.
A Binary prefix has an integer exponent which with a base of two constitutes the value of the prefix (value=2^exponent).
| BinaryPrefix::BinaryPrefix | ( | int | exp2, | 
| string | long_name, | ||
| string | short_name = "", | ||
| string | unicode_name = "" | ||
| ) | 
Create a binary prefix.
| exp2 | Exponent for the value. | 
| long_name | Long name. | 
| short_name | Short name. | 
| unicode_name | Unicode name. | 
| int BinaryPrefix::exponent | ( | int | iexp = 1 | ) | const | 
Returns the exponent.
| iexp | Exponent of the unit. | 
Returns the exponent.
| nexp | Exponent of the unit. | 
| void BinaryPrefix::setExponent | ( | int | iexp | ) | 
Sets the exponent of the prefix.
| iexp | New exponent for the prefix. | 
| 
 | virtual | 
Returns type, subclass, of the prefix. This can be PREFIX_DECIMAL for prefixes of the class DecimalPrefix, PREFIX_BINARY for BinaryPrefix, or PREFIX_NUMBER for NumberPrefix.
Implements Prefix.
Returns the value of the prefix.
| nexp | The power of the prefixed unit. | 
Implements Prefix.
| 
 | virtual | 
Returns the value of the prefix.
| iexp | The power of the prefixed unit. | 
Implements Prefix.
| 
 | virtual | 
 1.8.14
 1.8.14