class MwField


Public Fields

PFSTRUCT_DECLARE

Public Methods

void add_IS_mapping(MwField *field)
Routes to and fro
void addEventIn(MwField *field)
static MwField* clone(MwField *orig)
void containerChanged()
Called to make field dirty and also propagate notification
void copy(const MwField *orig, MbBool copyRoutesAlso=FALSE)
virtual void copyFrom(const MwField &f)
Copies the value from one field to another, assuming same subclass
void copyRoutes(const MwField *orig)
Copies routes from one field to another
static MwField* createInstanceFromName(const MwName &className)
void enableNotify(MbBool b)
Indicates whether notification will propagate as the result of setting the field value
void evaluate()
Evaluates the field from whatever it's routed to
virtual void fixCopy(MbBool )
After a field value has been copied using copyFrom(), this is called to allow fields to update the copy
static MwType* getClassType()
MwNode* getContainer()
MwField* getEventIn(int i)
caller must be sure that eventInList in not NULL
FieldType getFieldType()
Returns type of this field.
MbBool getHasBeenSet()
int getNumEventIns()
Returns the number of eventIns routed to this field
Permission getPermission()
static long getTimeStamp()
virtual MwType* getType()
const char* getTypeName()
static void init()
MbBool is_IS_mapped()
MbBool isDirty()
MbBool isEventIn()
MbBool isEventOut()
virtual int isExactType(MwType *_type)
MbBool isExposedField()
MbBool isField()
MbBool isNotifyEnabled()
virtual int isOfType(MwType *_type)
MbBool isReadOnly()
startTime of a TimeSensor
MbBool isRouted()
virtual MbBool isSame(const MwField &f)
Returns TRUE if the given field is of the same type and has the same value(s) as this
static long nextTimeStamp()
virtual void notify(MwField *orig)
propagates notification up to interested nodes or fields
MbBool notifyNeeded()
friend ostream& operator<< (ostream &o, MwField const &f)
virtual void print(ostream &o)
MbBool read(MwInput *in, const MwName &name)
virtual MbBool referencesCopy()
This returns TRUE if this field contains a reference to a node or engine that is copied during a copy operation (i
void setAsEventIn()
Probably simpler to have a single integer
void setAsEventOut()
void setAsExposedField()
void setAsField()
void setContainer(MwNode *cont)
void setEventType(const char *eventType)
sets fieldType depending on the string passed calls setAsExposedField() if eventType = "exposedField");
void setHasBeenSet(MbBool value)
void setPermission(enum Permission p)
operations that manipulate the individual bits independently
void setQueryContainer(MbBool b)
void setReadOnly(MbBool b)
virtual void touch()
Simulates a change to the field data, causing attached sensors to fire, connected engines to be marked as needing evaluation, etc
void valueChanged()
Called by an instance to indicate that a value has changed
virtual ~MwField()

Protected Classes

struct
unsigned int fieldType : 5
unsigned int valueFrom : 2
if valueFrom is STORED, data is stored in the field if valueFrom is UPSTREAM, query valueSource if valueFrom is CONTAINER, query container
unsigned int permission : 2
unsigned int hasBeenSet : 1
Scripts notify, may not setValue()
unsigned int isNotifying : 1
unsigned int routed : 1
unsigned int IS_mapped : 1
unsigned int notifyEnabled : 1
whether notification is enabled
unsigned int dirty : 1
unsigned int readOnly : 1

Protected Fields

MwFieldList* eventInList
also includes exposed fields
MwField* valueSource
if not null, then use value from valueSource;

Protected

struct
unsigned int fieldType : 5
unsigned int valueFrom : 2
if valueFrom is STORED, data is stored in the field if valueFrom is UPSTREAM, query valueSource if valueFrom is CONTAINER, query container
unsigned int permission : 2
unsigned int hasBeenSet : 1
Scripts notify, may not setValue()
unsigned int isNotifying : 1
unsigned int routed : 1
unsigned int IS_mapped : 1
unsigned int notifyEnabled : 1
whether notification is enabled
unsigned int dirty : 1
unsigned int readOnly : 1

Private Fields

static long* _timeStamp
static MwType* classType
MwNode* container
friend class MwFieldData
friend class MwProto

Private Methods

const MwName& getName()
MwField(MwField &)
... or this
MwField& operator =(const MwField &)
dont want people using this
virtual MbBool readValue(MwInput *in)

Documentation

virtual ~MwField()

static MwField* clone(MwField *orig)

void enableNotify(MbBool b)
Indicates whether notification will propagate as the result of setting the field value. Engines turn this off when writing results into fields, since notification has already propagated.

MbBool isNotifyEnabled()

virtual void touch()
Simulates a change to the field data, causing attached sensors to fire, connected engines to be marked as needing evaluation, etc. Equivalent to performing setValue(getValue())

virtual void notify(MwField *orig)
propagates notification up to interested nodes or fields. Used by eventOuts to notify routed eventIns and/or container nodes

void evaluate()
Evaluates the field from whatever it's routed to. If there's no routed or we don't need to evaluate, this does nothing. This has to be const because it's used by getValue methods.

void valueChanged()
Called by an instance to indicate that a value has changed. Initiates notification, if necessary. Used by a node to indicate to its eventOut's that they are dirty

void containerChanged()
Called to make field dirty and also propagate notification

MbBool isReadOnly()
startTime of a TimeSensor

void setReadOnly(MbBool b)

void setPermission(enum Permission p)
operations that manipulate the individual bits independently

Permission getPermission()

void setAsEventIn()
Probably simpler to have a single integer

void setAsEventOut()

void setAsExposedField()

void setAsField()

MbBool isEventIn()

MbBool isEventOut()

MbBool isExposedField()

MbBool isField()

MbBool isRouted()

MbBool is_IS_mapped()

MbBool isDirty()

void setQueryContainer(MbBool b)

virtual MbBool isSame(const MwField &f)
Returns TRUE if the given field is of the same type and has the same value(s) as this. Subclasses must define this as well as an == operator.

virtual void fixCopy(MbBool )
After a field value has been copied using copyFrom(), this is called to allow fields to update the copy. The default implementation does nothing. Used by MFNode and SFNode to update the field to use the copy of each node if there is one

virtual void copyFrom(const MwField &f)
Copies the value from one field to another, assuming same subclass

virtual MbBool referencesCopy()
This returns TRUE if this field contains a reference to a node or engine that is copied during a copy operation (i.e., it is "inside"). The default method just checks if the field is connected to such a node or engine. Subclasses may contain other tests, such as those that contain pointers to nodes or engines.

void copyRoutes(const MwField *orig)
Copies routes from one field to another

void setEventType(const char *eventType)
sets fieldType depending on the string passed calls setAsExposedField() if eventType = "exposedField");

void setContainer(MwNode *cont)

MwNode* getContainer()

void setHasBeenSet(MbBool value)

MbBool getHasBeenSet()

FieldType getFieldType()
Returns type of this field.

MbBool read(MwInput *in, const MwName &name)

virtual int isOfType(MwType *_type)

virtual int isExactType(MwType *_type)

virtual MwType* getType()

const char* getTypeName()

MbBool notifyNeeded()

void addEventIn(MwField *field)

void add_IS_mapping(MwField *field)
Routes to and fro

int getNumEventIns()
Returns the number of eventIns routed to this field. Checks for eventInList to be NULL, too.

MwField* getEventIn(int i)
caller must be sure that eventInList in not NULL

void copy(const MwField *orig, MbBool copyRoutesAlso=FALSE)

static MwType* getClassType()

static long getTimeStamp()

static long nextTimeStamp()

static void init()

static MwField* createInstanceFromName(const MwName &className)

virtual void print(ostream &o)

friend ostream& operator<< (ostream &o, MwField const &f)

PFSTRUCT_DECLARE

MwFieldList* eventInList
also includes exposed fields

MwField* valueSource
if not null, then use value from valueSource;

struct

unsigned int fieldType : 5

unsigned int valueFrom : 2
if valueFrom is STORED, data is stored in the field if valueFrom is UPSTREAM, query valueSource if valueFrom is CONTAINER, query container

unsigned int permission : 2

unsigned int hasBeenSet : 1
Scripts notify, may not setValue()

unsigned int isNotifying : 1

unsigned int routed : 1

unsigned int IS_mapped : 1

unsigned int notifyEnabled : 1
whether notification is enabled

unsigned int dirty : 1

unsigned int readOnly : 1

const MwName& getName()

MwField& operator =(const MwField &)
dont want people using this

MwField(MwField &)
... or this

static long* _timeStamp

static MwType* classType

MwNode* container

virtual MbBool readValue(MwInput *in)

friend class MwFieldData

friend class MwProto


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de