Commit ab6adee1 authored by Julien Wintz's avatar Julien Wintz
Browse files

More export rules.

parent 0af57348
......@@ -17,6 +17,7 @@
#include "dtkCorePluginManager"
#include "dtkCorePluginFactory"
#include "dtkCoreExport.h"
// ///////////////////////////////////////////////////////////////////
// DTK_DECLARE_OBJECT
......@@ -38,20 +39,20 @@
#define DTK_DECLARE_PLUGIN_INTERFACE(type) \
DTK_DECLARE_PLUGIN_INTERFACE_NAME_STRINGIFIED(DTK_DECLARE_PLUGIN_INTERFACE_NAME(type))
#define DTK_DECLARE_PLUGIN(type) \
class type##Plugin : public QObject \
{ \
Q_OBJECT \
\
public: \
type##Plugin(void) {} \
virtual ~type##Plugin(void) {} \
\
public: \
virtual void initialize(void) = 0; \
virtual void uninitialize(void) = 0; \
}; \
\
#define DTK_DECLARE_PLUGIN(type) \
class DTKCORE_EXPORT type##Plugin : public QObject \
{ \
Q_OBJECT \
\
public: \
type##Plugin(void) {} \
virtual ~type##Plugin(void) {} \
\
public: \
virtual void initialize(void) = 0; \
virtual void uninitialize(void) = 0; \
}; \
\
Q_DECLARE_INTERFACE(type##Plugin, DTK_DECLARE_PLUGIN_INTERFACE(type))
// ///////////////////////////////////////////////////////////////////
......@@ -59,7 +60,7 @@
// ///////////////////////////////////////////////////////////////////
#define DTK_DECLARE_PLUGIN_FACTORY(type) \
class type##PluginFactory : public dtkCorePluginFactory<type> {}; \
class DTKCORE_EXPORT type##PluginFactory : public dtkCorePluginFactory<type> {}; \
template <typename T> type *type##Creator() { return new T; };
// ///////////////////////////////////////////////////////////////////
......@@ -67,7 +68,7 @@
// ///////////////////////////////////////////////////////////////////
#define DTK_DECLARE_PLUGIN_MANAGER(type) \
class type##PluginManager : public dtkCorePluginManager<type##Plugin> {};
class DTKCORE_EXPORT type##PluginManager : public dtkCorePluginManager<type##Plugin> {};
// ///////////////////////////////////////////////////////////////////
// DTK_DEFINE_PLUGIN
......
// Version: $Id$
//
//
//
//
// Commentary:
//
//
// Commentary:
//
//
// Change Log:
//
//
//
//
// Code:
......@@ -17,12 +17,13 @@
#include "dtkDistributedArrayCache.h"
#include "dtkDistributedArrayData.h"
#include "dtkDistributedContainer.h"
#include "dtkDistributedExport.h"
// /////////////////////////////////////////////////////////////////
// dtkDistributedArray
// /////////////////////////////////////////////////////////////////
template<typename T> class dtkDistributedArray : public dtkDistributedContainer
template<typename T> class DTKDISTRIBUTED_EXPORT dtkDistributedArray : public dtkDistributedContainer
{
public:
dtkDistributedArray(const qlonglong& size, dtkDistributedWorker *worker);
......@@ -30,7 +31,7 @@ public:
dtkDistributedArray(const qlonglong& size, const T *array, dtkDistributedWorker *worker);
dtkDistributedArray(const dtkDistributedArray& other);
~dtkDistributedArray(void);
private:
void initialize(void);
......@@ -83,5 +84,5 @@ private:
#include "dtkDistributedArray.tpp"
//
//
// dtkDistributedArray.h ends here
......@@ -15,11 +15,13 @@
#pragma once
#include "dtkDistributedExport.h"
#include <QtCore>
class dtkDistributedCommunicatorStatusPrivate;
class dtkDistributedCommunicatorStatus
class DTKDISTRIBUTED_EXPORT dtkDistributedCommunicatorStatus
{
public:
......@@ -45,5 +47,3 @@ public:
private:
dtkDistributedCommunicatorStatusPrivate *d;
};
// Version: $Id$
//
//
//
//
// Commentary:
//
//
// Commentary:
//
//
// Change Log:
//
//
//
//
// Code:
......@@ -17,29 +17,30 @@
#include "dtkDistributedCommunicator.h"
#include "dtkDistributedMapper.h"
#include "dtkDistributedWorker.h"
#include "dtkDistributedExport.h"
// /////////////////////////////////////////////////////////////////
// dtkDistributedContainer
// /////////////////////////////////////////////////////////////////
class dtkDistributedContainer
class DTKDISTRIBUTED_EXPORT dtkDistributedContainer
{
public:
dtkDistributedContainer(dtkDistributedWorker *worker) :
dtkDistributedContainer(dtkDistributedWorker *worker) :
m_size(0),
m_worker(worker),
m_mapper(new dtkDistributedMapper),
m_comm(worker->communicator())
m_worker(worker),
m_mapper(new dtkDistributedMapper),
m_comm(worker->communicator())
{
m_mapper->ref();
m_worker->record(this);
}
dtkDistributedContainer(const qlonglong& size, dtkDistributedWorker *worker) :
dtkDistributedContainer(const qlonglong& size, dtkDistributedWorker *worker) :
m_size(size),
m_worker(worker),
m_mapper(new dtkDistributedMapper),
m_comm(worker->communicator())
m_worker(worker),
m_mapper(new dtkDistributedMapper),
m_comm(worker->communicator())
{
m_mapper->ref();
m_worker->record(this);
......@@ -48,18 +49,18 @@ public:
}
}
dtkDistributedContainer(const qlonglong& size, dtkDistributedWorker *worker, dtkDistributedMapper *mapper) :
dtkDistributedContainer(const qlonglong& size, dtkDistributedWorker *worker, dtkDistributedMapper *mapper) :
m_size(size),
m_worker(worker),
m_mapper(mapper),
m_comm(worker->communicator())
m_worker(worker),
m_mapper(mapper),
m_comm(worker->communicator())
{
m_mapper->ref();
m_worker->record(this);
}
public:
virtual ~dtkDistributedContainer(void)
virtual ~dtkDistributedContainer(void)
{
m_worker->unrecord(this);
if (!m_mapper->deref())
......@@ -90,5 +91,5 @@ protected:
dtkDistributedCommunicator *m_comm;
};
//
//
// dtkDistributedContainer.h ends here
// Version: $Id$
//
//
//
//
// Commentary:
//
//
// Commentary:
//
//
// Change Log:
//
//
//
//
// Code:
#pragma once
#include "dtkDistributedContainer.h"
#include "dtkDistributedArray.h"
#include "dtkDistributedArrayNavigator.h"
#include "dtkDistributedContainer.h"
#include "dtkDistributedExport.h"
// /////////////////////////////////////////////////////////////////
// dtkDistributedGraph declaration
// /////////////////////////////////////////////////////////////////
class dtkDistributedGraph : public dtkDistributedContainer
class DTKDISTRIBUTED_EXPORT dtkDistributedGraph : public dtkDistributedContainer
{
public:
dtkDistributedGraph(dtkDistributedWorker *worker);
......@@ -42,7 +43,7 @@ public:
public:
qlonglong vertexCount(void) const;
qlonglong edgeCount(void) const;
void appendEdge(qlonglong from, qlonglong to);
qlonglong edgeCount(qlonglong vertex_id) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment