Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ApplicationCore
Commits
6ed086e1
Commit
6ed086e1
authored
8 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
added asserts to make sure the implementation is matching the expected direction
parent
c1611380
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/ScalarAccessor.h
+6
-2
6 additions, 2 deletions
include/ScalarAccessor.h
with
6 additions
and
2 deletions
include/ScalarAccessor.h
+
6
−
2
View file @
6ed086e1
...
...
@@ -115,8 +115,12 @@ namespace ChimeraTK {
void
useProcessVariable
(
const
boost
::
shared_ptr
<
ProcessVariable
>
&
var
)
{
impl
=
boost
::
dynamic_pointer_cast
<
ProcessScalar
<
UserType
>
>
(
var
);
if
(
!
impl
)
{
throw
std
::
string
(
"ProcessVariable of the wrong type provided, cannot be used as the implementation!"
);
// @todo TODO throw proper exception
assert
(
impl
);
if
(
Accessor
<
UserType
>::
getDirection
()
==
VariableDirection
::
consuming
)
{
assert
(
impl
->
isReceiver
());
}
else
{
assert
(
impl
->
isSender
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment