All pastes #208359 Raw Edit

trueg

public cpp v1 · immutable
#208359 ·published 2006-10-18 15:42 UTC
rendered paste body
#define NEPOMUK_DBUS_REGISTER_SERVICE_TYPE(TYPE, INTERFACE) \template<> \struct ServicePublisherTypeInterfaceFactory< INTERFACE > : public Nepomuk::Backbone::ServicePublisherInterfaceFactory { \  Nepomuk::Backbone::DBus::ServicePublisherInterface* createInterface( Nepomuk::Backbone::ServicePublisher* s ) const { \    return new INTERFACE( s ); \  } \};namespace Nepomuk {  namespace Backbone {    class ServicePublisher;    namespace DBus {      class ServicePublisherInterface : public QDBusAdaptor	{	  Q_OBJECT	public:	  virtual ~ServicePublisherInterface();	  ServicePublisher* servicePublisher() const;	protected:	  ServicePublisherInterface( ServicePublisher* parent );	private:	  ServicePublisher* m_servicePublisher;	};      class ServicePublisherInterfaceFactory	{	public:	  virtual ~ServicePublisherInterfaceFactory() {}	  virtual ServicePublisherInterface* createInterface( ServicePublisher* s ) const = 0;	protected:	  ServicePublisherInterfaceFactory() {}	};      int registerServiceType( const QString& type, ServiceTypeInterfaceFactory* factory );    }  }}#endif