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

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

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

`#include <openvrml/node_impl_util.h>`

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

List of all members.

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

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

Template Parameters:

  | MemberBase | the base type of the member.
  | Object | the type that contains the member.

See also:
  openvrml::node_impl_util::ptr_to_polymorphic_mem_impl

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

Template Parameters:

  | MemberBase | the base type of the member.
  | Object | the type that contains the member.

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

Template Parameters:

  | MemberBase | the base type of the member.
  | Object | the type that contains the member.

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.

Template Parameters:

  | MemberBase | the base type of the member.
  | Object | the type that contains the member.

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