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

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

- Class List
- Class Hierarchy
- Class Members

# openvrml::field_value_listener< FieldValue > Class Template Reference

`#include <openvrml/event.h>`

Inheritance diagram for openvrml::field_value_listener< FieldValue >:

[legend]

List of all members.

## Detailed Description

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

Concrete event listener template.

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

## Constructor & Destructor Documentation

template<typename FieldValue>

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

Destroy.

template<typename FieldValue>

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

Construct.

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

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

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.

Parameters:

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

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Implemented in openvrml::exposedfield< FieldValue >, and openvrml::exposedfield< openvrml::sfnode >.