interfaces.h File Reference

#include <qptrlist.h>
#include <qmap.h>
#include <kdebug.h>
#include <typeinfo>

Include dependency graph for interfaces.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Interface
class  InterfaceBase< thisIF, cmplIF >

Defines

#define INTERFACE(IF, cmplIF)
#define IF_CON_DESTRUCTOR(IF, n)
#define IF_QUERY_DEBUG
#define SENDERS   protected
#define RECEIVERS   public
#define IF_SENDER(decl)   virtual int decl const;
#define IF_SEND_MESSAGE(call)
#define IF_IMPL_SENDER(decl, call)
#define IF_RECEIVER(decl)   virtual bool decl = 0;
#define IF_RECEIVER_EMPTY(decl)   virtual bool decl { return false; }
#define ANSWERS   public
#define QUERIES   protected
#define IF_QUERY(decl)   virtual decl const;
#define IF_SEND_QUERY(call, default)
#define IF_IMPL_QUERY(decl, call, default)
#define IF_ANSWER(decl)   virtual decl = 0;
#define IF_SENDER_FINE(name, param)
#define IF_SEND_MESSAGE_FINE(name, params, call)
#define IF_IMPL_SENDER_FINE(class, name, param, call)


Define Documentation

#define ANSWERS   public

Definition at line 456 of file interfaces.h.

Referenced by INTERFACE().

#define IF_ANSWER ( decl   )     virtual decl = 0;

Definition at line 476 of file interfaces.h.

Referenced by INTERFACE().

#define IF_CON_DESTRUCTOR ( IF,
 ) 

Value:

IF() : BaseClass((n)) {} \
    virtual ~IF() { }

Definition at line 406 of file interfaces.h.

Referenced by INTERFACE().

#define IF_IMPL_QUERY ( decl,
call,
default   ) 

Value:

decl const { \
            IF_SEND_QUERY(call, default) \
        }

Definition at line 471 of file interfaces.h.

#define IF_IMPL_SENDER ( decl,
call   ) 

Value:

int decl const \
        { \
            IF_SEND_MESSAGE(call) \
        }

Definition at line 442 of file interfaces.h.

#define IF_IMPL_SENDER_FINE ( class,
name,
param,
call   ) 

Value:

int class::name param const { \
        IF_SEND_MESSAGE_FINE(name, param, call) \
    } \
    \
    bool class::register4_##name(cmplInterface *i) {   \
        return addListener(i, m_Listeners_##name); \
    } \
    void class::unregister4_##name(cmplInterface *i) {   \
        m_Listeners_##name.remove(i);             \
    }

Definition at line 504 of file interfaces.h.

#define IF_QUERY ( decl   )     virtual decl const;

Definition at line 459 of file interfaces.h.

Referenced by INTERFACE().

#define IF_QUERY_DEBUG

Definition at line 422 of file interfaces.h.

#define IF_RECEIVER ( decl   )     virtual bool decl = 0;

Definition at line 448 of file interfaces.h.

Referenced by INTERFACE().

#define IF_RECEIVER_EMPTY ( decl   )     virtual bool decl { return false; }

Definition at line 451 of file interfaces.h.

Referenced by INTERFACE().

#define IF_SEND_MESSAGE ( call   ) 

Value:

int ____n = 0; \
        for (IFIterator i(iConnections); i.current(); ++i) {   \
            if (i.current()->call ) ++____n; \
        }  \
        return ____n;

Definition at line 435 of file interfaces.h.

#define IF_SEND_MESSAGE_FINE ( name,
params,
call   ) 

Value:

int ____n = 0; \
        for (QPtrListIterator<cmplInterface> ____it(m_Listeners_##name); ____it.current(); ++____it) {   \
            if (____it.current()->call ) ++____n; \
        }  \
        return ____n;

Definition at line 497 of file interfaces.h.

#define IF_SEND_QUERY ( call,
default   ) 

Value:

cmplInterface *o = IFIterator(iConnections).current(); \
        if (o) { \
            IF_QUERY_DEBUG \
            return o->call; \
        } else { \
            return default; \
        } \

Definition at line 462 of file interfaces.h.

#define IF_SENDER ( decl   )     virtual int decl const;

Definition at line 432 of file interfaces.h.

Referenced by INTERFACE().

#define IF_SENDER_FINE ( name,
param   ) 

Value:

protected: \
    int  name param const; \
public: \
    bool register4_##name  (cmplInterface *); \
    void unregister4_##name(cmplInterface *); \
private: \
    QPtrList<cmplInterface> m_Listeners_##name;\

Definition at line 487 of file interfaces.h.

Referenced by INTERFACE().

#define INTERFACE ( IF,
cmplIF   ) 

Value:

class IF; \
    class cmplIF; \
    class IF : public InterfaceBase<IF, cmplIF> \

Definition at line 401 of file interfaces.h.

#define QUERIES   protected

Definition at line 457 of file interfaces.h.

Referenced by INTERFACE().

#define RECEIVERS   public

Definition at line 430 of file interfaces.h.

Referenced by INTERFACE().

#define SENDERS   protected

Definition at line 429 of file interfaces.h.

Referenced by INTERFACE().


Generated on Fri Jan 28 16:42:17 2011 for kradio by  doxygen 1.4.7