ACF $AcfVersion:0$
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
istd::TTransPtr< Type > Class Template Reference

Implementation of data transfer smart pointer. More...

#include <TTransPtr.h>

Inheritance diagram for istd::TTransPtr< Type >:
istd::TSmartPtr< QTranslator > istd::TSmartPtr< iview::CScreenTransform > istd::TSmartPtr< Type >

Public Member Functions

bool IsValid () const
 Check, whether the object is in valid state.
 
const Type * GetPtr () const
 Get access to pointed object.
 
Type * GetPtr ()
 Get access to pointed object.
 
void Reset ()
 Set this pointer to NULL.
 
void Swap (TTransPtr &pointer)
 Swap two pointers.
 
template<class CastedType >
CastedType Cast () const
 
Type & operator* () const
 Copy operator overtaking the pointer.
 
Type * operator-> () const
 

Public Attributes

QSharedPointer< Type > m_impl
 

Protected Member Functions

 TTransPtr ()
 

Detailed Description

template<class Type>
class istd::TTransPtr< Type >

Implementation of data transfer smart pointer.

It should be used to pointer transfer only, not to store the pointers becouse it overtakes the pointer. Typically it is used as smart pointer return parameters. The adventage against 'normal' smart pointer (istd::TSmartPtr) is that the copy constructor is faster, because it overtakes the pointer.

See also
istd::TSmartPtr

Definition at line 21 of file TTransPtr.h.

Constructor & Destructor Documentation

◆ TTransPtr()

template<class Type >
istd::TTransPtr< Type >::TTransPtr ( )
inlineprotected

Definition at line 122 of file TTransPtr.h.

Member Function Documentation

◆ Cast()

template<class Type >
template<class CastedType >
CastedType istd::TTransPtr< Type >::Cast ( ) const
inline

Definition at line 50 of file TTransPtr.h.

References istd::TTransPtr< Type >::GetPtr().

◆ GetPtr() [1/2]

template<class Type >
Type * istd::TTransPtr< Type >::GetPtr ( )
inline

Get access to pointed object.

Definition at line 87 of file TTransPtr.h.

◆ GetPtr() [2/2]

template<class Type >
const Type * istd::TTransPtr< Type >::GetPtr ( ) const
inline

◆ IsValid()

template<class Type >
bool istd::TTransPtr< Type >::IsValid ( ) const
inline

Check, whether the object is in valid state.

Definition at line 73 of file TTransPtr.h.

References NULL.

Referenced by ibase::TFactorisableContainer< InterfaceClass >::AddElement(), and ibase::TFactorisableContainer< InterfaceClass >::InsertElement().

◆ operator*()

template<class Type >
Type & istd::TTransPtr< Type >::operator* ( ) const
inline

Copy operator overtaking the pointer.

Parameters
pointerpointer to overtake - warning: After this operation this pointer is invalid!

Definition at line 108 of file TTransPtr.h.

◆ operator->()

template<class Type >
Type * istd::TTransPtr< Type >::operator-> ( ) const
inline

Definition at line 115 of file TTransPtr.h.

◆ Reset()

template<class Type >
void istd::TTransPtr< Type >::Reset ( )
inline

Set this pointer to NULL.

Definition at line 94 of file TTransPtr.h.

◆ Swap()

template<class Type >
void istd::TTransPtr< Type >::Swap ( TTransPtr< Type > &  pointer)
inline

Swap two pointers.

Definition at line 101 of file TTransPtr.h.

Member Data Documentation

◆ m_impl

template<class Type >
QSharedPointer<Type> istd::TTransPtr< Type >::m_impl

Definition at line 63 of file TTransPtr.h.

Referenced by istd::TSmartPtr< Type >::TSmartPtr().


The documentation for this class was generated from the following file: