|
|
|
|
|
|
|
|
|
|
|
|||||||
#include <stlsoft_true_typedef.h>
Public Types | |
| typedef T | value_type |
| The value type. | |
| typedef U | unique_type |
| The unique type. | |
| typedef true_typedef< T, U > | class_type |
| The type of the current parameterisation. | |
| typedef T & | reference |
| The reference type. | |
| typedef T const & | const_reference |
| The non-mutating (const) reference type. | |
Public Methods | |
| true_typedef () | |
| Default constructor. | |
| true_typedef (value_type const &value) | |
| Construct from a value type instance. | |
| true_typedef (class_type const &rhs) | |
| Copy constructor. | |
| class_type const & | operator= (class_type const &rhs) |
| Copy assignment operator. | |
| const_reference | base_type_value () const |
| Provides non-mutating (const) access to the base type value. | |
| reference | base_type_value () |
| Provides mutating access to the base type value. | |
For example, the following code creates two types based on the int type:
stlsoft_gen_opaque(h_protocol_tt)
stlsoft_gen_opaque(h_port_tt)
typedef true_typedef<long, h_protocol_tt> protocol_tt;
typedef true_typedef<long, h_port_tt> port_tt;
protocol_tt pro1(3); // Ok
port_tt prt1(8088); // Ok
protocol_tt pro2(pro1); // Ok, can copy from another protocol_tt
port_tt prt2(pro2); // Error, cannot copy from a protocol_tt
| T |
The base type, e.g. int, std::wstring |
| U | The unique type, usually created by using stlsoft_gen_opaque() |
|
|
The type of the current parameterisation.
|
|
|
The non-mutating (const) reference type.
|
|
|
The reference type.
|
|
|
The unique type.
|
|
|
The value type.
|
|
|
Default constructor.
|
|
|
Construct from a value type instance.
|
|
|
Copy constructor.
|
|
|
Provides mutating access to the base type value.
|
|
|
Provides non-mutating (const) access to the base type value.
|
|
|
Copy assignment operator.
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |