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

# openvrml::field_value_listener< FieldValue > Class Template Reference

Concrete event listener template. More...

`#include <openvrml/event.h>`

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

List of all members.

## Public Member Functions
virtual | ~field_value_listener ()=0 throw ()
| Destroy.
void | process_event (const FieldValue &value, double timestamp) throw ( std::bad_alloc )
| Process an event.
virtual field_value::type_id | type () const throw ()
| `FieldValue::field_value_type_id`.
## Protected Member Functions
| field_value_listener () throw ()
| Construct.
## Private Member Functions
virtual void | do_process_event (const FieldValue &value, double timestamp)=0 throw ( std::bad_alloc )
| Called by `field_value_listener<FieldValue>::do_process_event`.

## Detailed Description

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

Concrete event listener template.

Template Parameters:

  | FieldValue | a Field Value.

## Constructor & Destructor Documentation

template<typename FieldValue >

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

Destroy.

Template Parameters:

  | FieldValue | a Field Value.

template<typename FieldValue >

openvrml::field_value_listener< FieldValue >::field_value_listener | ( |  | ) | throw ()`[inline, explicit, protected]`

Construct.

Template Parameters:

  | FieldValue | a Field Value.

## Member Function Documentation

template<typename FieldValue>

void openvrml::field_value_listener< FieldValue >::process_event | ( | const FieldValue & | value,
|  | double | timestamp |
| ) |  |  | throw ( std::bad_alloc )`[inline]`

Process an event.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

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

Exceptions:

  | std::bad_alloc | if memory allocation fails.

template<typename FieldValue >

field_value::type_id openvrml::field_value_listener< FieldValue >::type | ( |  | ) | const throw ()`[inline, virtual]`

`FieldValue::field_value_type_id`.

Template Parameters:

  | FieldValue | a Field Value.

Returns:
  `FieldValue::field_value_type_id`.

Implements openvrml::event_listener.

template<typename FieldValue>

void openvrml::field_value_listener< FieldValue >::do_process_event | ( | const FieldValue & | value,
|  | double | timestamp |
| ) |  |  | throw ( std::bad_alloc )`[private, pure virtual]`

Called by `field_value_listener<FieldValue>::do_process_event`.

Subclasses must implement this function.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

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

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Implemented in openvrml::exposedfield< FieldValue >.