Qt 4.8
Public Functions | Properties | Friends | List of all members
QAxMetaObject Struct Reference
Inheritance diagram for QAxMetaObject:
QMetaObject

Public Functions

DISPID dispIDofName (const QByteArray &name, IDispatch *disp)
 
int numParameter (const QByteArray &prototype)
 
QByteArray paramType (const QByteArray &signature, int index, bool *out=0)
 
void parsePrototype (const QByteArray &prototype)
 
QByteArray propertyType (const QByteArray &propertyName)
 
 QAxMetaObject ()
 
 ~QAxMetaObject ()
 
- Public Functions inherited from QMetaObject
QObjectcast (QObject *obj) const
 Returns obj if object obj inherits from this meta-object; otherwise returns 0. More...
 
const QObjectcast (const QObject *obj) const
 Returns obj if object obj inherits from this meta-object; otherwise returns 0. More...
 
QMetaClassInfo classInfo (int index) const
 Returns the meta-data for the item of class information with the given index. More...
 
int classInfoCount () const
 Returns the number of items of class information in this class. More...
 
int classInfoOffset () const
 Returns the class information offset for this class; i.e. More...
 
const char * className () const
 Returns the class name. More...
 
QMetaMethod constructor (int index) const
 Returns the meta-data for the constructor with the given index. More...
 
int constructorCount () const
 Returns the number of constructors in this class. More...
 
QMetaEnum enumerator (int index) const
 Returns the meta-data for the enumerator with the given index. More...
 
int enumeratorCount () const
 Returns the number of enumerators in this class. More...
 
int enumeratorOffset () const
 Returns the enumerator offset for this class; i.e. More...
 
int indexOfClassInfo (const char *name) const
 Finds class information item name and returns its index; otherwise returns -1. More...
 
int indexOfConstructor (const char *constructor) const
 Finds constructor and returns its index; otherwise returns -1. More...
 
int indexOfEnumerator (const char *name) const
 Finds enumerator name and returns its index; otherwise returns -1. More...
 
int indexOfMethod (const char *method) const
 Finds method and returns its index; otherwise returns -1. More...
 
int indexOfProperty (const char *name) const
 Finds property name and returns its index; otherwise returns -1. More...
 
int indexOfSignal (const char *signal) const
 Finds signal and returns its index; otherwise returns -1. More...
 
int indexOfSlot (const char *slot) const
 Finds slot and returns its index; otherwise returns -1. More...
 
QMetaMethod method (int index) const
 Returns the meta-data for the method with the given index. More...
 
int methodCount () const
 Returns the number of methods known to the meta-object system in this class, including the number of properties provided by each base class. More...
 
int methodOffset () const
 Returns the method offset for this class; i.e. More...
 
QObjectnewInstance (QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument()) const
 Constructs a new instance of this class. More...
 
QMetaProperty property (int index) const
 Returns the meta-data for the property with the given index. More...
 
int propertyCount () const
 Returns the number of properties in this class, including the number of properties provided by each base class. More...
 
int propertyOffset () const
 Returns the property offset for this class; i.e. More...
 
int static_metacall (Call, int, void **) const
 
const QMetaObjectsuperClass () const
 Returns the meta-object of the superclass, or 0 if there is no such object. More...
 
QString tr (const char *s, const char *c) const
 
QString tr (const char *s, const char *c, int n) const
 
QString trUtf8 (const char *s, const char *c) const
 
QString trUtf8 (const char *s, const char *c, int n) const
 
QMetaProperty userProperty () const
 Returns the property that has the USER flag set to true. More...
 

Properties

QList< QUuidconnectionInterfaces
 
QHash< QByteArray, DISPID > dispIDs
 
QHash< QByteArray, QList< QByteArray > > memberInfo
 
QMap< QUuid, QMap< DISPID, QByteArray > > props
 
QMap< QUuid, QMap< DISPID, QByteArray > > propsigs
 
QMap< QByteArray, QByteArrayrealPrototype
 
QMap< QUuid, QMap< DISPID, QByteArray > > sigs
 

Friends

class MetaObjectGenerator
 

Additional Inherited Members

- Public Types inherited from QMetaObject
enum  Call {
  InvokeMetaMethod, ReadProperty, WriteProperty, ResetProperty,
  QueryPropertyDesignable, QueryPropertyScriptable, QueryPropertyStored, QueryPropertyEditable,
  QueryPropertyUser, CreateInstance
}
 
- Static Public Functions inherited from QMetaObject
static void activate (QObject *sender, int signal_index, void **argv)
 
static void activate (QObject *sender, int from_signal_index, int to_signal_index, void **argv)
 
static void activate (QObject *sender, const QMetaObject *, int local_signal_index, void **argv)
 
static void activate (QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv)
 
static void addGuard (QObject **ptr)
 
static void changeGuard (QObject **ptr, QObject *o)
 
static bool checkConnectArgs (const char *signal, const char *method)
 Returns true if the signal and method arguments are compatible; otherwise returns false. More...
 
static bool connect (const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type=0, int *types=0)
 
static void connectSlotsByName (QObject *o)
 Searches recursively for all child objects of the given object, and connects matching signals from them to slots of object that follow the following form: More...
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, int method_index)
 
static bool disconnectOne (const QObject *sender, int signal_index, const QObject *receiver, int method_index)
 
static bool invokeMethod (QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 Invokes the member (a signal or a slot name) on the object obj. More...
 
static bool invokeMethod (QObject *obj, const char *member, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static bool invokeMethod (QObject *obj, const char *member, Qt::ConnectionType type, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static bool invokeMethod (QObject *obj, const char *member, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static int metacall (QObject *, Call, int, void **)
 
static QByteArray normalizedSignature (const char *method)
 Normalizes the signature of the given method. More...
 
static QByteArray normalizedType (const char *type)
 Normalizes a type. More...
 
static void removeGuard (QObject **ptr)
 
- Public Variables inherited from QMetaObject
struct {
   const uint *   data
 
   const void *   extradata
 
   const char *   stringdata
 
   const QMetaObject *   superdata
 
d
 

Detailed Description

Definition at line 77 of file qaxbase.cpp.

Constructors and Destructors

◆ QAxMetaObject()

QAxMetaObject::QAxMetaObject ( )
inline

Definition at line 79 of file qaxbase.cpp.

Referenced by QAxBasePrivate::metaObject().

80  {
81  d.data = 0;
82  d.stringdata = 0;
83  }
struct QMetaObject::@38 d

◆ ~QAxMetaObject()

QAxMetaObject::~QAxMetaObject ( )
inline

Definition at line 84 of file qaxbase.cpp.

85  {
86  delete [] (int*)d.data;
87  delete [] (char*)d.stringdata;
88  }
struct QMetaObject::@38 d

Functions

◆ dispIDofName()

DISPID QAxMetaObject::dispIDofName ( const QByteArray name,
IDispatch *  disp 
)
inline

Definition at line 168 of file qaxbase.cpp.

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

169 {
170  DISPID dispid = dispIDs.value(name, DISPID_UNKNOWN);
171  if (dispid == DISPID_UNKNOWN) {
172  // get the Dispatch ID from the object
173  QString unicodeName = QLatin1String(name);
174  OLECHAR *names = (wchar_t*)unicodeName.utf16();
175  disp->GetIDsOfNames(IID_NULL, &names, 1, LOCALE_USER_DEFAULT, &dispid);
176  if (dispid != DISPID_UNKNOWN)
177  dispIDs.insert(name, dispid);
178  }
179  return dispid;
180 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
QHash< QByteArray, DISPID > dispIDs
Definition: qaxbase.cpp:112
const ushort * utf16() const
Returns the QString as a &#39;\0\&#39;-terminated array of unsigned shorts.
Definition: qstring.cpp:5290

◆ numParameter()

int QAxMetaObject::numParameter ( const QByteArray prototype)

Definition at line 134 of file qaxbase.cpp.

Referenced by QAxBase::dynamicCallHelper(), QAxBase::internalInvoke(), QAxEventSink::Invoke(), and ~QAxMetaObject().

135 {
136  if (!memberInfo.contains(prototype))
137  parsePrototype(prototype);
138 
139  return memberInfo.value(prototype).count();
140 }
QHash< QByteArray, QList< QByteArray > > memberInfo
Definition: qaxbase.cpp:108
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
void parsePrototype(const QByteArray &prototype)
Definition: qaxbase.cpp:115

◆ paramType()

QByteArray QAxMetaObject::paramType ( const QByteArray signature,
int  index,
bool *  out = 0 
)

Definition at line 142 of file qaxbase.cpp.

Referenced by QAxBase::dynamicCallHelper(), QAxBase::internalInvoke(), QAxEventSink::Invoke(), and ~QAxMetaObject().

143 {
146 
147  if (out)
148  *out = false;
149 
151  if (index > plist.count() - 1)
152  return QByteArray();
153 
154  QByteArray param(plist.at(index));
155  if (param.isEmpty())
156  return QByteArray();
157 
158  bool byRef = param.endsWith('&') || param.endsWith("**");
159  if (byRef) {
160  param.truncate(param.length() - 1);
161  if (out)
162  *out = true;
163  }
164 
165  return param;
166 }
QHash< QByteArray, QList< QByteArray > > memberInfo
Definition: qaxbase.cpp:108
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
static QByteArray prototype(const QList< QByteArray > &parameterTypes, const QList< QByteArray > &parameterNames, bool *ok)
Definition: qaxserver.cpp:685
void parsePrototype(const QByteArray &prototype)
Definition: qaxbase.cpp:115
quint16 index
bool endsWith(const QByteArray &a) const
Returns true if this byte array ends with byte array ba; otherwise returns false. ...

◆ parsePrototype()

void QAxMetaObject::parsePrototype ( const QByteArray prototype)

Definition at line 115 of file qaxbase.cpp.

Referenced by numParameter(), paramType(), and ~QAxMetaObject().

116 {
117  QByteArray realProto = realPrototype.value(prototype, prototype);
118  QByteArray parameters = realProto.mid(realProto.indexOf('(') + 1);
119  parameters.truncate(parameters.length() - 1);
120 
121  if (parameters.isEmpty()) {
122  memberInfo.insert(prototype, QList<QByteArray>());
123  } else {
124  QList<QByteArray> plist = parameters.split(',');
125  memberInfo.insert(prototype, plist);
126  }
127 }
QHash< QByteArray, QList< QByteArray > > memberInfo
Definition: qaxbase.cpp:108
QMap< QByteArray, QByteArray > realPrototype
Definition: qaxbase.cpp:109
void truncate(int pos)
Truncates the byte array at index position pos.
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
int indexOf(char c, int from=0) const
Returns the index position of the first occurrence of the character ch in the byte array...
int length() const
Same as size().
Definition: qbytearray.h:356
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays...
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421

◆ propertyType()

QByteArray QAxMetaObject::propertyType ( const QByteArray propertyName)
inline

Definition at line 129 of file qaxbase.cpp.

Referenced by MetaObjectGenerator::addProperty(), QAxBase::internalProperty(), and ~QAxMetaObject().

130 {
131  return realPrototype.value(propertyName);
132 }
QMap< QByteArray, QByteArray > realPrototype
Definition: qaxbase.cpp:109
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499

Friends and Related Functions

◆ MetaObjectGenerator

friend class MetaObjectGenerator
friend

Definition at line 97 of file qaxbase.cpp.

Properties

◆ connectionInterfaces

QList<QUuid> QAxMetaObject::connectionInterfaces
private

Definition at line 99 of file qaxbase.cpp.

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

◆ dispIDs

QHash<QByteArray, DISPID> QAxMetaObject::dispIDs
private

Definition at line 112 of file qaxbase.cpp.

Referenced by dispIDofName().

◆ memberInfo

QHash<QByteArray, QList<QByteArray> > QAxMetaObject::memberInfo
private

Definition at line 108 of file qaxbase.cpp.

Referenced by numParameter(), paramType(), and parsePrototype().

◆ props

QMap< QUuid, QMap<DISPID, QByteArray> > QAxMetaObject::props
private

◆ propsigs

QMap< QUuid, QMap<DISPID, QByteArray> > QAxMetaObject::propsigs
private

◆ realPrototype

QMap<QByteArray, QByteArray> QAxMetaObject::realPrototype
private

Definition at line 109 of file qaxbase.cpp.

Referenced by MetaObjectGenerator::metaObject(), parsePrototype(), and propertyType().

◆ sigs

QMap< QUuid, QMap<DISPID, QByteArray> > QAxMetaObject::sigs
private

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