|
|
|
|
|
|
|
|
|
|
|
|||||||
#include <stlsoft_first_class_promoter.h>
Public Types | |
| typedef T | value_type |
| The value type. | |
| typedef first_class_promoter< T > | class_type |
| The type of the current parameterisation. | |
| typedef T * | pointer |
| The pointer type. | |
| typedef T const * | const_pointer |
| The non-mutating (const) pointer type. | |
| typedef T & | reference |
| The reference type. | |
| typedef T const & | const_reference |
| The non-mutating (const) reference type. | |
Public Methods | |
| first_class_promoter () | |
| Default constructor. | |
| first_class_promoter (class_type const &rhs) | |
| Copy constructor. | |
| template<typename U> | first_class_promoter (U &value) |
| Initialise an instance from an instance of the promoted type. | |
| ~first_class_promoter () | |
| Destructor. | |
| class_type & | operator= (class_type const &rhs) |
| Copy assignment operator. | |
| class_type & | operator= (value_type const &value) |
| Assignment operator, taking an instance of the promoted type. | |
| const_reference | base_type_value () const |
| Provides a non-mutable (const) reference to the promoted type member. | |
| reference | base_type_value () |
| Provides a mutable reference to the promoted type member. | |
| operator reference () | |
| Implicit conversion operator to a reference to the promoted type member. | |
| operator const_reference () const | |
| Implicit conversion operator to a non-mutable(const) reference to the promoted type member. | |
| pointer | operator & () |
| Address-of operator, providing pointer access to the promoted type member. | |
| const_pointer | operator & () const |
| Address-of operator, providing non-mutable (const) pointer access to the promoted type member. | |
This type can be used to promote a basic type (e.g. int) or a type that cannot be used as the base of an inheritance relationship (such as a union) to first class status.
| T | The basic type |
|
|
The type of the current parameterisation.
|
|
|
The non-mutating (const) pointer type.
|
|
|
The non-mutating (const) reference type.
|
|
|
The pointer type.
|
|
|
The reference type.
|
|
|
The value type.
|
|
|
Default constructor.
|
|
|
Copy constructor.
|
|
|
Initialise an instance from an instance of the promoted type.
|
|
|
Destructor.
|
|
|
Provides a mutable reference to the promoted type member.
|
|
|
Provides a non-mutable (const) reference to the promoted type member.
|
|
|
Address-of operator, providing non-mutable (const) pointer access to the promoted type member.
|
|
|
Address-of operator, providing pointer access to the promoted type member.
|
|
|
Implicit conversion operator to a non-mutable(const) reference to the promoted type member.
|
|
|
Implicit conversion operator to a reference to the promoted type member.
|
|
|
Assignment operator, taking an instance of the promoted type.
|
|
|
Copy assignment operator.
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |