bbtk::anyholder< ValueType > Class Template Reference

#include <bbtkAny.h>

Inheritance diagram for bbtk::anyholder< ValueType >:

Inheritance graph
[legend]
Collaboration diagram for bbtk::anyholder< ValueType >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 anyholder (const ValueType &value)
virtual const std::type_info & type () const
 returns the type of the held value
virtual bool is_pointer () const
 returns true iff the stored value is a pointer
virtual const std::type_info & pointed_type () const
 returns the type of the pointed held value
virtual void * get_pointer () const
virtual void * get_pointer_to (const std::type_info &) const
virtual anyplaceholderclone () const

Public Attributes

ValueType held


Detailed Description

template<typename ValueType>
class bbtk::anyholder< ValueType >

Concrete template class used by the any class to store values which stores a value of type ValueType

Definition at line 120 of file bbtkAny.h.


Constructor & Destructor Documentation

template<typename ValueType>
bbtk::anyholder< ValueType >::anyholder ( const ValueType &  value  )  [inline]

Definition at line 124 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::held.

00125       : held(value)
00126     {}


Member Function Documentation

template<typename ValueType>
virtual const std::type_info& bbtk::anyholder< ValueType >::type (  )  const [inline, virtual]

returns the type of the held value

Implements bbtk::anyplaceholder.

Definition at line 130 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::type().

Referenced by bbtk::anyholder< ValueType >::type().

00130 { return typeid(ValueType);}

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename ValueType>
virtual bool bbtk::anyholder< ValueType >::is_pointer (  )  const [inline, virtual]

returns true iff the stored value is a pointer

Implements bbtk::anyplaceholder.

Definition at line 131 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::is_pointer().

Referenced by bbtk::anyholder< ValueType >::is_pointer().

00131 { return false; }

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename ValueType>
virtual const std::type_info& bbtk::anyholder< ValueType >::pointed_type (  )  const [inline, virtual]

returns the type of the pointed held value

Implements bbtk::anyplaceholder.

Definition at line 132 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::pointed_type().

Referenced by bbtk::anyholder< ValueType >::pointed_type().

00132 { return typeid(void); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename ValueType>
virtual void* bbtk::anyholder< ValueType >::get_pointer (  )  const [inline, virtual]

If the held value is a pointer then returns its value

Implements bbtk::anyplaceholder.

Definition at line 133 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::get_pointer().

Referenced by bbtk::anyholder< ValueType >::get_pointer().

00133 { return 0; }

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename ValueType>
virtual void* bbtk::anyholder< ValueType >::get_pointer_to ( const std::type_info &   )  const [inline, virtual]

Implements bbtk::anyplaceholder.

Definition at line 134 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::get_pointer_to().

Referenced by bbtk::anyholder< ValueType >::get_pointer_to().

00134 { return 0; }

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename ValueType>
virtual anyplaceholder* bbtk::anyholder< ValueType >::clone (  )  const [inline, virtual]

Implements bbtk::anyplaceholder.

Definition at line 135 of file bbtkAny.h.

References bbtk::anyholder< ValueType >::clone(), and bbtk::anyholder< ValueType >::held.

Referenced by bbtk::anyholder< ValueType >::clone().

00135 { return new anyholder(held); }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

template<typename ValueType>
ValueType bbtk::anyholder< ValueType >::held


The documentation for this class was generated from the following file:

Generated on Wed Nov 12 11:38:25 2008 for BBTK by  doxygen 1.5.6