openvrml::vrml97_node::time_sensor_node Class Reference

Inheritance diagram for openvrml::vrml97_node::time_sensor_node:
[legend]
List of all members.

Detailed Description

TimeSensor node instances.


Public Member Functions

 time_sensor_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope)
 Construct.
virtual ~time_sensor_node () throw ()
 Destroy.
virtual time_sensor_nodeto_time_sensor () const
 Cast to a time_sensor_node.
void update (double time)

Private Member Functions

virtual void do_initialize (double timestamp) throw (std::bad_alloc)
 Initialize.
virtual void do_shutdown (double timestamp) throw ()
 Shut down.

Private Attributes

set_cycle_interval_listener set_cycle_interval_listener_
 set_cycleInterval eventIn handler.
sftime cycle_interval_
 cycleInterval exposedField value.
sftime_emitter cycle_interval_changed_emitter_
 cycleInterval_changed event emitter.
enabled_exposedfield enabled_
 enabled exposedField.
exposedfield< sfboolloop_
 loop exposedField.
set_start_time_listener set_start_time_listener_
 set_startTime event handler.
sftime start_time_
 startTime exposedField value.
sftime_emitter start_time_changed_emitter_
 startTime_changed event emitter.
exposedfield< sftimestop_time_
 stopTime exposedField.
sftime cycle_time_
 cycleTime eventOut value.
sftime_emitter cycle_time_emitter_
 cycleTime eventOut emitter.
sffloat fraction_changed_
 fraction_changed eventOut value.
sffloat_emitter fraction_changed_emitter_
 fraction_changed eventOut emitter.
sfbool is_active_
 isActive eventOut value.
sfbool_emitter is_active_emitter_
 isActive eventOut emitter.
sftime time_
 time eventOut value.
sftime_emitter time_emitter_
 time eventOut emitter.
double lastTime
 The timestamp previously received.

Friends

class time_sensor_class
 Class object for TimeSensor nodes.

Classes

class  enabled_exposedfield
 enabled exposedField implementation. More...
class  set_cycle_interval_listener
 set_cycleInterval eventIn handler. More...
class  set_start_time_listener
 set_startTime eventIn handler. More...

Constructor & Destructor Documentation

openvrml::vrml97_node::time_sensor_node::time_sensor_node ( const node_type type,
const boost::shared_ptr< openvrml::scope > &  scope 
)

Construct.

Parameters:
type the node_type associated with the instance.
scope the scope that the new node will belong to.

openvrml::vrml97_node::time_sensor_node::~time_sensor_node (  )  throw () [virtual]

Destroy.


Member Function Documentation

time_sensor_node * openvrml::vrml97_node::time_sensor_node::to_time_sensor (  )  const [virtual]

Cast to a time_sensor_node.

Returns:
a pointer to the object.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::time_sensor_node::update ( double  time  ) 

Generate timer events. If necessary, events prior to the timestamp (inTime) are generated to respect stopTimes and cycleIntervals. The timestamp should never be increased. This assumes the event loop delivers pending events in order (ascending time stamps). Should inTime be modified? Should ensure continuous events are delivered before discrete ones (such as cycleTime, isActive).

void openvrml::vrml97_node::time_sensor_node::do_initialize ( double  timestamp  )  throw (std::bad_alloc) [private, virtual]

Initialize.

Parameters:
timestamp the current time.
Exceptions:
std::bad_alloc if memory allocation fails.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::time_sensor_node::do_shutdown ( double  timestamp  )  throw () [private, virtual]

Shut down.

Parameters:
timestamp the current time.

Reimplemented from openvrml::node.


Friends And Related Function Documentation

class openvrml::vrml97_node::time_sensor_node::time_sensor_class [friend]

Class object for TimeSensor nodes.


Member Data Documentation

set_cycleInterval eventIn handler.

cycleInterval exposedField value.

cycleInterval_changed event emitter.

enabled exposedField.

loop exposedField.

set_startTime event handler.

startTime exposedField value.

startTime_changed event emitter.

stopTime exposedField.

cycleTime eventOut value.

cycleTime eventOut emitter.

fraction_changed eventOut value.

fraction_changed eventOut emitter.

isActive eventOut value.

isActive eventOut emitter.

time eventOut value.

time eventOut emitter.

The timestamp previously received.