Home | Download | Screen shots | Discussion | Documentation | Links |
---|
Inheritance diagram for ScriptNode:
Public Types | |
typedef std::map< std::string, FieldValuePtr > | FieldValueMap |
A std::map that keys field values on their field name. | |
typedef std::map< std::string, PolledEventOutValue > | EventOutValueMap |
A std::map that keys eventOut values on their eventOut name. | |
Public Methods | |
ScriptNode (ScriptNodeClass &nodeClass, const ScopePtr &scope) | |
Constructor. | |
virtual | ~ScriptNode () throw () |
Destructor. | |
void | setUrl (const MFString &value, double timestamp) |
const MFString & | getUrl () const |
void | addEventIn (FieldValue::Type type, const std::string &id) throw (std::invalid_argument, std::bad_alloc) |
void | addEventOut (FieldValue::Type type, const std::string &id) throw (std::invalid_argument, std::bad_alloc) |
void | addField (const std::string &id, const FieldValuePtr &defaultValue) throw (std::invalid_argument, std::bad_alloc) |
void | initialize (double timestamp) |
void | update (double timestamp) |
void | shutdown (double timestamp) |
void | setEventOut (const std::string &id, const FieldValue &value) throw (UnsupportedInterface, std::bad_cast, std::bad_alloc) |
Set the value of one of the node's eventOuts. | |
const FieldValueMap & | getFieldValueMap () const throw () |
const EventOutValueMap & | getEventOutValueMap () const throw () |
virtual const ScriptNode * | toScript () const throw () |
Return a pointer to this ScriptNode. | |
virtual ScriptNode * | toScript () throw () |
Return a pointer to this ScriptNode. | |
Private Methods | |
Script * | createScript () |
void | assignWithSelfRefCheck (const SFNode &, SFNode &) const throw () |
void | assignWithSelfRefCheck (const MFNode &, MFNode &) const throw () |
virtual void | initializeImpl (double timestamp) throw (std::bad_alloc) |
Initialize. | |
virtual void | setFieldImpl (const std::string &id, const FieldValue &value) throw (UnsupportedInterface, std::bad_cast, std::bad_alloc) |
Set the value of one of the node's fields. | |
virtual const FieldValue & | getFieldImpl (const std::string &id) const throw (UnsupportedInterface) |
Get the value of a field. | |
virtual void | processEventImpl (const std::string &id, const FieldValue &value, double timestamp) throw (UnsupportedInterface, std::bad_cast, std::bad_alloc) |
virtual const FieldValue & | getEventOutImpl (const std::string &id) const throw (UnsupportedInterface) |
Private Attributes | |
ScriptNodeType | scriptNodeType |
Type object for the ScriptNode instance. | |
SFBool | directOutput |
directOutput field. | |
SFBool | mustEvaluate |
mustEvaluate field. | |
MFString | url |
url exposedField. | |
FieldValueMap | fieldValueMap |
Maps user-defined field names to their values. | |
EventOutValueMap | eventOutValueMap |
Maps user-defined eventOut names to their values. | |
Script * | script |
A pointer to a Script object. | |
int | eventsReceived |
A count of the number of events received since ScriptNode::update was called. | |
Friends | |
class | ScriptNodeType |
|
A std::map that keys eventOut values on their eventOut name.
|
|
A std::map that keys field values on their field name.
|
|
Constructor.
|
|
Destructor.
|
|
Get the value of a field.
Implements Node. |
|
Initialize.
Reimplemented from Node. |
|
Set the value of one of the node's eventOuts. This method is intended to be used by scripting language bindings to set the value of eventOuts in response to script code. |
|
Set the value of one of the node's fields.
Implements Node. |
|
Return a pointer to this ScriptNode.
Reimplemented from Node. |
|
Return a pointer to this ScriptNode.
Reimplemented from Node. |
|
directOutput field.
|
|
Maps user-defined eventOut names to their values.
|
|
A count of the number of events received since ScriptNode::update was called.
|
|
Maps user-defined field names to their values.
|
|
mustEvaluate field.
|
|
A pointer to a Script object.
|
|
Type object for the ScriptNode instance. Script node NodeTypes are significantly different from other NodeTypes. While most NodeTypes are shared by the Node instances they spawn, the ScriptNodeType is unique to a ScriptNode instance, and it shares the ScriptNodeInstance's lifetime. This reflects the fact that Script nodes in VRML get their functionality by the addition of fields, eventIns, and eventOuts on a per-instance basis. For ScriptNode instances, Node::nodeType is an alias for the scriptNodeType object. |
|
url exposedField.
|