MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

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

Merge branch 'develop' into feature/sipwrapping

parents db2e5e95 502b633f
......@@ -205,6 +205,5 @@ void dtkComposerContainerExtension::extend(dtkComposerNodeFactory *factory)
factory->record(":dtkComposer/dtkComposerNodeMetaContainerTakeAt.json", dtkComposerNodeCreator<dtkComposerNodeMetaContainerTakeAt>);
}
//
// dtkComposerDefaultExtensions.cpp ends here
......@@ -51,7 +51,7 @@
class DTKCOMPOSER_EXPORT dtkComposerBaseExtension : public dtkComposerExtension
{
public:
dtkComposerBaseExtension(void) {};
dtkComposerBaseExtension(void) {};
~dtkComposerBaseExtension(void) {};
public:
......@@ -63,7 +63,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerFileExtension : public dtkComposerExtension
{
public:
dtkComposerFileExtension(void) {};
dtkComposerFileExtension(void) {};
~dtkComposerFileExtension(void) {};
public:
......@@ -75,7 +75,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerDistributedExtension : public dtkComposerExtension
{
public:
dtkComposerDistributedExtension(void) {};
dtkComposerDistributedExtension(void) {};
~dtkComposerDistributedExtension(void) {};
public:
......@@ -87,7 +87,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerConstantsExtension : public dtkComposerExtension
{
public:
dtkComposerConstantsExtension(void) {};
dtkComposerConstantsExtension(void) {};
~dtkComposerConstantsExtension(void) {};
public:
......@@ -99,7 +99,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerControlExtension : public dtkComposerExtension
{
public:
dtkComposerControlExtension(void) {};
dtkComposerControlExtension(void) {};
~dtkComposerControlExtension(void) {};
public:
......@@ -111,7 +111,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerBooleanExtension : public dtkComposerExtension
{
public:
dtkComposerBooleanExtension(void) {};
dtkComposerBooleanExtension(void) {};
~dtkComposerBooleanExtension(void) {};
public:
......@@ -123,7 +123,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerNumberExtension : public dtkComposerExtension
{
public:
dtkComposerNumberExtension(void) {};
dtkComposerNumberExtension(void) {};
~dtkComposerNumberExtension(void) {};
public:
......@@ -135,7 +135,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerStringExtension : public dtkComposerExtension
{
public:
dtkComposerStringExtension(void) {};
dtkComposerStringExtension(void) {};
~dtkComposerStringExtension(void) {};
public:
......@@ -147,7 +147,7 @@ public:
class DTKCOMPOSER_EXPORT dtkComposerContainerExtension : public dtkComposerExtension
{
public:
dtkComposerContainerExtension(void) {};
dtkComposerContainerExtension(void) {};
~dtkComposerContainerExtension(void) {};
public:
......
......@@ -14,22 +14,27 @@
#pragma once
#include <QtCore>
#include <dtkComposerExport.h>
#include <dtkCore/dtkCorePlugin.h>
class dtkComposerNodeFactory;
class DTKCOMPOSER_EXPORT dtkComposerExtension
class DTKCOMPOSER_EXPORT dtkComposerExtension : public QObject
{
Q_OBJECT
public:
dtkComposerExtension(void) {}
dtkComposerExtension(void) {}
virtual ~dtkComposerExtension(void) {}
public:
virtual void extend(dtkComposerNodeFactory *factory) = 0;
};
DTK_DECLARE_OBJECT(dtkComposerExtension *)
DTK_DECLARE_PLUGIN(dtkComposerExtension, DTKCOMPOSER_EXPORT)
DTK_DECLARE_PLUGIN_FACTORY(dtkComposerExtension, DTKCOMPOSER_EXPORT)
DTK_DECLARE_PLUGIN_MANAGER(dtkComposerExtension, DTKCOMPOSER_EXPORT)
......
......@@ -16,6 +16,8 @@
#include <dtkComposerExport.h>
#include <dtkCore>
#include <QtCore>
class dtkComposerNodePrivate;
......@@ -89,5 +91,9 @@ private:
dtkComposerNodePrivate *d;
};
// ///////////////////////////////////////////////////////////////////
DTK_DECLARE_OBJECT(dtkComposerNode *);
//
// dtkComposerNode.h ends here
......@@ -56,6 +56,8 @@ set(${PROJECT_NAME}_HEADERS
dtkHash.h
dtkIterator
dtkIterator.h
dtkObjectManager
dtkObjectManager.h
dtkSpinLock.h
dtkStaticArray
dtkStaticArray.h)
......@@ -66,8 +68,10 @@ set(${PROJECT_NAME}_SOURCES
dtkCoreSettings.cpp
dtkArrayData.cpp
dtkCoreLayerManager.cpp
dtkCorePluginFactory.cpp
dtkCorePluginManagerHandler.cpp
dtkCorePluginManagerRecorder.cpp)
dtkCorePluginManagerRecorder.cpp
dtkObjectManager.cpp)
## #################################################################
## Deps
......
......@@ -15,5 +15,6 @@
#include "dtkCoreSettings.h"
#include "dtkHash.h"
#include "dtkIterator.h"
#include "dtkObjectManager.h"
#include "dtkSpinLock.h"
#include "dtkStaticArray.h"
/* Version: $Id$
*
*/
// Version: $Id$
//
//
/* Commentary:
*
*/
// Commentary:
//
//
/* Change Log:
*
*/
// Change Log:
//
//
/* Code: */
// Code:
%module(directors="1") dtkcore
%include "../../wrp/dtk_base.i"
%include "../../wrp/dtkBase/dtk_base.i"
%{
......@@ -28,7 +28,6 @@
%feature("director");
// /////////////////////////////////////////////////////////////////
// Macro undefinition
// /////////////////////////////////////////////////////////////////
......@@ -45,7 +44,8 @@
%include <dtkCore/dtkCorePluginFactory.h>
%include <dtkCore/dtkArray.h>
%template(dtkArrayInt) dtkArray<long long>;
%template(dtkArrayInt) dtkArray<long long>;
%template(dtkArrayDouble) dtkArray<double>;
/* dtkCore.i ends here */
//
// dtkCore.i ends here
......@@ -14,6 +14,9 @@
#pragma once
#include <QtCore/QObject>
#include <QtCore/QVariant>
#include <dtkCoreExport.h>
#include "dtkCoreLayerManager.h"
......@@ -42,7 +45,9 @@
DTK_DECLARE_PLUGIN_INTERFACE_NAME_STRINGIFIED(DTK_DECLARE_PLUGIN_INTERFACE_NAME(type))
#define DTK_DECLARE_PLUGIN(type, Export) \
class Export type##Plugin : public dtkCorePluginBase{ \
class Export type##Plugin : public dtkCorePluginBase \
{ \
\
}; \
Q_DECLARE_METATYPE(type##Plugin*); \
Q_DECLARE_INTERFACE(type##Plugin, DTK_DECLARE_PLUGIN_INTERFACE(type));
......@@ -51,9 +56,12 @@
// DTK_DECLARE_PLUGIN_FACTORY
// ///////////////////////////////////////////////////////////////////
#define DTK_DECLARE_PLUGIN_FACTORY(type, Export) \
class Export type##PluginFactory : public dtkCorePluginFactory<type> {}; \
template <typename T> type *type##Creator() { return new T; };
#define DTK_DECLARE_PLUGIN_FACTORY(type, Export) \
class Export type##PluginFactory : public dtkCorePluginFactory<type> \
{ \
}; \
\
template <typename T> type *type##Creator(void) { return new T; };
// ///////////////////////////////////////////////////////////////////
// DTK_DECLARE_PLUGIN_MANAGER
......@@ -113,9 +121,9 @@
// DTK_DEFINE_LAYER_MANAGER
// /////////////////////////////////////////////////////////////////
#define DTK_DEFINE_LAYER_MANAGER \
\
dtkCoreLayerManager& manager(void) { \
#define DTK_DEFINE_LAYER_MANAGER \
\
dtkCoreLayerManager& manager(void) { \
static dtkCoreLayerManager *layer_manager = nullptr; \
if(!layer_manager) { \
layer_manager = new dtkCoreLayerManager; \
......
......@@ -4,6 +4,36 @@
* Created: jeu. avril 3 08:44:47 2014 (+0200)
*/
#include "dtkCorePluginFactory.h"
#include "dtkObjectManager.h"
#include <QtCore>
/*!
\class dtkCorePluginFactoryPrivate
\inmodule dtkCore
\brief The dtkCorePluginFactoryPrivate class add signals to register object to object manager.
*/
/*! \fn void dtkCorePluginFactoryPrivate::touch(int type, void *t)
Emits signal created(QVariant).
The QVariant is defined by the QMetaType \a type and the address of the object \a t.
*/
void dtkCorePluginFactoryPrivate::touch(int type, void *t) const
{
emit created(QVariant(type, t));
}
/*! \fn void dtkCorePluginFactoryPrivate::connect(dtkObjectManager *manager)
Enables connection to \a manager.
*/
void dtkCorePluginFactoryPrivate::connect(dtkObjectManager *manager) const
{
QObject::connect(this, SIGNAL(created(const QVariant&)), manager, SLOT(add(const QVariant&)));
}
/*!
\class dtkCorePluginFactory
\inmodule dtkCore
......
......@@ -15,13 +15,36 @@
#pragma once
#include <QtCore>
#include <QtDebug>
template <typename T> class dtkCorePluginTuner;
#include <dtkCoreExport.h>
class dtkObjectManager;
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
class DTKCORE_EXPORT dtkCorePluginFactoryPrivate : public QObject
{
Q_OBJECT
signals:
void created(const QVariant&) const;
public:
void touch(int type, void *t) const;
public:
void connect(dtkObjectManager *manager) const;
};
// ///////////////////////////////////////////////////////////////////
// dtkCorePluginFactory
// ///////////////////////////////////////////////////////////////////
template <typename T> class dtkCorePluginTuner;
template <typename T> class dtkCorePluginFactory : public QObject
{
public:
......@@ -43,9 +66,15 @@ public:
public:
QStringList keys(void) const;
public:
void connect(dtkObjectManager *manager) const;
private:
QHash<QString, creator> creators;
QHash<QString, tunerCreator> tuner_creators;
private:
dtkCorePluginFactoryPrivate *m_d;
};
// ///////////////////////////////////////////////////////////////////
......
......@@ -14,14 +14,18 @@
#pragma once
template <typename T> dtkCorePluginFactory<T>::dtkCorePluginFactory(void)
// ///////////////////////////////////////////////////////////////////
// dtkCorePluginFactory implementation
// ///////////////////////////////////////////////////////////////////
template <typename T> dtkCorePluginFactory<T>::dtkCorePluginFactory(void) : m_d(new dtkCorePluginFactoryPrivate)
{
}
template <typename T> dtkCorePluginFactory<T>::~dtkCorePluginFactory(void)
{
delete m_d;
}
// /////////////////////////////////////////////////////////////////
......@@ -54,10 +58,15 @@ template <typename T> void dtkCorePluginFactory<T>::recordTuner(const QString& k
template <typename T> T *dtkCorePluginFactory<T>::create(const QString& key) const
{
if (!this->creators.contains(key))
return NULL;
T *obj = nullptr;
if (this->creators.contains(key)) {
obj = this->creators.value(key)();
if (obj) {
m_d->touch(qMetaTypeId<T *>(), obj);
}
}
return this->creators.value(key)();
return obj;
}
template <typename T> dtkCorePluginTuner<T> *dtkCorePluginFactory<T>::createTuner(const QString& key) const
......@@ -68,6 +77,7 @@ template <typename T> dtkCorePluginTuner<T> *dtkCorePluginFactory<T>::createTune
return this->tuner_creators.value(key)();
}
// /////////////////////////////////////////////////////////////////
// Type creator inspection
// /////////////////////////////////////////////////////////////////
......@@ -77,5 +87,14 @@ template <typename T> QStringList dtkCorePluginFactory<T>::keys(void) const
return this->creators.keys();
}
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
template <typename T> void dtkCorePluginFactory<T>::connect(dtkObjectManager *manager) const
{
m_d->connect(manager);
}
//
// dtkCorePluginFactory_t.h ends here
......@@ -54,7 +54,7 @@ template <typename T> class dtkCorePluginManagerPrivate;
template <typename T> class dtkCorePluginManager : public dtkCorePluginManagerBase
{
public:
dtkCorePluginManager(void);
dtkCorePluginManager(void);
~dtkCorePluginManager(void);
#pragma mark -
......
......@@ -17,6 +17,7 @@
#include <dtkCoreExport.h>
class QString;
class dtkCorePluginManagerBase;
class dtkCoreLayerManager;
......
......@@ -23,7 +23,7 @@
template < typename T > class dtkCorePluginTuner
{
public:
dtkCorePluginTuner(void);
dtkCorePluginTuner(void);
virtual ~dtkCorePluginTuner(void);
void setObject(T *object);
......
......@@ -18,30 +18,31 @@
// dtkCorePluginTuner implementation
// /////////////////////////////////////////////////////////////////
template < typename T > inline dtkCorePluginTuner<T>::dtkCorePluginTuner(void) : m_object(nullptr)
template <typename T> inline dtkCorePluginTuner<T>::dtkCorePluginTuner(void) : m_object(nullptr)
{
}
template < typename T > inline dtkCorePluginTuner<T>::~dtkCorePluginTuner(void)
template <typename T> inline dtkCorePluginTuner<T>::~dtkCorePluginTuner(void)
{
}
template < typename T > inline void dtkCorePluginTuner<T>::setObject(T *object)
template <typename T> inline void dtkCorePluginTuner<T>::setObject(T *object)
{
m_object = object;
}
template < typename T > inline void dtkCorePluginTuner<T>::setMap(const QVariantHash& map)
template <typename T> inline void dtkCorePluginTuner<T>::setMap(const QVariantHash& map)
{
m_map = map;
}
template < typename T > inline T *dtkCorePluginTuner<T>::object(void) const
template <typename T> inline T *dtkCorePluginTuner<T>::object(void) const
{
return m_object;
}
template < typename T > inline const QVariantHash& dtkCorePluginTuner<T>::map(void) const
template <typename T> inline const QVariantHash& dtkCorePluginTuner<T>::map(void) const
{
return m_map;
}
......
#include "dtkObjectManager.h"
\ No newline at end of file
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkObjectManager.h"
class dtkObjectManagerPrivate
{
public:
QVariantMap instances;
};
dtkObjectManager *dtkObjectManager::instance(void)
{
if(!s_instance)
s_instance = new dtkObjectManager;
return s_instance;
}
int dtkObjectManager::count(void)
{
return d->instances.count();
}
void dtkObjectManager::add(const QVariant& instance)
{
static int count = 0;
d->instances.insert(QString(instance.typeName()) + " " + count++, instance);
}
dtkObjectManager::dtkObjectManager(void)
{
d = new dtkObjectManagerPrivate;
}
dtkObjectManager::~dtkObjectManager(void)
{
delete d;
}
dtkObjectManager *dtkObjectManager::s_instance = Q_NULLPTR;
//
// dtkObjectManager.cpp ends here
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include <QtCore>
#include <dtkCoreExport.h>
class DTKCORE_EXPORT dtkObjectManager : public QObject
{
Q_OBJECT
public:
static dtkObjectManager *instance(void);
public:
int count(void);
public slots:
void add(const QVariant&);
protected:
static dtkObjectManager *s_instance;
private:
dtkObjectManager(void);
~dtkObjectManager(void);
private:
class dtkObjectManagerPrivate *d;
};
//
// dtkObjectManager.h ends here
......@@ -15,8 +15,8 @@
#pragma once
#include <dtkDistributedExport.h>
#include <QtCore>
#include <QUrl>
class dtkDistributedApplication;
class dtkDistributedCommunicator;
......
......@@ -16,6 +16,7 @@
#pragma once
#include <dtkDistributedExport.h>
#include "dtkDistributedPolicy.h"
#include <dtkCore/dtkCorePlugin.h>
......@@ -26,13 +27,12 @@ class dtkDistributedCommunicatorStatus;
class dtkDistributedBufferManager;
class dtkDistributedRequest;
class DTKDISTRIBUTED_EXPORT dtkDistributedCommunicator : public QObject
{
Q_OBJECT
public:
dtkDistributedCommunicator(void);
dtkDistributedCommunicator(void);
virtual ~dtkDistributedCommunicator(void);
public:
......@@ -178,7 +178,6 @@ DTK_DECLARE_PLUGIN(dtkDistributedCommunicator, DTKDISTRIBUTED_EXPORT)
DTK_DECLARE_PLUGIN_FACTORY(dtkDistributedCommunicator, DTKDISTRIBUTED_EXPORT)
DTK_DECLARE_PLUGIN_MANAGER(dtkDistributedCommunicator, DTKDISTRIBUTED_EXPORT)
//for numComposer