SourceForge.net Logo
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes

PythonQtMethodInfo Class Reference

stores information about a specific signal/slot/method More...

#include <PythonQtMethodInfo.h>

Inheritance diagram for PythonQtMethodInfo:
PythonQtSlotInfo

List of all members.

Classes

struct  ParameterInfo
 stores the QVariant id (if available) and the name of the type More...

Public Types

enum  ParameterType { Unknown = -1, Variant = -2 }

Public Member Functions

 PythonQtMethodInfo ()
 ~PythonQtMethodInfo ()
 PythonQtMethodInfo (const QMetaMethod &meta, PythonQtClassInfo *classInfo)
 PythonQtMethodInfo (const QByteArray &typeName, const QList< QByteArray > &args)
 PythonQtMethodInfo (const PythonQtMethodInfo &other)
int parameterCount () const
 returns the number of parameters including the return value
const QList< ParameterInfo > & parameters () const
 get the parameter infos

Static Public Member Functions

static const PythonQtMethodInfogetCachedMethodInfo (const QMetaMethod &method, PythonQtClassInfo *classInfo)
static const PythonQtMethodInfogetCachedMethodInfoFromArgumentList (int numArgs, const char **args)
 get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg
static void cleanupCachedMethodInfos ()
 cleanup the cache
static int nameToType (const char *name)
 returns the id for the given type (using an internal dictionary)
static void addParameterTypeAlias (const QByteArray &alias, const QByteArray &name)
 add an alias for a typename, e.g. QObjectList and QList<QObject*>.

Static Protected Member Functions

static void fillParameterInfo (ParameterInfo &type, const QByteArray &name, PythonQtClassInfo *classInfo)

Protected Attributes

QList< ParameterInfo_parameters

Static Protected Attributes

static QHash< QByteArray, int > _parameterTypeDict
static QHash< QByteArray,
QByteArray > 
_parameterNameAliases
static QHash< QByteArray,
PythonQtMethodInfo * > 
_cachedSignatures
 stores the cached signatures of methods to speedup mapping from Qt to Python types

Detailed Description

stores information about a specific signal/slot/method

Definition at line 57 of file PythonQtMethodInfo.h.


Member Enumeration Documentation

Enumerator:
Unknown 
Variant 

Definition at line 60 of file PythonQtMethodInfo.h.

                     {
    Unknown = -1,
    Variant = -2
  };


Constructor & Destructor Documentation

PythonQtMethodInfo::PythonQtMethodInfo (  )  [inline]

Definition at line 74 of file PythonQtMethodInfo.h.

{};

PythonQtMethodInfo::~PythonQtMethodInfo (  )  [inline]

Definition at line 75 of file PythonQtMethodInfo.h.

{};

PythonQtMethodInfo::PythonQtMethodInfo ( const QMetaMethod &  meta,
PythonQtClassInfo classInfo 
)
PythonQtMethodInfo::PythonQtMethodInfo ( const QByteArray &  typeName,
const QList< QByteArray > &  args 
)
PythonQtMethodInfo::PythonQtMethodInfo ( const PythonQtMethodInfo other  )  [inline]

Definition at line 78 of file PythonQtMethodInfo.h.

References _parameters.

                                                      {
    _parameters = other._parameters;
  }


Member Function Documentation

static void PythonQtMethodInfo::addParameterTypeAlias ( const QByteArray &  alias,
const QByteArray &  name 
) [static]

add an alias for a typename, e.g. QObjectList and QList<QObject*>.

static void PythonQtMethodInfo::cleanupCachedMethodInfos (  )  [static]

cleanup the cache

static void PythonQtMethodInfo::fillParameterInfo ( ParameterInfo type,
const QByteArray &  name,
PythonQtClassInfo classInfo 
) [static, protected]
static const PythonQtMethodInfo* PythonQtMethodInfo::getCachedMethodInfo ( const QMetaMethod &  method,
PythonQtClassInfo classInfo 
) [static]

returns the method info of the signature, uses a cache internally to speed up multiple requests for the same method, classInfo is passed to allow local enum resolution (if NULL is passed, no local enums are recognized)

Referenced by PythonQtSlotInfo::PythonQtSlotInfo().

static const PythonQtMethodInfo* PythonQtMethodInfo::getCachedMethodInfoFromArgumentList ( int  numArgs,
const char **  args 
) [static]

get the cached method info using the passed in list of return value and arguments, return value needs to be passed as first arg

static int PythonQtMethodInfo::nameToType ( const char *  name  )  [static]

returns the id for the given type (using an internal dictionary)

int PythonQtMethodInfo::parameterCount (  )  const [inline]

returns the number of parameters including the return value

Definition at line 93 of file PythonQtMethodInfo.h.

{ return _parameters.size(); };

const QList<ParameterInfo>& PythonQtMethodInfo::parameters (  )  const [inline]

get the parameter infos

Definition at line 99 of file PythonQtMethodInfo.h.

Referenced by PythonQtSlotInfo::PythonQtSlotInfo().

{ return _parameters; }


Member Data Documentation

QHash<QByteArray, PythonQtMethodInfo*> PythonQtMethodInfo::_cachedSignatures [static, protected]

stores the cached signatures of methods to speedup mapping from Qt to Python types

Definition at line 111 of file PythonQtMethodInfo.h.

QHash<QByteArray, QByteArray> PythonQtMethodInfo::_parameterNameAliases [static, protected]

Definition at line 108 of file PythonQtMethodInfo.h.

QHash<QByteArray, int> PythonQtMethodInfo::_parameterTypeDict [static, protected]

Definition at line 107 of file PythonQtMethodInfo.h.


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