Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

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

# openvrml::field_value_emitter< FieldValue > Class Template Reference

Inheritance diagram for openvrml::field_value_emitter< FieldValue >:

[legend]
List of all members.

## Detailed Description

### template<typename FieldValue>
class openvrml::field_value_emitter< FieldValue >

Concrete event emitter template.

## Public Member Functions

| field_value_emitter (const FieldValue &value) throw ()
| Construct.
virtual | ~field_value_emitter () throw ()
| Destroy.
bool | add (field_value_listener< FieldValue > &listener) throw (std::bad_alloc)
| Add an event listener.
bool | remove (field_value_listener< FieldValue > &listener) throw ()
| Remove an event listener.

## Private Member Functions

virtual void | emit_event (double timestamp) throw (std::bad_alloc)
| Emit an event.

## Constructor & Destructor Documentation

template<typename FieldValue>
openvrml::field_value_emitter< FieldValue >::field_value_emitter | ( | const FieldValue & | value | ) | throw ()`[inline, explicit]`

| Construct.

template<typename FieldValue>
openvrml::field_value_emitter< FieldValue >::~field_value_emitter | ( |  | ) | throw ()`[inline, virtual]`

| Destroy.

## Member Function Documentation

template<typename FieldValue>
bool openvrml::field_value_emitter< FieldValue >::add | ( | field_value_listener< FieldValue > & | listener | ) | throw (std::bad_alloc)`[inline]`

Add an event listener.

Parameters:

  | listener | the listener to add.

Returns:
  `true` if `listener` was added; `false` if `listener` was not added (if it was already registered for the emitter).

Exceptions:

  | std::bad_alloc | if memory allocation fails.

template<typename FieldValue>
bool openvrml::field_value_emitter< FieldValue >::remove | ( | field_value_listener< FieldValue > & | listener | ) | throw ()`[inline]`

Remove an event listener.

Parameters:

  | listener | the listener to remove.

Returns:
  `true` if `listener` was removed; `false` if `listener` was not removed (if it was not registered for the emitter).

template<typename FieldValue>
void openvrml::field_value_emitter< FieldValue >::emit_event | ( | double | timestamp | ) | throw (std::bad_alloc)`[private, virtual]`

Emit an event.

Parameters:

  | timestamp | the current time.

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Implements openvrml::event_emitter.