Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

proto_node::proto_eventout< FieldValue >::listener_t Class Reference

Inheritance diagram for proto_node::proto_eventout< FieldValue >::listener_t:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename FieldValue>
class proto_node::proto_eventout< FieldValue >::listener_t

Listens for events emitted from nodes in the PROTO implementation in order to propagate them out of the PROTO instance.

For internal use only.


Public Member Functions

 listener_t (proto_eventout &emitter, proto_node &node, const FieldValue &initial_value)
 Construct.
virtual ~listener_t () throw ()
 Destroy.

Public Attributes

FieldValue value
 The value of the most recently emitted event.

Private Member Functions

virtual void do_process_event (const FieldValue &value, double timestamp) throw (std::bad_alloc)
 Process event.

Private Attributes

proto_eventoutemitter
 Reference to the outer proto_eventout class.
proto_node & node
 Reference to the proto_node instance.

Constructor & Destructor Documentation

template<typename FieldValue>
proto_node::proto_eventout< FieldValue >::listener_t::listener_t proto_eventout emitter,
proto_node &  node,
const FieldValue &  initial_value
 

Construct.

Parameters:
emitter proto_eventout.
node proto_node.
initial_value initial value (used for exposedFields).

template<typename FieldValue>
proto_node::proto_eventout< FieldValue >::listener_t::~listener_t  )  throw () [virtual]
 

Destroy.


Member Function Documentation

template<typename FieldValue>
void proto_node::proto_eventout< FieldValue >::listener_t::do_process_event const FieldValue &  value,
double  timestamp
throw (std::bad_alloc) [private, virtual]
 

Process event.

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

Implements openvrml::field_value_listener< FieldValue >.


Member Data Documentation

template<typename FieldValue>
proto_node::proto_eventout & proto_node::proto_eventout< FieldValue >::listener_t::emitter [private]
 

Reference to the outer proto_eventout class.

Todo:
It's annoying that we need to carry this around. Should investigate the possibility of promoting all this stuff to proto_eventout and have proto_eventout privately inherit field_value_listener<FieldValue>.

template<typename FieldValue>
proto_node & proto_node::proto_eventout< FieldValue >::listener_t::node [private]
 

Reference to the proto_node instance.

template<typename FieldValue>
FieldValue proto_node::proto_eventout< FieldValue >::listener_t::value
 

The value of the most recently emitted event.