class DCOPObject

Provides an interface for receiving DCOP messages. More...

Definition#include <dcopobject.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

Provides an interface for receiving DCOP messages.

This class provides an interface for receiving DCOP messages. To use it, simply multiply-inherit from DCOPObject and from some other class, and then implement the DCOPObject::process() method. Because this method is pure virtual, you must implement the method.

 DCOPObject ()

Create a non valid DCOPObject

 DCOPObject (QObject *obj)

Create a DCOPObject and calculate the object id using QObject::name().

 DCOPObject (const QCString &objId)

Creates a valid DCOPObject.

DCOPObject ()

[virtual]

Destroys the DCOPObject and removes it from the map of known objects.

bool  process (const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)

[virtual]

Dispatch a message.

Usually you want to use an IDL compiler to automatically generate an implementation for this function.

If this function returns false, then processDynamic() is called.

Parameters:
funis the normalized function signature. Such a signature usually looks like foobar(QString,int). The return type, qualifiers like "const" etc. are not part of the signature.

bool  processDynamic (const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)

[virtual]

This function is of interest when you used an IDL compiler to generate the implementation for process() but you still want to dispatch some functions dynamically. Dynamically means that methods may appear and vanish during runtime.

Returns: false by default.

bool  hasObject (const QCString &objId)

[static]

DCOPObjectProxy

Returns: true if an obejct with the questionable objId is known in this process. This query does not ask proxies.

DCOPObjectfind (const QCString &objId)

[static]

This function does not query the DCOPObjectProxy.

Returns: the DCOPObject for the id objId.

QCString  objectName ( QObject* obj )

[static]

Creates an object id for the QObject obj. This is done using the QObject::name function.