Home

QtCorba Class Reference

The QtCorba class integrates the Qt and CORBA event loops. More...

#include <QtCorba>

Public Types

Public Functions

Protected Functions


Detailed Description

The QtCorba class integrates the Qt and CORBA event loops.

For an overview of the QtCorba framework, see overview.html.

The QtCorba base class does nothing on its own. You must either use one of the example subclasses: QtCorbaTAO (for ACE/TAO) or QtCorbaMico (for Mico), or create your own QtCorba subclass.

If you implement your own QtCorba subclass you must reimplement corbaWorkPending() and corbaPerformWork() to call your ORB's appropriate work_pending() and perform_work() functions.

The default QtCorba implementation calls corbaPerformWork() periodically; how often is controlled by the setPollingInterval() function.

If you want to call corbaPerformWork() in a different way, for example by the use of a QSocketNotifier, you will need to reimplement the init() function: See the QtCorbaTAO class for an example of this approach.


Member Type Documentation

enum QtCorba::Type

This enumerated type is used by QtCorba to determine whether it should act as a server or as a client.

ConstantValueDescription
QtCorba::CorbaServer0The QtCorba object should act as a server.
QtCorba::CorbaClient1The QtCorba object should act as a client.

See also init().


Member Function Documentation

QtCorba::QtCorba ( Type typ )

Constructs a QtCorba instance with a type of typ.

QtCorba::~QtCorba ()   [virtual]

Releases all resources used by the QtCorba instance.

void QtCorba::corbaPerformWork ()   [pure virtual protected]

Call this function to allow the CORBA event loop to do its magic. You will normally not have to call this function in a program that uses QtCorba.

Do make sure to reimplement this function to call CORBA::ORB_var::perform_work() when creating your own QtCorba subclass.

See also corbaWorkPending().

bool QtCorba::corbaWorkPending ()   [pure virtual protected]

Call this function to check if there are any pending events waiting to be processed by the CORBA event loop. You should call corbaPerformWork() if this function returns TRUE. You will normally not have to call this function in a program that uses QtCorba.

Do make sure to reimplement this function to call CORBA::ORB_var::perform_work() when creating your own QtCorba subclass.

See also corbaPerformWork().

void QtCorba::init ()   [virtual protected]

This function is called by the Qt event loop after the QtCorba object has been created. The default implementation (if the QtCorba instance acts as a Server) starts a QTimer that periodically calls corbaWorkPending() and corbaPerformWork().

See also corbaWorkPending(), corbaPerformWork(), and setPollingInterval().

int QtCorba::pollingInterval () const

Returns the polling interval used by the default implementation of init() when the instance acts as a Server.

See also setPollingInterval() and init().

void QtCorba::setPollingInterval ( int interval )

Sets the polling interval used by the timer that calls corbaPerformWork(). Passing -1 as interval will stop the polling.

See also pollingInterval(), corbaWorkPending(), corbaPerformWork(), and init().

Type QtCorba::type () const

Returns the Type passed to the QtCorba constructor.


Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions