Field Class Reference

#include <Field.h>

Inheritance diagram for Field:

Element List of all members.

Public Member Functions

 Field (int type, const std::string &name, FieldValue *value, ExposedField *exposedField=NULL, float min=-FLT_MAX, float max=FLT_MAX, int nodeType=NODE_ANY, int flags=0, const char **strings=NULL)
virtual ~Field ()
virtual int getElementType () const
virtual void write (FILE *f, int indent) const
const std::string & getName () const
int getType () const
FieldValuegetDefault () const
ExposedFieldgetExposedField () const
float getMin () const
float getMax () const
int getNodeType () const
int getFlags () const
const char ** getStrings () const

Private Attributes

std::string * _name
int _type
FieldValue_value
ExposedField_exposedField
float _min
float _max
int _flags
int _nodeType
const char ** _strings

Detailed Description

Generic class that provides the interface to initialise the Node Fields, that corresponds to VRML97 node fields.


Constructor & Destructor Documentation

Field::Field ( int  type,
const std::string &  name,
FieldValue value,
ExposedField exposedField = NULL,
float  min = -FLT_MAX,
float  max = FLT_MAX,
int  nodeType = NODE_ANY,
int  flags = 0,
const char **  strings = NULL 
)

Default Field constructor.

Parameters:
type the field type, e.g. "SFVEC3F"
name the name of the field, e.g. "bboxCenter"
value,the value of the field, e.g. "new SFVec3f(0.0f, 0.0f, 0.0f)"
exposedField the default value is NULL
min the default value is -FLT_MAX
max the default value is FLT_MAX
nodeType the default value is NODE_ANY (it can also be NODE_CHILD, NODE_GEOMETRY, NODE_TEXTURE, NODE_INTERPOLATOR)
flags the default value is 0
**strings the default value is NULL

Field::~Field (  )  [virtual]


Member Function Documentation

virtual int Field::getElementType (  )  const [inline, virtual]

Returns the EL_FIELD_DEF as specified in parent class Element.

Implements Element.

void Field::write ( FILE *  f,
int  indent 
) const [virtual]

const std::string& Field::getName (  )  const [inline]

Returns the name of the field, e.g. "bboxCenter"

int Field::getType (  )  const [inline]

Returns the type of the field, e.g. "SFVEC3F"

FieldValue* Field::getDefault (  )  const [inline]

Returns the default value of the field as it was specified in the Field constructor.

ExposedField* Field::getExposedField (  )  const [inline]

Returns the ExposedField of the field as it was specified in the Field constructor.

float Field::getMin (  )  const [inline]

Returns the Min value of the field as it was specified in the Field constructor.

float Field::getMax (  )  const [inline]

Returns the Max value of the field as it was specified in the Field constructor.

int Field::getNodeType (  )  const [inline]

Returns the NodeType of the field as it was specified in the Field constructor.

int Field::getFlags (  )  const [inline]

Returns the Flags of the field as it was specified in the Field constructor.

const char* * Field::getStrings (  )  const [inline]

Returns the Strings of the field as it was specified in the Field constructor.


Member Data Documentation

std::string* Field::_name [private]

int Field::_type [private]

FieldValue* Field::_value [private]

ExposedField* Field::_exposedField [private]

float Field::_min [private]

float Field::_max [private]

int Field::_flags [private]

int Field::_nodeType [private]

const char* * Field::_strings [private]


Generated on Thu Jan 18 10:06:17 2007 for vhdPLUS by  doxygen 1.5.1-p1