Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
more::gen::generic Class Reference
A type which can hold an object or a range of any other copyable type.
More...
#include <more/gen/generic.h>
List of all members.
Public Methods
- generic ()
- generic (generic const &x)
- ~generic ()
- generic & operator= (generic const &rhs)
- template<typename T> generic (T const &x)
- template<typename InputIterator> generic (InputIterator first, InputIterator last)
- template<typename T> bool is ()
- template<typename T> T & to ()
- template<typename T> T const & to () const
- template<typename T> std::pair< T *, T *> to_range ()
- template<typename T> std::pair< T const *, T const *> to_range () const
Friends
Detailed Description
A type which can hold an object or a range of any other copyable type.
The space overhead is one pointer for objects smaller or equal to sizeof(void*), and two pointers plus an allocation for bigger objects. The time overhead, assuming optimalization, should be none for accessing small objects and a pointer dereference for accessing larger objects. Checking the object type is a pointer comparison.
Constructor & Destructor Documentation
more::gen::generic::generic |
( |
|
) |
[inline] |
|
more::gen::generic::generic |
( |
generic const & |
x |
) |
[inline] |
|
more::gen::generic::~generic |
( |
|
) |
[inline] |
|
template<typename T> |
more::gen::generic::generic |
( |
T const & |
x |
) |
[inline] |
|
template<typename InputIterator> |
more::gen::generic::generic |
( |
InputIterator |
first, |
|
|
InputIterator |
last |
|
) |
[inline] |
|
Member Function Documentation
template<typename T> |
bool more::gen::generic::is |
( |
|
) |
[inline] |
|
generic& more::gen::generic::operator= |
( |
generic const & |
rhs |
) |
[inline] |
|
template<typename T> |
T const& more::gen::generic::to |
( |
|
) |
const [inline] |
|
template<typename T> |
T& more::gen::generic::to |
( |
|
) |
[inline] |
|
template<typename T> |
std::pair<T const*, T const*> more::gen::generic::to_range |
( |
|
) |
const [inline] |
|
template<typename T> |
std::pair<T*, T*> more::gen::generic::to_range |
( |
|
) |
[inline] |
|
Friends And Related Function Documentation
friend class bits_generic::scalar_vt [friend]
|
|
friend class bits_generic::vector_vt [friend]
|
|
The documentation for this class was generated from the following file:
Generated on Sat Sep 7 19:12:29 2002 for more with Doxygen
1.2.13.1. Doxygen 1.2.13.1 is written and copyright
1997-2002 by Dimitri van
Heesch.