| Home | Download | Screen shots | Discussion | Documentation |
|---|
event_emitter along with the emitted value.
More...
#include <openvrml/script.h>
Public Member Functions | |
| eventout (field_value::type_id type, script_node &node) throw ( std::bad_alloc ) | |
| Construct. | |
| const field_value & | value () const throw () |
The value that will be sent from the eventOut. | |
| void | value (const field_value &val) throw ( std::bad_alloc , std::bad_cast ) |
Set the value that will be sent from the eventOut. | |
| bool | modified () const throw () |
| Whether the value has been modified. | |
| openvrml::event_emitter & | emitter () throw () |
The event_emitter associated with the eventout. | |
| void | emit_event (double timestamp) throw ( std::bad_alloc ) |
Cause the contained event_emitter to emit an event. | |
Private Attributes | |
| script_node & | node_ |
The containing script_node. | |
| boost::scoped_ptr< field_value > | value_ |
| The value. | |
| bool | modified_ |
| Flag to indicate whether value_ has been modified. | |
| boost::scoped_ptr < openvrml::event_emitter > | emitter_ |
| Event emitter. | |
event_emitter along with the emitted value. | openvrml::script_node::eventout::eventout | ( | field_value::type_id | type, | |
| script_node & | node | |||
| ) | throw ( std::bad_alloc ) |
Construct.
| [in] | type | field value type identifier. |
| [in] | node | script_node. |
| std::bad_alloc | if memory allocation fails. |
| const openvrml::field_value & openvrml::script_node::eventout::value | ( | ) | const throw () |
The value that will be sent from the eventOut.
eventOut. | void openvrml::script_node::eventout::value | ( | const field_value & | val | ) | throw ( std::bad_alloc , std::bad_cast ) |
Set the value that will be sent from the eventOut.
After calling this function, modified will return true until emit_event is called.
| [in] | val | field value. |
| std::bad_alloc | if memory allocation fails. | |
| std::bad_cast | if val is not the correct type. |
| bool openvrml::script_node::eventout::modified | ( | ) | const throw () |
Whether the value has been modified.
true if the value has been changed since emit_event was last called; false otherwise. | openvrml::event_emitter & openvrml::script_node::eventout::emitter | ( | ) | throw () |
The event_emitter associated with the eventout.
event_emitter associated with the eventout. | void openvrml::script_node::eventout::emit_event | ( | double | timestamp | ) | throw ( std::bad_alloc ) |
Cause the contained event_emitter to emit an event.
Events should be emitted from Script nodes by calling this function instead of passing the event_emitter directly to node::emit_event.
| [in] | timestamp | the current time. |
| std::bad_alloc | if memory allocation fails. |
The containing script_node.
boost::scoped_ptr< openvrml::field_value > openvrml::script_node::eventout::value_ [private] |
The value.
bool openvrml::script_node::eventout::modified_ [private] |
Flag to indicate whether value_ has been modified.
boost::scoped_ptr< openvrml::event_emitter > openvrml::script_node::eventout::emitter_ [private] |
Event emitter.