Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
aaf5428e
Commit
aaf5428e
authored
Dec 07, 2010
by
Alexander Wiebel
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE]
parents
318244a6
3e609fbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
src/kernel/WModuleConnector.cpp
src/kernel/WModuleConnector.cpp
+2
-0
src/kernel/WModuleInputData.h
src/kernel/WModuleInputData.h
+24
-3
src/modules/scalarOperator/WMScalarOperator.cpp
src/modules/scalarOperator/WMScalarOperator.cpp
+1
-1
No files found.
src/kernel/WModuleConnector.cpp
View file @
aaf5428e
...
...
@@ -283,6 +283,8 @@ void WModuleConnector::disconnect( boost::shared_ptr<WModuleConnector> con, bool
lock
.
unlock
();
// signal "closed connection"
// NOTE: at this point, there might be an connected input connector even though we disconnected it. This is because of removeFromOwnList.
// The input connectors handle this with an additional member variable denoting their disconnect state
signal_ConnectionClosed
(
shared_from_this
(),
con
);
con
->
signal_ConnectionClosed
(
shared_from_this
(),
con
);
}
...
...
src/kernel/WModuleInputData.h
View file @
aaf5428e
...
...
@@ -99,8 +99,9 @@ public:
* \param name The name of this connector.
* \param description Short description of this connector.
*/
WModuleInputData
(
boost
::
shared_ptr
<
WModule
>
module
,
std
::
string
name
=
""
,
std
::
string
description
=
""
)
:
WModuleInputConnector
(
module
,
name
,
description
)
WModuleInputData
(
boost
::
shared_ptr
<
WModule
>
module
,
std
::
string
name
=
""
,
std
::
string
description
=
""
)
:
WModuleInputConnector
(
module
,
name
,
description
),
m_disconnecting
(
false
)
{
};
...
...
@@ -111,6 +112,14 @@ public:
{
};
/**
* Disconnects this connector if connected. If it is not connected: nothing happens.
*
* \param con the connector to disconnect.
* \param removeFromOwnList if true the specified connection is also removed from the own connection list. If false it won't.
*/
virtual
void
disconnect
(
boost
::
shared_ptr
<
WModuleConnector
>
con
,
bool
removeFromOwnList
=
true
);
/**
* Gives the currently set data.
*
...
...
@@ -124,7 +133,7 @@ public:
handledUpdate
();
// is there something in the list?
if
(
m_
connected
.
begin
()
==
m_connected
.
end
()
)
if
(
m_
disconnecting
||
m_connected
.
empty
()
)
{
lock
.
unlock
();
return
boost
::
shared_ptr
<
T
>
();
...
...
@@ -170,8 +179,20 @@ public:
protected:
private:
/**
* If true, the returned data will be NULL. Needed because disconnection process is based on multiple steps.
*/
bool
m_disconnecting
;
};
template
<
typename
T
>
void
WModuleInputData
<
T
>::
disconnect
(
boost
::
shared_ptr
<
WModuleConnector
>
con
,
bool
removeFromOwnList
)
{
m_disconnecting
=
true
;
WModuleInputConnector
::
disconnect
(
con
,
removeFromOwnList
);
}
template
<
typename
T
>
typename
WModuleInputData
<
T
>::
PtrType
WModuleInputData
<
T
>::
create
(
boost
::
shared_ptr
<
WModule
>
module
,
std
::
string
name
,
std
::
string
description
)
...
...
src/modules/scalarOperator/WMScalarOperator.cpp
View file @
aaf5428e
...
...
@@ -557,7 +557,7 @@ void WMScalarOperator::moduleMain()
// Create the new dataset and export it
if
(
newValueSet
)
{
m_output
->
updateData
(
boost
::
shared_ptr
<
WDataSetScalar
>
(
new
WDataSetScalar
(
newValueSet
,
m_inputA
->
getData
()
->
getGrid
()
)
)
);
m_output
->
updateData
(
boost
::
shared_ptr
<
WDataSetScalar
>
(
new
WDataSetScalar
(
newValueSet
,
dataSetA
->
getGrid
()
)
)
);
}
// done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment