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

- Main Page
- Namespaces
- Classes
- Files
- Related Pages
- Examples

- Class List
- Class Hierarchy
- Class Members

# openvrml::field_value_emitter< FieldValue > Class Template Reference

`#include <openvrml/event.h>`

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 ()=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.

## 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, pure 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:

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

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.

Parameters:

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

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Reimplemented from openvrml::event_emitter.