comet::identity_ptr Class Reference
[Com type wrappers.]
Represents the identity Unknown of an object.
More...
#include <ptr.h>
Public Member Functions | |
| identity_ptr () throw () | |
| Default constructor. | |
| ~identity_ptr () throw () | |
| Destructor. | |
| identity_ptr (const identity_ptr &rhs) | |
| Copy constructor. | |
| template<typename Itf> | identity_ptr (const impl::try_cast_t< Itf > &x) throw (com_error) |
| Constructor from Try Cast. | |
| identity_ptr (const impl::try_cast_t< variant_t > &v) throw (com_error) | |
| Constructor from variant_t Try Cast. | |
| template<typename Itf> | identity_ptr (const impl::com_cast_t< Itf > &x) throw (com_error) |
| Constructor from Com Cast. | |
| identity_ptr (const impl::com_cast_t< variant_t > &v) throw (com_error) | |
| Constructor from variant_t com_cast. | |
| identity_ptr (int null) throw (com_error) | |
| Constructions of null pointer. | |
| identity_ptr & | operator= (const identity_ptr &rhs) throw () |
| Copy assignment. | |
| template<typename T> identity_ptr & | operator= (const T &rhs) throw (com_error) |
| Other assignment. | |
| identity_ptr & | operator= (int null) throw (com_error) |
| Null assignment. | |
| IUnknown * | get () const throw () |
| Get at the raw pointer. | |
| IUnknown * | in () const throw () |
| Pass to an [in] parameter. | |
| IUnknown * | raw () const throw () |
| Get at raw interface. | |
| bool | is_null () const throw () |
| Returns true if the wrapped pointer is null. | |
| bool | operator== (int null) const |
| Null comparison. | |
| bool | operator!= (int null) const |
| Null comparison. | |
Pointer Comparison | |
! | |
| bool | operator< (const identity_ptr &x) const throw () |
| bool | operator> (const identity_ptr &x) const throw () |
| bool | operator<= (const identity_ptr &x) const throw () |
| bool | operator>= (const identity_ptr &x) const throw () |
| bool | operator== (const identity_ptr &x) const throw () |
| bool | operator!= (const identity_ptr &x) const throw () |
Protected Member Functions | |
| void | swap (identity_ptr &x) throw () |
| void | addref () const throw () |
| void | release () throw () |
Protected Attributes | |
| IUnknown * | ptr_ |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator== (int null, const identity_ptr &x) throw(com_error) |
| Comparison with null. | |
Detailed Description
Represents the identity Unknown of an object.Is the only really efficient and safe way of representing an object for comparisons.
Constructor & Destructor Documentation
|
|
Default constructor. Initialises the pointer to Null. |
|
|
Destructor. Releases the pointer. |
|
|
Copy constructor. Simple pointer copy. They are both already identity unknowns. |
|
||||||||||
|
Constructor from Try Cast. Used for construction from any Interface pointer. Always QIs to guarantee this is the identity. |
|
|
Constructor from variant_t Try Cast. Used for construction from a variant. Always QIs to guarantee this is the identity. |
|
||||||||||
|
Constructor from Com Cast. Used for construction from any Interface pointer. Always QIs to guarantee this is the identity. |
|
|
Constructor from variant_t com_cast. Used for construction from a variant. Always QIs to guarantee this is the identity. |
|
|
Constructions of null pointer.
|
Member Function Documentation
|
|
Null comparison. Only comparison with a value of zero is allowed. Non-zero values will result in E_POINTER (wrapped in com_error) being thrown.
|
|
|
Null assignment. Only null is allowed as argument. Attempting to assign a non-zero value will result in E_POINTER (wrapped in com_error) being thrown.
|
|
||||||||||
|
Other assignment. Always QIs. Handles other assignments that have available constructors. |
|
|
Copy assignment. Don't QI as this is definitely identity already. |
|
|
Null comparison. Only comparison with a value of zero is allowed. Non-zero values will result in E_POINTER (wrapped in com_error) being thrown.
|
The documentation for this class was generated from the following file: