Field Class Reference

#include <io/fields.h>

Collaboration diagram for Field:

Collaboration graph

List of all members.

Public Member Functions

unsigned int flags () const
 Get all flags or'ed together.
bool startsNewGroup () const
 Query for presence of NEW_GROUP flag.
bool isTransient () const
 Query for presence of TRANSIENT flag.
bool isPersistent () const
 Query for absence of TRANSIENT flag.
bool isString () const
 Query for presence of STRING flag.
bool isNumeric () const
 Query for absence of STRING flag.
bool isMultiValued () const
 Query for presence of MULTI flag.
bool isSingleValued () const
 Query for absence of MULTI flag.
bool isChecked () const
 Query for presence of CHECKED flag.
bool isUnchecked () const
 Query for absence of CHECKED flag.
bool allowGet () const
 Query for absence of NO_GET flag.
bool allowSet () const
 Query for absence of NO_SET flag.
bool isPrivate () const
 Query for presence of PRIVATE flag.
bool isPublic () const
 Query for absence of PRIVATE flag.
bool isBoolean () const
 Query for presence of BOOLEAN flag.
template<class C, class V>
 Field (const rutz::fstring &name, ValueType, V C::*value_ptr, const rutz::fstring &def, const rutz::fstring &min, const rutz::fstring &max, const rutz::fstring &res, unsigned int flags=0)
 Construct using a ValueFieldImpl.
template<class T, class PM>
 Field (const rutz::fstring &name, PM memptr, const T &def, const T &min, const T &max, const T &res, unsigned int flags=0)
 Construct using a pointer-to-member-data.
template<class C, class T>
 Field (const rutz::fstring &name, T(C::*getter)() const, void(C::*setter)(T), const T &def, const T &min, const T &max, const T &res, unsigned int flags=0)
 Construct using a getter/setter pair of pointers-to-member-functions.
Fieldversions (io::version_id lo, io::version_id hi=std::numeric_limits< io::version_id >::max())
const rutz::fstringname () const
 Get the Field's name.
const rutz::fstringdefaultValue () const
 Get the Field's default value.
const rutz::fstringmin () const
 Get the Field's minimum value (only for numeric fields).
const rutz::fstringmax () const
 Get the Field's maximum value (only for numeric fields).
const rutz::fstringres () const
 Get the Field's value quantization step (only for numeric fields).
io::version_id minVersion () const
 Get the minimum serial version id for this field.
io::version_id maxVersion () const
 Get the maximum serial version id for this field.
bool shouldSerialize (io::version_id svid) const
void readValueFrom (FieldContainer *obj, io::reader &reader) const
 Read this field for obj from reader.
void writeValueTo (const FieldContainer *obj, io::writer &writer) const
 Write this field for obj to writer.

Static Public Attributes

static const unsigned int NEW_GROUP = 1 << 0
 field begins a new group
static const unsigned int TRANSIENT = 1 << 1
 otherwise, persistent
static const unsigned int STRING = 1 << 2
 otherwise, numeric
static const unsigned int MULTI = 1 << 3
 otherwise, single-valued
static const unsigned int CHECKED = 1 << 4
 otherwise, unchecked
static const unsigned int NO_GET = 1 << 5
 otherwise, allow get
static const unsigned int NO_SET = 1 << 6
 otherwise, allow set
static const unsigned int PRIVATE = 1 << 7
 otherwise, public
static const unsigned int BOOLEAN = 1 << 8
 field is a boolean value


struct  ValueType
 Symbol class for use with Field's constructors. More...

Detailed Description

Field. We make one Field object per property per class. This class has no virtuals... it can be allocated in a builtin array, which can then be used to construct a FieldMap.

Definition at line 366 of file fields.h.

The documentation for this class was generated from the following file:

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:54:10 2008 by Doxygen version 1.5.5.