Skip to content
Snippets Groups Projects
Commit 25cc4bd5 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

simplify abstraction design

parent 7f383aaf
No related branches found
No related tags found
No related merge requests found
Pipeline #25669 passed
......@@ -15,11 +15,7 @@ namespace abstraction {
 
template < class ParamType >
class SetAbstraction : public AnyaryOperationAbstraction < ext::set < ParamType >, ParamType > {
public:
SetAbstraction ( ) {
}
virtual bool run ( ) override {
if ( ! this->inputsReady ( ) )
return false;
......
......@@ -126,6 +126,13 @@ public:
};
return ext::call_on_nth < ext::type_index > ( m_params, index, callback );
}
virtual std::shared_ptr < abstraction::OperationAbstraction > getProxyAbstraction ( ) override {
if ( this->isReady ( ) )
return this->m_data.template get < std::shared_ptr < OperationAbstraction > > ( )->getProxyAbstraction ( );
else
throw std::domain_error ( "Proxy abstraction not avaiable before evaluation." );
}
};
 
template < class ReturnType, class ... ParamTypes >
......@@ -163,13 +170,6 @@ public:
throw std::domain_error ( "Runtime type unknown before evaluation." );
}
 
virtual std::shared_ptr < abstraction::OperationAbstraction > getProxyAbstraction ( ) override {
if ( this->isReady ( ) )
return this->m_data.template get < std::shared_ptr < OperationAbstraction > > ( )->getProxyAbstraction ( );
else
throw std::domain_error ( "Runtime type unknown before evaluation." );
}
};
 
template < class ... ParamTypes >
......@@ -204,13 +204,6 @@ public:
throw std::domain_error ( "Runtime type unknown before evaluation." );
}
 
virtual std::shared_ptr < abstraction::OperationAbstraction > getProxyAbstraction ( ) override {
if ( this->isReady ( ) )
return this->m_data.template get < std::shared_ptr < OperationAbstraction > > ( )->getProxyAbstraction ( );
else
throw std::domain_error ( "Proxy abstraction not avaiable before evaluation." );
}
};
 
} /* namespace abstraction */
......
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