| Home | Download | Screen shots | Discussion | Documentation |
|---|
The runtime instantiates subclasses of script for each VRML97 Script node; and calls its methods appropriately to execute script code.
Public Member Functions | |
| virtual | ~script ()=0 |
| Destroy. | |
| virtual void | initialize (double timestamp)=0 |
| Initialize the Script node. | |
| virtual void | process_event (const std::string &id, const field_value &value, double timestamp)=0 |
| Process an event. | |
| virtual void | events_processed (double timestamp)=0 |
| Execute script code after processing events. | |
| virtual void | shutdown (double timestamp)=0 |
| Shut down the Script node. | |
Protected Member Functions | |
| script (script_node &node) | |
| Construct. | |
| void | field (const std::string &id, const field_value &value) throw (unsupported_interface, std::bad_cast, std::bad_alloc) |
| Set the value of a field. | |
Protected Attributes | |
| script_node & | node |
| A reference to the script_node that uses this script object. | |
| openvrml::script::~script | ( | ) | [pure virtual] |
Destroy.
| openvrml::script::script | ( | script_node & | node | ) | [explicit, protected] |
| void openvrml::script::initialize | ( | double | timestamp | ) | [pure virtual] |
Initialize the Script node.
| void openvrml::script::process_event | ( | const std::string & | id, | |
| const field_value & | value, | |||
| double | timestamp | |||
| ) | [pure virtual] |
Process an event.
| void openvrml::script::events_processed | ( | double | timestamp | ) | [pure virtual] |
Execute script code after processing events.
| void openvrml::script::shutdown | ( | double | timestamp | ) | [pure virtual] |
Shut down the Script node.
| void openvrml::script::field | ( | const std::string & | id, | |
| const field_value & | value | |||
| ) | throw (unsupported_interface, std::bad_cast, std::bad_alloc) [protected] |
Set the value of a field.
| id | field identifier. | |
| value | new value. |
| unsupported_interface | if the Script node has no field id. | |
| std::bad_cast | if value is the wrong type. | |
| std::bad_alloc | if memory allocation fails. |
script_node & openvrml::script::node [protected] |
A reference to the script_node that uses this script object.