Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 8671e65c authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Introducing sigslot::concurrent_pointer_list<T> a list-like container allowing...

Introducing sigslot::concurrent_pointer_list<T> a list-like container allowing thread-safe bidirectional iteration, insertion and removal of elements. Single constraint is that the element type must be a pointer type (or at least have pointer semantics) and never be 0. This is neat, as this class offers exactly what we need for a lock-free sigslot implementation.

Updated sigslot implementation to use concurrent_pointer_list for connection storage. Hence, we can get rid of the locking mechanisms, which got completely removed.

Since this simplified template definitions for sigslot, many campvis files needed to be adapted (i.e. removing the <> from has_slots<> and signal0<>).

refs #384

Conflicts:
	core/classification/genericgeometrytransferfunction.h
	core/eventhandlers/trackballnavigationeventlistener.h
	core/pipeline/processordecoratormasking.h
	core/properties/propertycollection.h
	core/properties/transferfunctionproperty.h
	core/tools/opengljobprocessor.h
parent c6b558b1
...@@ -145,10 +145,10 @@ namespace campvis { ...@@ -145,10 +145,10 @@ namespace campvis {
/// Signal emitted when the collection of pipelines has changed. /// Signal emitted when the collection of pipelines has changed.
sigslot::signal0<> s_PipelinesChanged; sigslot::signal0 s_PipelinesChanged;
/// Signal emitted when the collection of DataContainers has changed. /// Signal emitted when the collection of DataContainers has changed.
sigslot::signal0<> s_DataContainersChanged; sigslot::signal0 s_DataContainersChanged;
private: private:
void initGlContextAndPipeline(tgt::GLCanvas* canvas, AbstractPipeline* pipeline); void initGlContextAndPipeline(tgt::GLCanvas* canvas, AbstractPipeline* pipeline);
......
...@@ -45,7 +45,7 @@ namespace campvis { ...@@ -45,7 +45,7 @@ namespace campvis {
/** /**
* Painter class for CAMPVis, rendering the render target of an AbstractPipeline. * Painter class for CAMPVis, rendering the render target of an AbstractPipeline.
*/ */
class CampVisPainter : public tgt::Painter, public sigslot::has_slots<> { class CampVisPainter : public tgt::Painter, public sigslot::has_slots {
public: public:
/** /**
* Creates a new CampVisPainter rendering the render target of \a pipeline on \a canvas. * Creates a new CampVisPainter rendering the render target of \a pipeline on \a canvas.
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
namespace campvis { namespace campvis {
class DataContainerFileLoaderWidget : public QWidget, public sigslot::has_slots<> { class DataContainerFileLoaderWidget : public QWidget, public sigslot::has_slots {
Q_OBJECT; Q_OBJECT;
public: public:
......
...@@ -58,7 +58,7 @@ namespace campvis { ...@@ -58,7 +58,7 @@ namespace campvis {
class FaceGeometry; class FaceGeometry;
class DataContainerFileLoaderWidget; class DataContainerFileLoaderWidget;
class DataContainerInspectorWidget : public QWidget, public sigslot::has_slots<> { class DataContainerInspectorWidget : public QWidget, public sigslot::has_slots {
Q_OBJECT; Q_OBJECT;
public: public:
......
...@@ -52,7 +52,7 @@ namespace campvis { ...@@ -52,7 +52,7 @@ namespace campvis {
* Main Window for the CAMPVis application. * Main Window for the CAMPVis application.
* Wraps a nice Qt GUI around the CampVisApplication instance given during creation. * Wraps a nice Qt GUI around the CampVisApplication instance given during creation.
*/ */
class MainWindow : public QMainWindow, public sigslot::has_slots<> { class MainWindow : public QMainWindow, public sigslot::has_slots {
Q_OBJECT Q_OBJECT
public: public:
......
...@@ -38,7 +38,7 @@ namespace campvis { ...@@ -38,7 +38,7 @@ namespace campvis {
/** /**
* Abstract base class for property widgets. * Abstract base class for property widgets.
*/ */
class AbstractPropertyWidget : public QWidget, public sigslot::has_slots<> { class AbstractPropertyWidget : public QWidget, public sigslot::has_slots {
Q_OBJECT; Q_OBJECT;
public: public:
......
...@@ -40,7 +40,7 @@ namespace campvis { ...@@ -40,7 +40,7 @@ namespace campvis {
/** /**
* Abstract base class for transfer function editors. * Abstract base class for transfer function editors.
*/ */
class AbstractTransferFunctionEditor : public QWidget, public sigslot::has_slots<> { class AbstractTransferFunctionEditor : public QWidget, public sigslot::has_slots {
Q_OBJECT; Q_OBJECT;
public: public:
......
...@@ -40,7 +40,7 @@ namespace campvis { ...@@ -40,7 +40,7 @@ namespace campvis {
* Main Window for the CAMPVis application. * Main Window for the CAMPVis application.
* Wraps a nice Qt GUI around the TumVisApplication instance given during creation. * Wraps a nice Qt GUI around the TumVisApplication instance given during creation.
*/ */
class PropertyCollectionWidget : public QWidget, public sigslot::has_slots<> { class PropertyCollectionWidget : public QWidget, public sigslot::has_slots {
Q_OBJECT; Q_OBJECT;
public: public:
......
...@@ -125,7 +125,7 @@ namespace campvis { ...@@ -125,7 +125,7 @@ namespace campvis {
/** /**
* Class for manipulating the whole TFGeometry1D at once. * Class for manipulating the whole TFGeometry1D at once.
*/ */
class WholeTFGeometryManipulator : public AbstractTFGeometryManipulator, public sigslot::has_slots<> { class WholeTFGeometryManipulator : public AbstractTFGeometryManipulator, public sigslot::has_slots {
public: public:
/** /**
* Creates a new KeyPointManipulator * Creates a new KeyPointManipulator
......
...@@ -120,9 +120,9 @@ namespace campvis { ...@@ -120,9 +120,9 @@ namespace campvis {
const tgt::Texture* getTexture(); const tgt::Texture* getTexture();
/// Signal emitted when transfer function has changed. /// Signal emitted when transfer function has changed.
sigslot::signal0<> s_changed; sigslot::signal0 s_changed;
/// Signal emitted when the intensity domain has changed /// Signal emitted when the intensity domain has changed
sigslot::signal0<> s_intensityDomainChanged; sigslot::signal0 s_intensityDomainChanged;
protected: protected:
/** /**
......
...@@ -43,7 +43,7 @@ namespace campvis { ...@@ -43,7 +43,7 @@ namespace campvis {
* \tparam T Type of the base geometry class. * \tparam T Type of the base geometry class.
*/ */
template<class T> template<class T>
class GenericGeometryTransferFunction : public AbstractTransferFunction, public sigslot::has_slots<> { class GenericGeometryTransferFunction : public AbstractTransferFunction, public sigslot::has_slots {
public: public:
/// Typedef for the geometry class this transfer function is built from. /// Typedef for the geometry class this transfer function is built from.
typedef T GeometryType; typedef T GeometryType;
...@@ -96,7 +96,7 @@ namespace campvis { ...@@ -96,7 +96,7 @@ namespace campvis {
void onGeometryChanged(); void onGeometryChanged();
/// Signal to be emitted when the vector of T objects (_geometries) changed (The collection, not the actual geometry). /// Signal to be emitted when the vector of T objects (_geometries) changed (The collection, not the actual geometry).
sigslot::signal0<> s_geometryCollectionChanged; sigslot::signal0 s_geometryCollectionChanged;
protected: protected:
/** /**
......
...@@ -94,7 +94,7 @@ namespace campvis { ...@@ -94,7 +94,7 @@ namespace campvis {
void render() const; void render() const;
/// Signal to be emitted when this TF geometry has changed. /// Signal to be emitted when this TF geometry has changed.
sigslot::signal0<> s_changed; sigslot::signal0 s_changed;
/** /**
* Creates a simple quad geometry for the given interval. * Creates a simple quad geometry for the given interval.
......
...@@ -85,7 +85,7 @@ namespace campvis { ...@@ -85,7 +85,7 @@ namespace campvis {
void render() const; void render() const;
/// Signal to be emitted when this TF geometry has changed. /// Signal to be emitted when this TF geometry has changed.
sigslot::signal0<> s_changed; sigslot::signal0 s_changed;
/** /**
* Creates a simple quad geometry for the given interval. * Creates a simple quad geometry for the given interval.
......
...@@ -149,7 +149,7 @@ namespace campvis { ...@@ -149,7 +149,7 @@ namespace campvis {
sigslot::signal2<const std::string&, const DataHandle&> s_dataAdded; sigslot::signal2<const std::string&, const DataHandle&> s_dataAdded;
/// Signal emitted when list of DataHandles has changed. /// Signal emitted when list of DataHandles has changed.
sigslot::signal0<> s_changed; sigslot::signal0 s_changed;
private: private:
/// Map of the DataHandles in this collection and their IDs. The DataHandles contain valid data. /// Map of the DataHandles in this collection and their IDs. The DataHandles contain valid data.
......
...@@ -79,7 +79,7 @@ namespace campvis { ...@@ -79,7 +79,7 @@ namespace campvis {
* \note Also takes care of automatically adjusting the window ratio for the wrapped * \note Also takes care of automatically adjusting the window ratio for the wrapped
* camera when the viewport size changes. * camera when the viewport size changes.
*/ */
class CAMPVIS_CORE_API TrackballNavigationEventListener : public tgt::EventListener, public sigslot::has_slots<> { class CAMPVIS_CORE_API TrackballNavigationEventListener : public tgt::EventListener, public sigslot::has_slots {
public: public:
/** /**
* Creates a TrackballNavigationEventListener. * Creates a TrackballNavigationEventListener.
......
...@@ -171,7 +171,7 @@ namespace campvis { ...@@ -171,7 +171,7 @@ namespace campvis {
/// Signal emitted when the pipeline's render target has changed /// Signal emitted when the pipeline's render target has changed
sigslot::signal0<> s_renderTargetChanged; sigslot::signal0 s_renderTargetChanged;
protected: protected:
/** /**
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace campvis { namespace campvis {
class CAMPVIS_CORE_API ProcessorDecoratorMasking : public AbstractProcessorDecorator, public sigslot::has_slots<> { class CAMPVIS_CORE_API ProcessorDecoratorMasking : public AbstractProcessorDecorator, public sigslot::has_slots {
public: public:
ProcessorDecoratorMasking(); ProcessorDecoratorMasking();
virtual ~ProcessorDecoratorMasking(); virtual ~ProcessorDecoratorMasking();
......
...@@ -53,7 +53,7 @@ namespace campvis { ...@@ -53,7 +53,7 @@ namespace campvis {
/** /**
* Signal emitted when button was clicked. * Signal emitted when button was clicked.
*/ */
sigslot::signal0<> s_clicked; sigslot::signal0 s_clicked;
protected: protected:
......
...@@ -41,7 +41,7 @@ namespace campvis { ...@@ -41,7 +41,7 @@ namespace campvis {
/** /**
* Abstract base class for classes having a PropertyCollection. * Abstract base class for classes having a PropertyCollection.
*/ */
class CAMPVIS_CORE_API HasPropertyCollection : public sigslot::has_slots<> { class CAMPVIS_CORE_API HasPropertyCollection : public sigslot::has_slots {
public: public:
HasPropertyCollection(); HasPropertyCollection();
......
...@@ -38,7 +38,7 @@ namespace campvis { ...@@ -38,7 +38,7 @@ namespace campvis {
/** /**
* \todo Implement correct behavior if the TF changes during locked property state. * \todo Implement correct behavior if the TF changes during locked property state.
*/ */
class CAMPVIS_CORE_API TransferFunctionProperty : public AbstractProperty , public sigslot::has_slots<> { class CAMPVIS_CORE_API TransferFunctionProperty : public AbstractProperty , public sigslot::has_slots {
public: public:
typedef ConcurrentGenericHistogramND<float, 1> IntensityHistogramType; typedef ConcurrentGenericHistogramND<float, 1> IntensityHistogramType;
...@@ -122,9 +122,9 @@ namespace campvis { ...@@ -122,9 +122,9 @@ namespace campvis {
sigslot::signal1<AbstractTransferFunction*> s_AfterTFReplace; sigslot::signal1<AbstractTransferFunction*> s_AfterTFReplace;
/// Signal emitted when the image DataHandle for this TF has changed. /// Signal emitted when the image DataHandle for this TF has changed.
sigslot::signal0<> s_imageHandleChanged; sigslot::signal0 s_imageHandleChanged;
/// Signal emitted when the flag whether to automatically fit the TF window to the data in the image handle. /// Signal emitted when the flag whether to automatically fit the TF window to the data in the image handle.
sigslot::signal0<> s_autoFitWindowToDataChanged; sigslot::signal0 s_autoFitWindowToDataChanged;
protected: protected:
/** /**
......
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