 |
NAVTOR SDK
v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
|
|
Go to the documentation of this file. 1 #ifndef SDK_SDK_REF_PTR_H_
11 #define SDK_SDK_REF_PTR_H_
29 m_instance = lp.m_instance;
43 m_instance->Release();
47 operator T*()
const throw() {
return m_instance; }
48 T& operator*()
const throw() {
return *m_instance; }
49 T** operator&() throw() {
return &m_instance; }
50 T* operator->()
const throw() {
return m_instance; }
51 bool operator!()
const throw() {
return (NULL == m_instance); }
52 bool operator!=(T* p)
const throw() {
return !operator==(p); }
53 bool operator==(T* p)
const throw() {
return m_instance == p; }
56 AssignNewPtr(lp.m_instance);
67 return tmp->Release();
74 T*
Get()
const throw() {
return m_instance; }
95 m_instance->GetInterface(I::IID(),
reinterpret_cast<void**
>(&out));
102 inline void AssignNewPtr(T* p) {
103 if (p != m_instance) {
141 bool operator<(
const T& src)
const {
145 bool operator==(
const T& src)
const {
153 operator const T&()
const {
162 #endif // SDK_SDK_REF_PTR_H_
T * Detach()
Detaches the instance from the wrapper.
Definition: sdk_ref_ptr.h:85
T * Get() const
Return wrapped pointer.
Definition: sdk_ref_ptr.h:74
Synonym for SDKRefPtr.
Definition: sdk_ref_ptr.h:117
Class to adapt SDKStringHandler and SDKRefPtr for use with STL containers. The syntax to use it is st...
Definition: sdk_ref_ptr.h:123
A smart pointer class for managing SDK components interface pointers.
Definition: sdk_ref_ptr.h:23
SDKAtomicRefCount Release()
Releases the reference to the object.
Definition: sdk_ref_ptr.h:61
void Attach(T *p)
Attaches existing object to the wrapper.
Definition: sdk_ref_ptr.h:77