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

improvements in abstraction

parent e544edd9
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,8 @@
 
#include <abstraction/CastRegistry.hpp>
 
#include <core/namingApi.hpp>
namespace abstraction {
 
std::shared_ptr < abstraction::OperationAbstraction > CastRegistry::getAbstraction ( const std::string & target, const std::string & param, bool & normalize ) {
......
......@@ -15,8 +15,6 @@
#include <exception/CommonException.h>
#include <abstraction/OperationAbstraction.hpp>
 
#include <core/namingApi.hpp>
namespace abstraction {
 
class CastRegistry {
......
......@@ -26,14 +26,13 @@ private:
if ( index >= m_moves.size ( ) )
throw exception::CommonException ( "Parameter index out of bounds.");
 
m_moves [ index ] = move;
auto attachCallback = [ & ] ( auto & param ) {
if ( param != nullptr )
return false;
 
typename std::decay < decltype ( param )>::type validData = std::dynamic_pointer_cast < typename std::decay < decltype ( param ) >::type::element_type > ( input );
if ( validData ) {
m_moves [ index ] = move;
param = validData;
return true;
} else {
......
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