bbtk::anyholder< ValueType * > Class Template Reference

specialization of anyholder for pointer types More...

#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 (ValueType *const &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 &t) const
virtual anyplaceholderclone () const

Public Attributes

ValueType * held


Detailed Description

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

specialization of anyholder for pointer types

Definition at line 147 of file bbtkAny.h.


Constructor & Destructor Documentation

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

Definition at line 151 of file bbtkAny.h.

00152       : held(value)
00153     { }


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 157 of file bbtkAny.h.

00158     {
00159       return typeid(ValueType*);
00160     }

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 162 of file bbtkAny.h.

00162 { return true; }

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 163 of file bbtkAny.h.

00163 { return typeid(ValueType); }

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 164 of file bbtkAny.h.

00164                                       { 
00165       return (void*)held; 
00166     }

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

Implements bbtk::anyplaceholder.

Definition at line 167 of file bbtkAny.h.

References bbtk::run_time_up_or_down_cast().

00168     { 
00169       return run_time_up_or_down_cast(t,typeid(ValueType),held);
00170     }

Here is the call graph for this function:

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

Implements bbtk::anyplaceholder.

Definition at line 172 of file bbtkAny.h.

00172 { return new anyholder(held); }


Member Data Documentation

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

Definition at line 176 of file bbtkAny.h.


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