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

# openvrml::field_value_emitter< FieldValue > Class Template Reference

Concrete event emitter template. More...

`#include <openvrml/event.h>`

Inheritance diagram for openvrml::field_value_emitter< FieldValue >:
[legend]

List of all members.

## Public Member Functions
| field_value_emitter (const FieldValue &value) throw ()
| Construct.
virtual | ~field_value_emitter ()=0 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.

## Detailed Description

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

Concrete event emitter template.

Template Parameters:

  | FieldValue | a Field Value.

## Constructor & Destructor Documentation

template<typename FieldValue>

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

Construct.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | value | `field_value` associated with this emitter.

template<typename FieldValue >

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

Destroy.

Template Parameters:

  | FieldValue | a Field Value.

## 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.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | 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.

Reimplemented from openvrml::event_emitter.

template<typename FieldValue>

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

Remove an event listener.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | 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).

Reimplemented from openvrml::event_emitter.

template<typename FieldValue >

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

Emit an event.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | timestamp | the current time.

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Reimplemented from openvrml::event_emitter.