Qt 4.8
Public Functions | Public Variables | List of all members
QAxBasePrivate Class Reference

Public Functions

IDispatch * dispatch () const
 
QAxMetaObjectmetaObject ()
 
 QAxBasePrivate ()
 
 ~QAxBasePrivate ()
 

Public Variables

uint cachedMetaObject:1
 
QString ctrl
 
IDispatch * disp
 
QHash< QUuid, QAxEventSink * > eventSink
 
uint initialized:1
 
QAxMetaObjectmetaobj
 
QMap< QByteArray, bool > propWritable
 
IUnknown * ptr
 
uint tryCache:1
 
uint useClassInfo:1
 
uint useEventSink:1
 
uint useMetaObject:1
 
QMap< QString, LONG > verbs
 

Detailed Description

Definition at line 549 of file qaxbase.cpp.

Constructors and Destructors

◆ QAxBasePrivate()

QAxBasePrivate::QAxBasePrivate ( )
inline

Definition at line 552 of file qaxbase.cpp.

553  : useEventSink(true), useMetaObject(true), useClassInfo(true),
554  cachedMetaObject(false), initialized(false), tryCache(false),
555  ptr(0), disp(0), metaobj(0)
556  {
557  // protect initialization
558  QMutexLocker locker(&cache_mutex);
559  mo_cache_ref++;
560 
561  qRegisterMetaType<IUnknown*>("IUnknown*", &ptr);
562  qRegisterMetaType<IDispatch*>("IDispatch*", &disp);
563  }
IUnknown * ptr
Definition: qaxbase.cpp:600
QAxMetaObject * metaobj
Definition: qaxbase.cpp:614
static int mo_cache_ref
Definition: qaxbase.cpp:185
uint cachedMetaObject
Definition: qaxbase.cpp:596
uint useEventSink
Definition: qaxbase.cpp:593
uint useClassInfo
Definition: qaxbase.cpp:595
static QMutex cache_mutex
Definition: qaxbase.cpp:186
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
Definition: qmutex.h:101
uint initialized
Definition: qaxbase.cpp:597
IDispatch * disp
Definition: qaxbase.cpp:601
uint useMetaObject
Definition: qaxbase.cpp:594

◆ ~QAxBasePrivate()

QAxBasePrivate::~QAxBasePrivate ( )
inline

Definition at line 565 of file qaxbase.cpp.

566  {
567  Q_ASSERT(!ptr);
568  Q_ASSERT(!disp);
569 
570  // protect cleanup
571  QMutexLocker locker(&cache_mutex);
572  if (!--mo_cache_ref) {
574  mo_cache.clear();
575  }
576 
577  CoFreeUnusedLibraries();
578  }
static QHash< QString, QAxMetaObject * > mo_cache
Definition: qaxbase.cpp:183
IUnknown * ptr
Definition: qaxbase.cpp:600
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static int mo_cache_ref
Definition: qaxbase.cpp:185
static QMutex cache_mutex
Definition: qaxbase.cpp:186
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
Definition: qmutex.h:101
IDispatch * disp
Definition: qaxbase.cpp:601
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
Definition: qalgorithms.h:319

Functions

◆ dispatch()

IDispatch* QAxBasePrivate::dispatch ( ) const
inline

Definition at line 580 of file qaxbase.cpp.

Referenced by QAxBase::asVariant(), QAxBase::connectNotify(), QAxBase::dynamicCallHelper(), MetaObjectGenerator::init(), QAxBase::internalInvoke(), and QAxBase::internalProperty().

581  {
582  if (disp)
583  return disp;
584 
585  if (ptr)
586  ptr->QueryInterface(IID_IDispatch, (void**)&disp);
587  return disp;
588  }
IUnknown * ptr
Definition: qaxbase.cpp:600
IDispatch * disp
Definition: qaxbase.cpp:601

◆ metaObject()

QAxMetaObject* QAxBasePrivate::metaObject ( )
inline

Definition at line 605 of file qaxbase.cpp.

Referenced by QAxBase::dynamicCallHelper(), QAxBase::internalInvoke(), and QAxBase::internalProperty().

606  {
607  if (!metaobj)
608  metaobj = new QAxMetaObject;
609  return metaobj;
610  }
QAxMetaObject * metaobj
Definition: qaxbase.cpp:614

Properties

◆ cachedMetaObject

uint QAxBasePrivate::cachedMetaObject

Definition at line 596 of file qaxbase.cpp.

Referenced by MetaObjectGenerator::metaObject(), and MetaObjectGenerator::tryCache().

◆ ctrl

QString QAxBasePrivate::ctrl

Definition at line 590 of file qaxbase.cpp.

◆ disp

IDispatch* QAxBasePrivate::disp
mutable

Definition at line 601 of file qaxbase.cpp.

◆ eventSink

QHash<QUuid, QAxEventSink*> QAxBasePrivate::eventSink

◆ initialized

uint QAxBasePrivate::initialized

◆ metaobj

QAxMetaObject* QAxBasePrivate::metaobj

◆ propWritable

QMap<QByteArray, bool> QAxBasePrivate::propWritable

Definition at line 603 of file qaxbase.cpp.

Referenced by QAxBase::propertyWritable(), and QAxBase::setPropertyWritable().

◆ ptr

IUnknown* QAxBasePrivate::ptr

◆ tryCache

uint QAxBasePrivate::tryCache

◆ useClassInfo

uint QAxBasePrivate::useClassInfo

◆ useEventSink

uint QAxBasePrivate::useEventSink

◆ useMetaObject

uint QAxBasePrivate::useMetaObject

Definition at line 594 of file qaxbase.cpp.

Referenced by QAxBase::dynamicCallHelper(), and QAxBase::metaObject().

◆ verbs

QMap<QString, LONG> QAxBasePrivate::verbs
mutable

Definition at line 612 of file qaxbase.cpp.


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