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

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

- Class List
- Class Hierarchy
- Class Members

# openvrml::node_impl_util::ptr_to_polymorphic_mem< MemberBase, Object > Class Template Reference

`#include <openvrml/node_impl_util.h>`

Inheritance diagram for openvrml::node_impl_util::ptr_to_polymorphic_mem< MemberBase, Object >:

[legend]

List of all members.

## Detailed Description

### template<typename MemberBase, typename Object>
class openvrml::node_impl_util::ptr_to_polymorphic_mem< MemberBase, Object >

Abstract base class for a pointer-to-polymorphic-member type.

In conjunction with `ptr_to_polymorphic_mem_impl`, this class circumvents the “contravariance problem” with pointer-to-member types. That is, the type `Base Object::*` is not compatible with the type `Derived Object::*`.

See also:
  openvrml::node_impl_util::ptr_to_polymorphic_mem_impl

## Public Member Functions

virtual | ~ptr_to_polymorphic_mem ()=0 throw ()
| Destroy.
virtual MemberBase & | deref (Object &obj)=0
| Dereference.
virtual const MemberBase & | deref (const Object &obj)=0

## Constructor & Destructor Documentation

template<typename MemberBase, typename Object>

openvrml::node_impl_util::ptr_to_polymorphic_mem< MemberBase, Object >::~ptr_to_polymorphic_mem | ( |  | ) | throw ()`[inline, pure virtual]`

Destroy.

## Member Function Documentation

template<typename MemberBase, typename Object>

MemberBase & openvrml::node_impl_util::ptr_to_polymorphic_mem< MemberBase, Object >::deref | ( | Object & | obj | ) | `[pure virtual]`

Dereference.

Returns:
  a reference to the base type of the member.

Implemented in openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< MemberBase, Member, Object >, openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< openvrml::event_listener, EventListenerMember, Node >, openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< openvrml::event_emitter, EventEmitterMember, Node >, and openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< openvrml::field_value, FieldMember, Node >.

template<typename MemberBase, typename Object>

const MemberBase & openvrml::node_impl_util::ptr_to_polymorphic_mem< MemberBase, Object >::deref | ( | const Object & | obj | ) | `[pure virtual]`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns:
  a `const` reference to the base type of the member.

Implemented in openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< MemberBase, Member, Object >, openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< openvrml::event_listener, EventListenerMember, Node >, openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< openvrml::event_emitter, EventEmitterMember, Node >, and openvrml::node_impl_util::ptr_to_polymorphic_mem_impl< openvrml::field_value, FieldMember, Node >.