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

Adding stub for communicator plugin factory.

parent 636d6eb1
......@@ -18,6 +18,8 @@ set(${PROJECT_NAME}_HEADERS
dtkDistributedCommunicator.h
dtkDistributedCommunicatorPlugin
dtkDistributedCommunicatorPlugin.h
dtkDistributedCommunicatorPluginFactory
dtkDistributedCommunicatorPluginFactory.h
dtkDistributedCommunicatorPluginManager
dtkDistributedCommunicatorPluginManager.h
dtkDistributedContainer.h
......@@ -26,6 +28,7 @@ set(${PROJECT_NAME}_HEADERS
set(${PROJECT_NAME}_SOURCES
dtkDistributedCommunicator.cpp
dtkDistributedCommunicatorPluginFactory.cpp
dtkDistributedCommunicatorPluginManager.cpp
dtkDistributedMapper.cpp)
......
......@@ -15,7 +15,6 @@
#pragma once
#include <QtCore>
// class dtkDistributedCommunicatorPrivate;
......@@ -29,7 +28,6 @@ public:
virtual ~dtkDistributedCommunicator(void);
public:
// use the same value as defined in mpi.h
static const qint32 ANY_TAG = -1;
static const qint32 ANY_SOURCE = -1;
......@@ -38,16 +36,18 @@ public:
dtkDistributedCommunicator& operator = (const dtkDistributedCommunicator& other);
public:
virtual void initialize(void);
virtual void initialize(void);
virtual bool initialized(void);
virtual void uninitialize(void);
public:
virtual qlonglong allocate(qlonglong count, qlonglong size, void *buffer);
virtual void get(qint32 from, qlonglong position, void *array, qlonglong buffer_id);
virtual QByteArray get(qint32 from, qlonglong position, qlonglong size, qlonglong buffer_id);
public:
virtual void get(qint32 from, qlonglong position, void *array, qlonglong buffer_id);
virtual QByteArray get(qint32 from, qlonglong position, qlonglong size, qlonglong buffer_id);
public:
virtual void put(qint32 dest, qlonglong position, qlonglong size, const QByteArray &data, qlonglong buffer_id);
// public:
......
#include "dtkDistributedCommunicatorPluginFactory.h"
/* dtkDistributedCommunicatorPluginFactory.cpp ---
*
* Author: Julien Wintz
* Created: Fri Feb 8 16:20:47 2013 (+0100)
* Version:
* Last-Updated: Fri Feb 8 16:25:11 2013 (+0100)
* By: Julien Wintz
* Update #: 7
*/
/* Change Log:
*
*/
#include "dtkDistributedCommunicatorPluginFactory.h"
#include <QtCore>
class dtkDistributedCommunicatorPluginFactoryPrivate
{
public:
};
dtkDistributedCommunicatorPluginFactory *dtkDistributedCommunicatorPluginFactory::instance(void)
{
if(!s_instance)
s_instance = new dtkDistributedCommunicatorPluginFactory;
return s_instance;
}
dtkDistributedCommunicatorPluginFactory::dtkDistributedCommunicatorPluginFactory(void) : d(new dtkDistributedCommunicatorPluginFactoryPrivate)
{
}
dtkDistributedCommunicatorPluginFactory::~dtkDistributedCommunicatorPluginFactory(void)
{
delete d;
d = NULL;
}
dtkDistributedCommunicatorPluginFactory *dtkDistributedCommunicatorPluginFactory::s_instance = NULL;
/* dtkDistributedCommunicatorPluginFactory.h ---
*
* Author: Julien Wintz
* Created: Fri Feb 8 16:17:21 2013 (+0100)
* Version:
* Last-Updated: Fri Feb 8 16:20:28 2013 (+0100)
* By: Julien Wintz
* Update #: 7
*/
/* Change Log:
*
*/
#pragma once
class dtkDistributedCommunicatorPluginFactoryPrivate;
class dtkDistributedCommunicatorPluginFactory
{
public:
static dtkDistributedCommunicatorPluginFactory *instance(void);
protected:
dtkDistributedCommunicatorPluginFactory(void);
~dtkDistributedCommunicatorPluginFactory(void);
private:
static dtkDistributedCommunicatorPluginFactory *s_instance;
private:
dtkDistributedCommunicatorPluginFactoryPrivate *d;
};
......@@ -3,9 +3,9 @@
* Author: Julien Wintz
* Created: Mon Feb 4 12:51:32 2013 (+0100)
* Version:
* Last-Updated: Mon Feb 4 12:52:09 2013 (+0100)
* Last-Updated: Fri Feb 8 16:19:21 2013 (+0100)
* By: Julien Wintz
* Update #: 2
* Update #: 3
*/
/* Change Log:
......
......@@ -3,9 +3,9 @@
* Author: Julien Wintz
* Created: Mon Feb 4 12:50:38 2013 (+0100)
* Version:
* Last-Updated: Mon Feb 4 12:51:21 2013 (+0100)
* Last-Updated: Fri Feb 8 16:19:28 2013 (+0100)
* By: Julien Wintz
* Update #: 2
* Update #: 3
*/
/* Change Log:
......@@ -47,7 +47,7 @@ protected:
dtkDistributedCommunicatorPluginManager(void);
~dtkDistributedCommunicatorPluginManager(void);
private:
private:
static dtkDistributedCommunicatorPluginManager *s_instance;
private:
......
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