The Any class can contain an instance of one of any type in its support type set.
More...
#include <any.h>
|
enum | Type {
Type::TYPE_INT64,
Type::TYPE_UINT64,
Type::TYPE_INT32,
Type::TYPE_UINT32,
Type::TYPE_INT16,
Type::TYPE_UINT16,
Type::TYPE_INT8,
Type::TYPE_UINT8,
Type::TYPE_FLOAT,
Type::TYPE_DOUBLE,
Type::TYPE_INET_ADDR,
Type::TYPE_BOOL,
Type::TYPE_STRING
} |
|
The Any class can contain an instance of one of any type in its support type set.
Definition at line 49 of file any.h.
◆ Type
Enumerator |
---|
TYPE_INT64 | |
TYPE_UINT64 | |
TYPE_INT32 | |
TYPE_UINT32 | |
TYPE_INT16 | |
TYPE_UINT16 | |
TYPE_INT8 | |
TYPE_UINT8 | |
TYPE_FLOAT | |
TYPE_DOUBLE | |
TYPE_INET_ADDR | |
TYPE_BOOL | |
TYPE_STRING | |
Definition at line 52 of file any.h.
◆ Any() [1/15]
EMANE::Any::Any |
( |
std::int64_t |
i64Value | ) |
|
|
explicit |
Creates an Any instance from a signed 64-bit integer
Definition at line 36 of file any.cc.
◆ Any() [2/15]
EMANE::Any::Any |
( |
std::uint64_t |
u64Value | ) |
|
|
explicit |
Creates an Any instance from an unsigned 64-bit integer
Definition at line 40 of file any.cc.
◆ Any() [3/15]
EMANE::Any::Any |
( |
std::int32_t |
i32Value | ) |
|
|
explicit |
Creates an Any instance from a signed 32-bit integer
Definition at line 44 of file any.cc.
◆ Any() [4/15]
EMANE::Any::Any |
( |
std::uint32_t |
u32Value | ) |
|
|
explicit |
Creates an Any instance from an unsigned 32-bit integer
Definition at line 48 of file any.cc.
◆ Any() [5/15]
EMANE::Any::Any |
( |
std::int16_t |
i16Value | ) |
|
|
explicit |
Creates an Any instance from a signed 16-bit integer
Definition at line 52 of file any.cc.
◆ Any() [6/15]
EMANE::Any::Any |
( |
std::uint16_t |
u16Value | ) |
|
|
explicit |
Creates an Any instance from a unsigned 16-bit integer
Definition at line 56 of file any.cc.
◆ Any() [7/15]
EMANE::Any::Any |
( |
std::int8_t |
i8Value | ) |
|
|
explicit |
Creates an Any instance from a signed 8-bit integer
Definition at line 60 of file any.cc.
◆ Any() [8/15]
EMANE::Any::Any |
( |
std::uint8_t |
u8Value | ) |
|
|
explicit |
Creates an Any instance from a unsigned 8-bit integer
Definition at line 64 of file any.cc.
◆ Any() [9/15]
EMANE::Any::Any |
( |
float |
fValue | ) |
|
|
explicit |
Creates an Any instance from a float
Definition at line 68 of file any.cc.
◆ Any() [10/15]
EMANE::Any::Any |
( |
double |
dValue | ) |
|
|
explicit |
Creates an Any instance from a double
Definition at line 72 of file any.cc.
◆ Any() [11/15]
EMANE::Any::Any |
( |
const INETAddr & |
addrValue | ) |
|
|
explicit |
◆ Any() [12/15]
EMANE::Any::Any |
( |
const char * |
pzValue | ) |
|
|
explicit |
Creates an Any instance from a NULL terminated string
Definition at line 84 of file any.cc.
◆ Any() [13/15]
EMANE::Any::Any |
( |
const std::string & |
sValue | ) |
|
|
explicit |
Creates an Any instance from a std::string
Definition at line 88 of file any.cc.
◆ Any() [14/15]
EMANE::Any::Any |
( |
const bool & |
bValue | ) |
|
|
explicit |
Creates an Any instance from a boolean
Definition at line 80 of file any.cc.
◆ Any() [15/15]
EMANE::Any::Any |
( |
const Any & |
rhs | ) |
|
Creates an Any instance from another instance
Definition at line 92 of file any.cc.
◆ ~Any()
Destroys an instance
Definition at line 136 of file any.cc.
◆ asBool()
bool EMANE::Any::asBool |
( |
| ) |
const |
Gets the boolean Any value
- Returns
- value
- Exceptions
-
Definition at line 260 of file any.cc.
◆ asDouble()
double EMANE::Any::asDouble |
( |
| ) |
const |
Gets the double Any value
- Returns
- value
- Exceptions
-
Definition at line 239 of file any.cc.
◆ asFloat()
float EMANE::Any::asFloat |
( |
| ) |
const |
Gets the float Any value
- Returns
- value
- Exceptions
-
Definition at line 229 of file any.cc.
◆ asINETAddr()
◆ asINT16()
std::int16_t EMANE::Any::asINT16 |
( |
| ) |
const |
Gets the signed 16-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 189 of file any.cc.
◆ asINT32()
std::int32_t EMANE::Any::asINT32 |
( |
| ) |
const |
Gets the signed 32-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 169 of file any.cc.
◆ asINT64()
std::int64_t EMANE::Any::asINT64 |
( |
| ) |
const |
Gets the signed 64-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 149 of file any.cc.
◆ asINT8()
std::int8_t EMANE::Any::asINT8 |
( |
| ) |
const |
Gets the signed 8-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 209 of file any.cc.
◆ asString()
std::string EMANE::Any::asString |
( |
| ) |
const |
Gets the string Any value
- Returns
- value
- Exceptions
-
Definition at line 271 of file any.cc.
◆ asUINT16()
std::uint16_t EMANE::Any::asUINT16 |
( |
| ) |
const |
Gets the unsigned 16-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 199 of file any.cc.
◆ asUINT32()
std::uint32_t EMANE::Any::asUINT32 |
( |
| ) |
const |
Gets the unsigned 32-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 179 of file any.cc.
◆ asUINT64()
std::uint64_t EMANE::Any::asUINT64 |
( |
| ) |
const |
Gets the unsigned 64-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 159 of file any.cc.
◆ asUINT8()
std::uint8_t EMANE::Any::asUINT8 |
( |
| ) |
const |
Gets the unsigned 8-bit integer Any value
- Returns
- value
- Exceptions
-
Definition at line 219 of file any.cc.
◆ create()
Creates an Any instance from a string value and type
- Parameters
-
sValue | Value as a string |
type | Type interpret the value as |
Definition at line 343 of file any.cc.
◆ getType()
Gets the Any type
- Returns
- value
Definition at line 281 of file any.cc.
◆ operator<()
bool EMANE::Any::operator< |
( |
const EMANE::Any & |
rhs | ) |
const |
Less than comparison
- Parameters
-
- Returns
- true if less than
Definition at line 476 of file any.cc.
◆ operator<=()
bool EMANE::Any::operator<= |
( |
const EMANE::Any & |
rhs | ) |
const |
Less than or equal comparison
- Parameters
-
- Returns
- true if less than or equal
Definition at line 400 of file any.cc.
◆ operator=()
Creates an Any instance from another instance
Definition at line 110 of file any.cc.
◆ operator>()
bool EMANE::Any::operator> |
( |
const EMANE::Any & |
rhs | ) |
const |
Greater than comparison
- Parameters
-
- Returns
- true if greater than
Definition at line 513 of file any.cc.
◆ operator>=()
bool EMANE::Any::operator>= |
( |
const EMANE::Any & |
rhs | ) |
const |
Greater than or equal comparison
- Parameters
-
- Returns
- true if greater than or equal
Definition at line 438 of file any.cc.
◆ toString()
std::string EMANE::Any::toString |
( |
| ) |
const |
Gets the stringified Any value
- Returns
- value as string
Definition at line 292 of file any.cc.
◆ addrValue_
◆ dValue_
double EMANE::Any::dValue_ |
◆ i64Value_
std::int64_t EMANE::Any::i64Value_ |
◆ sValue_
std::string EMANE::Any::sValue_ |
◆ u64Value_
std::uint64_t EMANE::Any::u64Value_ |
The documentation for this class was generated from the following files: