kexi

KoMacro::MetaMethod Class Reference

#include <metamethod.h>

Public Types

enum  Type { Signal , Slot , Unknown }

Public Member Functions

 MetaMethod (const TQString &signature, Type type=Unknown, TDESharedPtr< MetaObject > object=0)
 ~MetaMethod ()
TDESharedPtr< MetaObject > const object () const
const TQString signature () const
const TQString signatureTag () const
const TQString signatureArguments () const
Type type () const
TQValueList< TDESharedPtr< MetaParameter > > arguments () const
TQUObject * toTQUObject (TQValueList< TDESharedPtr< Variable > > arguments)
TDESharedPtr< Variable > toVariable (TQUObject *uo)
TQValueList< TDESharedPtr< Variable > > toVariableList (TQUObject *uo)
TDESharedPtr< Variable > invoke (TQValueList< TDESharedPtr< Variable > > arguments)

Detailed Description

Class to provide abstract methods for the undocumented TQt3 TQUObject-API functionality.

The design tried to limit future porting to TQt4 by providing a somewhat similar API to the TQt4 TQMeta* stuff.

Definition at line 46 of file metamethod.h.

Member Enumeration Documentation

◆ Type

The type of method this MetaMethod provides access to.

Enumerator
Slot 

The MetaMethod points to a TQt signal.

Unknown 

The MetaMethod points to a TQt slot.

The MetaMethod is not known.

Definition at line 54 of file metamethod.h.

Constructor & Destructor Documentation

◆ MetaMethod()

MetaMethod::MetaMethod ( const TQString & signature,
Type type = Unknown,
TDESharedPtr< MetaObject > object = 0 )
explicit

Constructor.

Parameters
signatureThe signature this MetaMethod has. This includes the tagname and the arguments and could look like "myslot(const TQString&, int)".
typeThe MetaMethod::Type the MethodMethod has.
objectThe MetaObject this MethodMethod belongs to. Each MethodMethod is associated with exactly one MetaObject .

Definition at line 84 of file metamethod.cpp.

◆ ~MetaMethod()

MetaMethod::~MetaMethod ( )

Destructor.

Definition at line 133 of file metamethod.cpp.

Member Function Documentation

◆ arguments()

MetaParameter::List MetaMethod::arguments ( ) const
Returns
the signature arguments as parsed list of MetaParameter instances.

Definition at line 163 of file metamethod.cpp.

◆ invoke()

TDESharedPtr< Variable > MetaMethod::invoke ( TQValueList< TDESharedPtr< Variable > > arguments)

Invoke the MetaMethod with the optional arguments arguments and return a variable.

Definition at line 306 of file metamethod.cpp.

◆ object()

TDESharedPtr< MetaObject > const MetaMethod::object ( ) const
Returns
the MetaObject instance this MethodMethod belongs to.

Definition at line 138 of file metamethod.cpp.

◆ signature()

const TQString MetaMethod::signature ( ) const
Returns
the signature this MetaMethod has. It could be something like "mySlot(const TQString&,int)".

Definition at line 143 of file metamethod.cpp.

◆ signatureArguments()

const TQString MetaMethod::signatureArguments ( ) const
Returns
the signatures arguments this MetaMethod has. At the signature "mySlot(const TQString&,int)" the arguments are "const TQString&,int".

Definition at line 153 of file metamethod.cpp.

◆ signatureTag()

const TQString MetaMethod::signatureTag ( ) const
Returns
the signatures tagname this MetaMethod has. At the signature "mySlot(const TQString&,int)" the tagname would be "mySlot".

Definition at line 148 of file metamethod.cpp.

◆ toTQUObject()

TQUObject * MetaMethod::toTQUObject ( TQValueList< TDESharedPtr< Variable > > arguments)

Translate the passed arguments list of Variable instances into a TQt3 TQUObject* array.

Definition at line 168 of file metamethod.cpp.

◆ toVariable()

TDESharedPtr< Variable > MetaMethod::toVariable ( TQUObject * uo)

Translate the passed uo TQUObject reference into an internal used Variable instances.

Definition at line 257 of file metamethod.cpp.

◆ toVariableList()

Variable::List MetaMethod::toVariableList ( TQUObject * uo)

Translate the passed uo TQUObject array into an internal used list of Variable instances.

Definition at line 293 of file metamethod.cpp.

◆ type()

MetaMethod::Type MetaMethod::type ( ) const
Returns
the Type of method this MetaMethod provides access to.

Definition at line 158 of file metamethod.cpp.


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