#include <io/fields.h>
Public Types | |
typedef rutz::fwd_iter< const Field > | Iterator |
Iterator type. | |
Public Member Functions | |
FieldMap (const Field *begin, const Field *end, const FieldMap *parent=0) | |
Construct from a sequence of Field objects. | |
template<unsigned int N> | |
FieldMap (Field const (&array)[N], const FieldMap *parent=0) | |
Construct from an array of Field objects. | |
~FieldMap () | |
Destructor. | |
bool | hasParent () const throw () |
Query whether this FieldMap has a parent. | |
const FieldMap * | parent () const throw () |
Get this FieldMap's parent (or null if non-existent). | |
const Field & | field (const rutz::fstring &name) const |
Look up the field associated with the given name. | |
Iterator | alphaFields () const |
Get an iterator that runs over the Field's in alphabetical order by name. | |
Iterator | ioFields () const |
Get an iterator that runs over the Field's in their "native" order. | |
Static Public Member Functions | |
static const FieldMap * | emptyFieldMap () |
Get a pointer to an empty FieldMap. | |
Classes | |
class | Impl |
Definition at line 547 of file fields.h.
const Field & FieldMap::field | ( | const rutz::fstring & | name | ) | const |
Look up the field associated with the given name.
Parent FieldMap objects will be searched recursively. An exception will be thrown if the named field is not found.
Definition at line 133 of file fields.cc.
References rutz::fstring::c_str(), field(), hasParent(), parent(), rutz::sfmt(), and SRC_POS.
Referenced by FieldContainer::field(), and field().
FieldMap::Iterator FieldMap::ioFields | ( | ) | const |
Get an iterator that runs over the Field's in their "native" order.
The native order is the order they were listed in the sequence that was passed to the FieldMap constructor.
Definition at line 151 of file fields.cc.
Referenced by FieldContainer::readFieldsFrom(), and FieldContainer::writeFieldsTo().