Base Framework
|
A signed short integer. More...
#include <base/ShortInteger.h>
Inherits Object.
Public Types | |
enum | { FLAG_ALLOW_SPACES = 1 << 0, FLAG_ALLOW_SIGN = 1 << 1, FLAG_DEFAULT = FLAG_ALLOW_SPACES | FLAG_ALLOW_SIGN } |
Public Member Functions | |
ShortInteger () noexcept | |
ShortInteger (short value) noexcept | |
ShortInteger (const ShortInteger ©) noexcept | |
ShortInteger & | operator= (const ShortInteger &assign) noexcept |
short | getValue () const noexcept |
void | setValue (short value) noexcept |
operator short () const noexcept | |
Static Public Member Functions | |
static short | parse (const char *src, const char *end, unsigned int flags=FLAG_DEFAULT) |
static short | parse (const String &string, unsigned int flags=FLAG_DEFAULT) |
Static Public Attributes | |
static const bool | SIGNED = true |
static const short | MAXIMUM = PrimitiveTraits<short>::MAXIMUM |
static const short | MINIMUM = PrimitiveTraits<short>::MINIMUM |
Protected Attributes | |
short | value = 0 |
A signed short integer.
Signed and short integer (16 bits or more).
|
inlinenoexcept |
Initializes the short integer as zero.
|
inlinenoexcept |
Initializes the short integer with the specified value. Implicit initialization allowed.
value | The desired value. |
|
inlinenoexcept |
Copy constructor. Initializes a new ShortInteger from other ShortInteger object.
|
inlinenoexcept |
Gets the value of the integer.
|
inlinenoexcept |
Casts integer to native type.
|
inlinenoexcept |
Assignment operator.
|
static |
Returns the value of the integer string representation.
src | The string representation. |
end | The string representation. |
flags | The parsing flags. |
|
inlinestatic |
Returns the value of the integer string representation.
string | The string representation. |
flags | The parsing flags. |
|
inlinenoexcept |
Sets the value of the integer.
value | The desired value. |
|
static |
Specifies the maximum value.
|
static |
Specifies the minimum value.
|
static |
True if the integer type is signed.
|
protected |
The value.