TrinityCore
|
#include <Any.h>
Public Member Functions | |
AnyTableReader (const std::string &name, const Any &a) | |
AnyTableReader (const Any &a) | |
bool | hasMore () const |
void | verifyDone () const |
const Any & | any () const |
void | get (const std::string &s, std::string &v) |
void | get (const std::string &s, uint8 &v) |
void | get (const std::string &s, uint16 &v) |
template<class T > | |
void | get (const std::string &s, Array< T > &v) |
template<class T > | |
void | get (const std::string &s, Table< std::string, T > &v) |
template<class ValueType > | |
void | get (const std::string &s, ValueType &v) |
const Any & | operator[] (const std::string &s) |
template<class ValueType > | |
bool | getIfPresent (const std::string &s, ValueType &v) |
bool | containsUnread (const std::string &s) const |
Private Attributes | |
Any | m_any |
Set< std::string > | m_alreadyRead |
Convenient iteration over the keys of a Any::TABLE, usually for implementing construction of an object from an Any.
Getting an element using either iteration or explicit requests consumes that element from the iterator (but not from the Any!) It is an error to consume the same element more than once from the same iterator.
Verifies that is a TABLE with the given name.
Verifies that is a TABLE.
Return the underlying Any.
|
inline |
If key s appears in the any, reads its value into v and removes that key from the ones available to iterate over.
If key s does not appear in the any, throws a G3D::ParseError.
Assumes that if key s appears in the any it has not already been extracted by this iterator. If it has been read before, an assertion will fail in debug mode.
If key s appears in the any, reads its value into v and removes that key from the ones available to iterate over.
If key s does not appear in the any, throws a G3D::ParseError.
Assumes that if key s appears in the any it has not already been extracted by this iterator. If it has been read before, an assertion will fail in debug mode.
If key s appears in the any, reads its value into v and removes that key from the ones available to iterate over.
If key s does not appear in the any, throws a G3D::ParseError.
Assumes that if key s appears in the any it has not already been extracted by this iterator. If it has been read before, an assertion will fail in debug mode.
Read an entire array at once.
|
inline |
|
inline |
If key s appears in the any, reads its value into v and removes that key from the ones available to iterate over.
If key s does not appear in the any, throws a G3D::ParseError.
Assumes that if key s appears in the any it has not already been extracted by this iterator. If it has been read before, an assertion will fail in debug mode.
|
inline |
Get the value associated with a key only if the key is actually present.
If key s appears in the any, reads its value into v and removes that key from the ones available to iterate over.
If key s does not appear in the any, does nothing.
Assumes that if key s appears in the any it has not already been extracted by this iterator. If it has been read before, an assertion will fail in debug mode.
|
inline |
void G3D::AnyTableReader::verifyDone | ( | ) | const |
Verifies that all keys have been read.
|
private |
|
private |