Skip to content
Snippets Groups Projects
Commit 6ed086e1 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

added asserts to make sure the implementation is matching the expected direction

parent c1611380
No related branches found
No related tags found
No related merge requests found
......@@ -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());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment