Diana Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QHandle< T > Class Template Reference

abstract class for QEvent handlers More...

Inheritance diagram for QHandle< T >:
ReadHandle< T > WriteHandle< T >

Public Member Functions

virtual bool Exists () const
 Check object validity. More...
 
virtual bool IsValid () const
 Check object validity. More...
 
const char * GetObjectName () const
 get object name More...
 
const char * GetObjectOwner () const
 get object owner More...
 
std::string GetObjectType () const
 get object type More...
 
void Set (QObject **address, const char *owner)
 set object address (owned by the caller) and owner More...
 
virtual ~QHandle ()
 destructor More...
 

Protected Member Functions

 QHandle (const char *objectName)
 ctor More...
 
void ThrowError () const
 
QObject ** BaseGetAddress ()
 
 QHandle (const QHandle &)
 
const QHandleoperator= (const QHandle &)
 

Protected Attributes

const char * fObjectName
 
const char * fOwner
 
T * fObject
 
QObject ** fAddress
 

Detailed Description

template<class T>
class QHandle< T >

abstract class for QEvent handlers

Author
Marco Vignati

QHandle is the abstract class for accessing QEvent QObject's in read (ReadHandle) and write (WriteHandle) mode. Each handle corresponds to a single QObject, and attempts to use the same handle for different QObject's will throw an exception.

Definition at line 26 of file QHandle.hh.

Constructor & Destructor Documentation

◆ ~QHandle()

template<class T >
virtual QHandle< T >::~QHandle ( )
inlinevirtual

destructor

Definition at line 63 of file QHandle.hh.

◆ QHandle() [1/2]

template<class T >
QHandle< T >::QHandle ( const char *  objectName)
inlineprotected

ctor

Definition at line 68 of file QHandle.hh.

References QHandle< T >::fObjectName, and QHandle< T >::fOwner.

◆ QHandle() [2/2]

template<class T >
QHandle< T >::QHandle ( const QHandle< T > &  )
inlineprotected

Definition at line 105 of file QHandle.hh.

Member Function Documentation

◆ BaseGetAddress()

template<class T >
QObject** QHandle< T >::BaseGetAddress ( )
inlineprotected

Definition at line 95 of file QHandle.hh.

References QHandle< T >::fAddress.

Referenced by WriteHandle< T >::GetAddress().

◆ Exists()

template<class T >
virtual bool QHandle< T >::Exists ( ) const
inlinevirtual

Check object validity.

Definition at line 31 of file QHandle.hh.

References QHandle< T >::fObject.

Referenced by WriteHandle< T >::Get(), QHandle< T >::IsValid(), QEvent::RequireByLabel(), and QHandle< T >::ThrowError().

◆ GetObjectName()

template<class T >
const char* QHandle< T >::GetObjectName ( ) const
inline

get object name

Definition at line 37 of file QHandle.hh.

References QHandle< T >::fObjectName.

Referenced by QEvent::Add(), and QEvent::Get().

◆ GetObjectOwner()

template<class T >
const char* QHandle< T >::GetObjectOwner ( ) const
inline

get object owner

Definition at line 40 of file QHandle.hh.

References QHandle< T >::fOwner.

◆ GetObjectType()

template<class T >
std::string QHandle< T >::GetObjectType ( ) const
inline

get object type

Definition at line 43 of file QHandle.hh.

References Demangle(), and QHandle< T >::fObject.

Referenced by WriteHandle< T >::Get(), QEvent::RequireByLabel(), QHandle< T >::Set(), and QHandle< T >::ThrowError().

◆ IsValid()

template<class T >
virtual bool QHandle< T >::IsValid ( ) const
inlinevirtual

◆ operator=()

template<class T >
const QHandle& QHandle< T >::operator= ( const QHandle< T > &  )
inlineprotected

Definition at line 106 of file QHandle.hh.

◆ Set()

template<class T >
void QHandle< T >::Set ( QObject **  address,
const char *  owner 
)
inline

set object address (owned by the caller) and owner

Definition at line 46 of file QHandle.hh.

References QHandle< T >::fAddress, QHandle< T >::fObject, QHandle< T >::fOwner, QHandle< T >::GetObjectType(), and QERR_EVENT_HANDLE.

Referenced by QEvent::Add(), WriteHandle< T >::CreateObject(), QEvent::Get(), and QEvent::GetByLabel().

◆ ThrowError()

template<class T >
void QHandle< T >::ThrowError ( ) const
inlineprotected

Member Data Documentation

◆ fAddress

template<class T >
QObject** QHandle< T >::fAddress
protected

Definition at line 103 of file QHandle.hh.

Referenced by QHandle< T >::BaseGetAddress(), and QHandle< T >::Set().

◆ fObject

template<class T >
T* QHandle< T >::fObject
protected

◆ fObjectName

template<class T >
const char* QHandle< T >::fObjectName
protected

◆ fOwner

template<class T >
const char* QHandle< T >::fOwner
protected

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