Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
c2e8b349
Commit
c2e8b349
authored
May 06, 2011
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE] - removed old colormapping. Removed NavSlices and ported Marching Cubes.
parent
f5c767e8
Changes
52
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
69 additions
and
5015 deletions
+69
-5015
src/dataHandler/WDataHandler.cpp
src/dataHandler/WDataHandler.cpp
+0
-10
src/dataHandler/WDataHandler.h
src/dataHandler/WDataHandler.h
+0
-18
src/dataHandler/WDataSet.cpp
src/dataHandler/WDataSet.cpp
+0
-18
src/dataHandler/WDataSet.h
src/dataHandler/WDataSet.h
+0
-18
src/dataHandler/WDataSetSingle.cpp
src/dataHandler/WDataSetSingle.cpp
+0
-8
src/dataHandler/WDataSetSingle.h
src/dataHandler/WDataSetSingle.h
+0
-13
src/dataHandler/WDataTexture3D.cpp
src/dataHandler/WDataTexture3D.cpp
+0
-571
src/dataHandler/WDataTexture3D.h
src/dataHandler/WDataTexture3D.h
+0
-379
src/dataHandler/WSubject.cpp
src/dataHandler/WSubject.cpp
+0
-46
src/dataHandler/WSubject.h
src/dataHandler/WSubject.h
+0
-10
src/gui/qt4/CMakeLists.txt
src/gui/qt4/CMakeLists.txt
+0
-1
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+19
-24
src/gui/qt4/WMainWindow.h
src/gui/qt4/WMainWindow.h
+2
-0
src/gui/qt4/controlPanel/WQtControlPanel.cpp
src/gui/qt4/controlPanel/WQtControlPanel.cpp
+0
-25
src/gui/qt4/controlPanel/WQtControlPanel.h
src/gui/qt4/controlPanel/WQtControlPanel.h
+0
-10
src/gui/qt4/controlPanel/WQtTextureSorter.cpp
src/gui/qt4/controlPanel/WQtTextureSorter.cpp
+0
-283
src/gui/qt4/controlPanel/WQtTextureSorter.h
src/gui/qt4/controlPanel/WQtTextureSorter.h
+0
-121
src/kernel/CMakeLists.txt
src/kernel/CMakeLists.txt
+0
-1
src/kernel/WModuleFactory.cpp
src/kernel/WModuleFactory.cpp
+0
-2
src/kernel/WSelectionManager.cpp
src/kernel/WSelectionManager.cpp
+0
-5
src/kernel/WSelectionManager.h
src/kernel/WSelectionManager.h
+0
-6
src/kernel/modules/data/WMData.cpp
src/kernel/modules/data/WMData.cpp
+6
-130
src/kernel/modules/data/WMData.h
src/kernel/modules/data/WMData.h
+0
-55
src/kernel/modules/navSlices/WMNavSlices.cpp
src/kernel/modules/navSlices/WMNavSlices.cpp
+0
-1329
src/kernel/modules/navSlices/WMNavSlices.h
src/kernel/modules/navSlices/WMNavSlices.h
+0
-436
src/kernel/modules/navSlices/navslices.png
src/kernel/modules/navSlices/navslices.png
+0
-0
src/kernel/modules/navSlices/navslices.xpm
src/kernel/modules/navSlices/navslices.xpm
+0
-78
src/kernel/modules/navSlices/shaders/WMNavSlices-fragment.glsl
...ernel/modules/navSlices/shaders/WMNavSlices-fragment.glsl
+0
-153
src/kernel/modules/navSlices/shaders/WMNavSlices-vertex.glsl
src/kernel/modules/navSlices/shaders/WMNavSlices-vertex.glsl
+0
-47
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.h
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.h
+0
-1
src/modules/directVolumeRendering/WMDirectVolumeRendering.cpp
...modules/directVolumeRendering/WMDirectVolumeRendering.cpp
+0
-1
src/modules/effectiveConnectivityCluster/WMEffectiveConnectivityCluster.cpp
...iveConnectivityCluster/WMEffectiveConnectivityCluster.cpp
+0
-1
src/modules/fiberDisplay/WMFiberDisplay.cpp
src/modules/fiberDisplay/WMFiberDisplay.cpp
+1
-61
src/modules/fiberDisplay/WMFiberDisplay.h
src/modules/fiberDisplay/WMFiberDisplay.h
+0
-15
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
+0
-1
src/modules/fiberParameterColoring/WMFiberParameterColoring.cpp
...dules/fiberParameterColoring/WMFiberParameterColoring.cpp
+0
-1
src/modules/imageExtractor/WMImageExtractor.cpp
src/modules/imageExtractor/WMImageExtractor.cpp
+0
-58
src/modules/marchingCubes/WMMarchingCubes.cpp
src/modules/marchingCubes/WMMarchingCubes.cpp
+12
-216
src/modules/marchingCubes/WMMarchingCubes.h
src/modules/marchingCubes/WMMarchingCubes.h
+0
-23
src/modules/marchingCubes/shaders/WMMarchingCubes-fragment.glsl
...dules/marchingCubes/shaders/WMMarchingCubes-fragment.glsl
+14
-107
src/modules/marchingCubes/shaders/WMMarchingCubes-vertex.glsl
...modules/marchingCubes/shaders/WMMarchingCubes-vertex.glsl
+9
-19
src/modules/modules-base.toolbox
src/modules/modules-base.toolbox
+2
-2
src/modules/modules-others.toolbox
src/modules/modules-others.toolbox
+3
-4
src/modules/navigationSlices/WMNavigationSlices.cpp
src/modules/navigationSlices/WMNavigationSlices.cpp
+1
-1
src/modules/probTractDisplaySP/WMProbTractDisplaySP.cpp
src/modules/probTractDisplaySP/WMProbTractDisplaySP.cpp
+0
-1
src/modules/scalarOperator/WMScalarOperator.cpp
src/modules/scalarOperator/WMScalarOperator.cpp
+0
-1
src/modules/spatialDerivation/WMSpatialDerivation.cpp
src/modules/spatialDerivation/WMSpatialDerivation.cpp
+0
-1
src/modules/textureMapper/CMakeLists.txt
src/modules/textureMapper/CMakeLists.txt
+0
-46
src/modules/textureMapper/WMTextureMapper.cpp
src/modules/textureMapper/WMTextureMapper.cpp
+0
-214
src/modules/textureMapper/WMTextureMapper.h
src/modules/textureMapper/WMTextureMapper.h
+0
-153
src/modules/textureMapper/WMTextureMapper.xpm
src/modules/textureMapper/WMTextureMapper.xpm
+0
-290
src/modules/vectorOperator/WMVectorOperator.cpp
src/modules/vectorOperator/WMVectorOperator.cpp
+0
-1
No files found.
src/dataHandler/WDataHandler.cpp
View file @
c2e8b349
...
...
@@ -145,13 +145,3 @@ boost::shared_ptr< WSubject > WDataHandler::getDefaultSubject()
return
getDataHandler
()
->
getSubjectByID
(
WSubject
::
SUBJECT_UNKNOWN
);
}
void
WDataHandler
::
registerDataSet
(
boost
::
shared_ptr
<
WDataSet
>
dataset
)
{
getDefaultSubject
()
->
addDataSet
(
dataset
);
}
void
WDataHandler
::
deregisterDataSet
(
boost
::
shared_ptr
<
WDataSet
>
dataset
)
{
getDefaultSubject
()
->
removeDataSet
(
dataset
);
}
src/dataHandler/WDataHandler.h
View file @
c2e8b349
...
...
@@ -93,24 +93,6 @@ public:
*/
static
boost
::
shared_ptr
<
WDataHandler
>
getDataHandler
();
// TODO(all): the following two methods are only useful with our current single-subject stuff. You should consider redesigning
// it in conjunction with the multi subject stuff.
/**
* Register a dataset to the "UNKNOWN" subject. This is a convenience class which is useful as long as we do not have proper
* multi subject facilities.
*
* \param dataset the dataset to register.
*/
static
void
registerDataSet
(
boost
::
shared_ptr
<
WDataSet
>
dataset
);
/**
* Deregister a dataset to the "UNKNOWN" subject. This is a convenience class which is useful as long as we do not have proper
* multi subject facilities.
*
* \param dataset the dataset to deregister.
*/
static
void
deregisterDataSet
(
boost
::
shared_ptr
<
WDataSet
>
dataset
);
/**
* Insert a new subject referenced by a pointer.
*
...
...
src/dataHandler/WDataSet.cpp
View file @
c2e8b349
...
...
@@ -30,7 +30,6 @@
#include "exceptions/WDHException.h"
#include "WDataSet.h"
#include "WDataSetVector.h"
#include "WDataTexture3D.h"
#include "WDataTexture3D_2.h"
// prototype instance as singleton
...
...
@@ -61,11 +60,6 @@ bool WDataSet::isTexture() const
return
false
;
}
boost
::
shared_ptr
<
WDataTexture3D
>
WDataSet
::
getTexture
()
{
throw
WDHException
(
std
::
string
(
"This dataset does not provide a texture."
)
);
}
osg
::
ref_ptr
<
WDataTexture3D_2
>
WDataSet
::
getTexture2
()
const
{
throw
WDHException
(
std
::
string
(
"This dataset does not provide a texture."
)
);
...
...
@@ -91,18 +85,6 @@ boost::shared_ptr< WPrototyped > WDataSet::getPrototype()
return
m_prototype
;
}
boost
::
shared_ptr
<
WCondition
>
WDataSet
::
getChangeCondition
()
{
// this just forwards to the texture condition. In the future maybe datasets may also change so we need an separate condition in every
// dataset.
if
(
isTexture
()
)
{
return
getTexture
()
->
getChangeCondition
();
}
return
boost
::
shared_ptr
<
WCondition
>
();
}
boost
::
shared_ptr
<
WDataSetVector
>
WDataSet
::
isVectorDataSet
()
{
return
boost
::
shared_ptr
<
WDataSetVector
>
();
...
...
src/dataHandler/WDataSet.h
View file @
c2e8b349
...
...
@@ -38,7 +38,6 @@
#include "WDataTexture3D_2.h"
#include "WExportDataHandler.h"
class
WDataTexture3D
;
class
WCondition
;
class
WDataSetVector
;
...
...
@@ -92,15 +91,6 @@ public:
*/
virtual
boost
::
shared_ptr
<
WDataSetVector
>
isVectorDataSet
();
/**
* Returns the texture- representation of the dataset. May throw an exception if no texture is available.
*
* \return The texture.
* \deprecated
*/
OW_API_DEPRECATED
virtual
boost
::
shared_ptr
<
WDataTexture3D
>
getTexture
();
/**
* Returns the texture- representation of the dataset. May throw an exception if no texture is available.
*
...
...
@@ -130,14 +120,6 @@ public:
*/
static
boost
::
shared_ptr
<
WPrototyped
>
getPrototype
();
/**
* Gets the condition which is fired whenever the dataset gets some kind of dirty (threshold, opacity, ...)
*
* \return the condition, or NULL if the dataset has no texture.
* \deprecated this is deprecated. Use dataset properties instead.
*/
boost
::
shared_ptr
<
WCondition
>
getChangeCondition
();
/**
* Return a pointer to the properties object of the dataset. Add all the modifiable settings here. This allows the user to modify several
* properties of a dataset.
...
...
src/dataHandler/WDataSetSingle.cpp
View file @
c2e8b349
...
...
@@ -28,7 +28,6 @@
#include "../common/WAssert.h"
#include "../common/WException.h"
#include "../common/WPrototyped.h"
#include "WDataTexture3D.h"
#include "WDataTexture3D_2.h"
#include "WGrid.h"
#include "WGridRegular3D.h"
...
...
@@ -51,7 +50,6 @@ WDataSetSingle::WDataSetSingle( boost::shared_ptr< WValueSetBase > newValueSet,
m_valueSet
=
newValueSet
;
m_grid
=
newGrid
;
m_texture3D
=
boost
::
shared_ptr
<
WDataTexture3D
>
(
new
WDataTexture3D
(
m_valueSet
,
m_grid
)
);
m_infoProperties
->
addProperty
(
m_grid
->
getInformationProperties
()
);
...
...
@@ -67,7 +65,6 @@ WDataSetSingle::WDataSetSingle()
:
WDataSet
(),
m_grid
(),
m_valueSet
(),
m_texture3D
(),
m_texture
()
{
// default constructor used by the prototype mechanism
...
...
@@ -108,11 +105,6 @@ bool WDataSetSingle::isTexture() const
return
m_texture
;
}
boost
::
shared_ptr
<
WDataTexture3D
>
WDataSetSingle
::
getTexture
()
{
return
m_texture3D
;
}
osg
::
ref_ptr
<
WDataTexture3D_2
>
WDataSetSingle
::
getTexture2
()
const
{
return
m_texture
;
...
...
src/dataHandler/WDataSetSingle.h
View file @
c2e8b349
...
...
@@ -38,7 +38,6 @@
#include "WExportDataHandler.h"
class
WDataTexture3D
;
class
WDataTexture3D_2
;
/**
...
...
@@ -141,14 +140,6 @@ public:
*/
virtual
bool
isTexture
()
const
;
/**
* Returns the texture- representation of the dataset. May throw an exception if no texture is available.
*
* \return The texture.
* \deprecated
*/
virtual
boost
::
shared_ptr
<
WDataTexture3D
>
getTexture
();
/**
* Returns the texture representation of the dataset. May throw an exception if no texture is available.
*
...
...
@@ -195,10 +186,6 @@ protected:
boost
::
shared_ptr
<
WValueSetBase
>
m_valueSet
;
private:
/**
* The 3D texture representing this dataset.
*/
boost
::
shared_ptr
<
WDataTexture3D
>
m_texture3D
;
/**
* The 3D texture representing this dataset.
...
...
src/dataHandler/WDataTexture3D.cpp
deleted
100644 → 0
View file @
f5c767e8
This diff is collapsed.
Click to expand it.
src/dataHandler/WDataTexture3D.h
deleted
100644 → 0
View file @
f5c767e8
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WDATATEXTURE3D_H
#define WDATATEXTURE3D_H
#include <stdint.h>
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#include "../graphicsEngine/WGETexture.h"
#include "../common/WProperties.h"
#include "WDataHandlerEnums.h"
#include "WValueSetBase.h"
#include "WGridRegular3D.h"
#include "WExportDataHandler.h"
class
WCondition
;
/**
* Class encapsulating a 3D texture. It is able to use a value set and grid to create an OpenSceneGraph texture, that can be used
* directly by modules. The texture values get scaled to a range of [0,1] to ensure the texture used its maximum precision. The values each get
* scaled from [min,max] to [0,1]. The values min and max can be retrieved by getMinValue and getMaxValue. Your shader should get them as
* uniforms to unscale the texture to have the real value.
*/
class
OWDATAHANDLER_EXPORT
WDataTexture3D
// NOLINT
{
public:
/**
* Constructor. Creates the texture. Just run it after graphics engine was initialized.
*
* \param valueSet the value set to use
* \param grid the grid to use
*/
WDataTexture3D
(
boost
::
shared_ptr
<
WValueSetBase
>
valueSet
,
boost
::
shared_ptr
<
WGrid
>
grid
);
/**
* Destructor.
*/
virtual
~
WDataTexture3D
();
/**
* Gives the alpha value for this texture.
*
* \return the alpha value.
*/
float
getAlpha
()
const
;
/**
* Sets the alpha value. The value must be in [0,1]. Otherwise nothing will happen.
*
* \param alpha the alpha value.
*/
void
setAlpha
(
float
alpha
);
/**
* Sets the opacity value. The value must be in [0,100]. Otherwise nothing will happen.
*
* \param opacity the opacity value.
*/
void
setOpacity
(
float
opacity
);
/**
* Returns the currently set threshold.
*
* \return the threshold.
*/
float
getThreshold
()
const
;
/**
* Sets the threshold to use.
*
* \param threshold the threshold.
*/
void
setThreshold
(
float
threshold
);
/**
* Is this texture globally active and used for colormapping?
*
* \return true if active.
*/
bool
isGloballyActive
();
/**
* Sets whether the texture is active globally.
*
* \param active true if active
*/
void
setGloballyActive
(
bool
active
=
true
);
/**
* Returns the data type of the texture.
*
* \return the type.
*/
dataType
getDataType
();
/**
* getter for the texture object
*
* \return the texture
*/
osg
::
ref_ptr
<
WGETexture3D
>
getTexture
();
/**
* Gets the condition which is fired whenever the texture gets some kind of dirty (threshold, opacity, ...)
*
* \return the condition
*/
boost
::
shared_ptr
<
WCondition
>
getChangeCondition
();
/**
* The texture got created using this grid. It can help to translate coordinates into the texture coordinate space relating to
* the grid.
*
* \return the grid.
*/
boost
::
shared_ptr
<
WGridRegular3D
>
getGrid
()
const
;
/**
* Gets the minimum value in the texture.
*
* \return the min.
*/
float
getMinValue
();
/**
* Gets the maximum value in the texture.
*
* \return the maximum
*/
float
getMaxValue
();
/**
* Sets the minimum value in the texture. Use this if the default
* texture scaling is not applicable. This has no effect if the texture was
* already uploaded.
*
* \param min the min.
*/
void
setMinValue
(
float
min
);
/**
* Sets the maximum value in the texture. Use this if the default
* texture scaling is not applicable. This has no effect if the texture was
* already uploaded.
*
* \param max the max.
*/
void
setMaxValue
(
float
max
);
/**
* Gets the scaling factor to de-scale [0,1] to [0, max-min]
*
* \return the scaling factor.
*/
float
getMinMaxScale
();
/**
* getter
*/
bool
isInterpolated
();
/**
* setter
*
* \param interpol
*/
void
setInterpolation
(
bool
interpol
);
/**
* getter
*/
int
getSelectedColormap
();
/**
* setter
*
* \param cmap
*/
void
setSelectedColormap
(
int
cmap
);
/**
* Return a pointer to the properties object of the dataset. Add all the modifiable settings here. This allows the user to modify several
* properties of a dataset.
*
* \return the properties.
*/
boost
::
shared_ptr
<
WProperties
>
getProperties
()
const
;
/**
* Return a pointer to the information properties object of the dataset. The dataset intends these properties to not be modified.
*
* \return the properties.
*/
boost
::
shared_ptr
<
WProperties
>
getInformationProperties
()
const
;
protected:
/**
* The property object for the dataset.
*/
boost
::
shared_ptr
<
WProperties
>
m_properties
;
/**
* The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". It is useful to define some property
* to only be of informational nature. The GUI does not modify them. As it is a WProperties instance, you can use it the same way as
* m_properties.
*/
boost
::
shared_ptr
<
WProperties
>
m_infoProperties
;
/**
* Creates a 3d texture from a dataset. This function will be overloaded for the
* various data types. A template function is not recommended due to the different commands
* in the image creation.
*
*
* \param source Pointer to the raw data of a dataset
* \param components Number of values used in a Voxel, usually 1, 3 or 4
*/
osg
::
ref_ptr
<
osg
::
Image
>
createTexture3D
(
unsigned
char
*
source
,
int
components
=
1
);
/**
* Creates a 3d texture from a dataset. This function will be overloaded for the
* various data types. A template function is not recommended due to the different commands
* in the image creation.
*
*
* \param source Pointer to the raw data of a dataset
* \param components Number of values used in a Voxel, usually 1, 3 or 4
*/
osg
::
ref_ptr
<
osg
::
Image
>
createTexture3D
(
int16_t
*
source
,
int
components
=
1
);
/**
* Creates a 3d texture from a dataset. This function will be overloaded for the
* various data types. A template function is not recommended due to the different commands
* in the image creation.
*
*
* \param source Pointer to the raw data of a dataset
* \param components Number of values used in a Voxel, usually 1, 3 or 4
*/
osg
::
ref_ptr
<
osg
::
Image
>
createTexture3D
(
int
*
source
,
int
components
=
1
);
/**
* Creates a 3d texture from a dataset. This function will be overloaded for the
* various data types. A template function is not recommended due to the different commands
* in the image creation.
*
*
* \param source Pointer to the raw data of a dataset
* \param components Number of values used in a Voxel, usually 1, 3 or 4
*/
osg
::
ref_ptr
<
osg
::
Image
>
createTexture3D
(
float
*
source
,
int
components
=
1
);
/**
* Creates a 3d texture from a dataset. This function will be overloaded for the
* various data types. A template function is not recommended due to the different commands
* in the image creation.
*
*
* \param source Pointer to the raw data of a dataset
* \param components Number of values used in a Voxel, usually 1, 3 or 4
*/
osg
::
ref_ptr
<
osg
::
Image
>
createTexture3D
(
double
*
source
,
int
components
=
1
);
/**
* Notifies about changes. Mainly this will be used by the textures whenever the threshold/opacity change.
*/
void
notifyChange
();
/**
* Creates a 3D texture for the data set.
*/
void
createTexture
();
/**
* The lock for securing createTexture.
*/
boost
::
shared_mutex
m_creationLock
;
/**
* Alpha value. Used for blending in/out textures.
*/
float
m_alpha
;
/**
* Threshold used for to exclude values.
*/
float
m_threshold
;
/**
* The actual texture.
*/
osg
::
ref_ptr
<
WGETexture3D
>
m_texture
;
/**
* The value set from which the texture gets created.
*/
boost
::
shared_ptr
<
WValueSetBase
>
m_valueSet
;
/**
* The grid used to set up the texture.
*/
boost
::
shared_ptr
<
WGridRegular3D
>
m_grid
;
/**
* The condition which is fired whenever the dataset gets some kind of dirty (threshold, opacity, ...)
*/
boost
::
shared_ptr
<
WCondition
>
m_changeCondition
;
/**
* Flag denotes whether this texture should be used by surfaces/slides for surface colormapping.
*/
bool
m_globalActive
;
/**
* flag denotes whether the texture filter should active or not
*/
bool
m_interpolation
;
/**
* indicates which colormap to use
*/
int
m_cmap
;
/**
* The smallest value inside the dataset
*/
float
m_minValue
;
/**
* The largest value inside the dataset
*/
float
m_maxValue
;
/**
* The scaling factor to apply to unscale a [0,1] to [0,max-min]
*/
float
m_scale
;
/**
* Scales the specified value to the interval [0,1] using m_maxValue and m_minValue.
*
* \param value the value to scale
*
* \return the value scaled to [0,1]
*/
float
scaleInterval
(
float
value
)
const
;
private:
};
#endif // WDATATEXTURE3D_H
src/dataHandler/WSubject.cpp
View file @
c2e8b349
...
...
@@ -30,7 +30,6 @@
#include "../common/WLogger.h"
#include "WDataSet.h"
#include "WDataTexture3D.h"
#include "exceptions/WDHNoSuchDataSet.h"
#include "WSubject.h"
...
...
@@ -70,13 +69,6 @@ void WSubject::addDataSet( boost::shared_ptr< WDataSet > dataset )
{
// simply add the new dataset
m_datasets
.
push_back
(
dataset
);
// also register condition
boost
::
shared_ptr
<
WCondition
>
c
=
dataset
->
getChangeCondition
();
if
(
c
.
get
()
)
{
m_changeCondition
->
add
(
c
);
}
m_changeCondition
->
notify
();
m_listChangeCondition
->
notify
();
}
...
...
@@ -89,13 +81,6 @@ void WSubject::removeDataSet( boost::shared_ptr< WDataSet > dataset )
DatasetIterator
fIt
=
std
::
find
(
l
->
get
().
begin
(),
l
->
get
().
end
(),
dataset
);
l
->
get
().
erase
(
fIt
);
// also de-register condition
boost
::
shared_ptr
<
WCondition
>
c
=
dataset
->
getChangeCondition
();
if
(
c
.
get
()
)
{
m_changeCondition
->
remove
(
c
);
}
// unlock if some callback notified below wants to access the list
l
.
reset
();
...
...
@@ -106,17 +91,6 @@ void WSubject::removeDataSet( boost::shared_ptr< WDataSet > dataset )
void
WSubject
::
clear
()
{
DatasetSharedContainerType
::
WriteTicket
l
=
m_datasets
.
getWriteTicket
();
// iterate and find, remove
for
(
DatasetIterator
iter
=
l
->
get
().
begin
();
iter
!=
l
->
get
().
end
();
++
iter
)
{
// also de-register condition
boost
::
shared_ptr
<
WCondition
>
c
=
(
*
iter
)
->
getChangeCondition
();
if
(
c
.
get
()
)
{
m_changeCondition
->
remove
(
c
);
}