Class that serves as a reflective interface for the enumeration types. More...
#include <SPL/Runtime/Type/Enum.h>
Class that serves as a reflective interface for the enumeration types.
virtual SPL::Enum::~Enum |
( |
|
) |
|
|
inlinevirtual |
bool SPL::Enum::equals |
( |
const Enum & |
ot |
) |
const |
|
inline |
Equality comparison with another reflective enum
- Parameters
-
ot |
reflective enum to compare to |
- Returns
- true if equal, false otherwise
virtual Enum* SPL::Enum::clone |
( |
|
) |
const |
|
pure virtual |
Create a clone of the enum object
- Returns
- clone of the enum object
void SPL::Enum::assignFrom |
( |
const Enum & |
ot |
) |
|
|
inline |
Set this enum using another enum
- Parameters
-
ot |
other enum to assign from |
- Exceptions
-
void SPL::Enum::swapWith |
( |
Enum & |
ot |
) |
|
|
inline |
Swap this enum with another enum
- Parameters
-
ot |
other enum to swap with |
- Exceptions
-
void SPL::Enum::clear |
( |
|
) |
|
|
inline |
Clear the enum (reset its value to the first enum literal)
template<class BufferType >
void SPL::Enum::serialize |
( |
ByteBuffer< BufferType > & |
buf |
) |
const |
|
inline |
Serialize (binary)
- Parameters
-
template<class BufferType >
void SPL::Enum::deserialize |
( |
ByteBuffer< BufferType > & |
buf |
) |
|
|
inline |
Deserialize (binary)
- Parameters
-
void SPL::Enum::serialize |
( |
std::ostream & |
ostr |
) |
const |
|
inline |
Serialize (character)
- Parameters
-
void SPL::Enum::deserialize |
( |
std::istream & |
istr |
) |
|
|
inline |
Deserialize (character)
- Parameters
-
size_t SPL::Enum::hashCode |
( |
|
) |
const |
|
inline |
Get hash code
- Returns
- hash code
size_t SPL::Enum::getSerializedSize |
( |
|
) |
const |
|
inline |
Get the size in bytes when serialized
- Returns
- size in bytes when serialized
const std::string& SPL::Enum::getValue |
( |
|
) |
const |
|
inline |
Get the string form of the enum value
- Returns
- string form of the enum value
const std::vector<std::string>& SPL::Enum::getValidValues |
( |
|
) |
const |
|
inline |
Get the valid values of the enum
- Returns
- valid values of the enum
bool SPL::Enum::isValidValue |
( |
std::string const & |
value |
) |
const |
|
inline |
Check if the enum value is a valid one
- Parameters
-
value |
enum value to be validated |
- Returns
- true if the value is valid, false otherwise
Enum& SPL::Enum::operator= |
( |
std::string const & |
v |
) |
|
|
inline |
Assign from string
- Parameters
-
- Returns
- this
- Exceptions
-
const Enum& SPL::Enum::operator= |
( |
const Enum & |
ot |
) |
|
|
inline |
Assign from another Enum
- Parameters
-
ot |
other enum to assign from |
- Returns
- this
- Exceptions
-
SPL::Enum::operator std::string const & |
( |
|
) |
const |
|
inline |
Cast to a string
- Returns
- string form of the enum value
const uint32_t SPL::Enum::getIndex |
( |
|
) |
const |
|
inline |
Get the index of the enum value
- Returns
- index of the enum value
void SPL::Enum::deserialize |
( |
std::istream & |
istr, |
|
|
unsigned char |
separator |
|
) |
|
|
|
inline |
Deserialize (character)
- Parameters
-
istr |
input stream |
separator |
the character separating fields in the input |
The documentation for this class was generated from the following file: