Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
NormalizeAbstraction.hpp
Go to the documentation of this file.
1
6#pragma once
7
10
12
13namespace abstraction {
14
15template < class ReturnType, class ParamType >
16class NormalizeAbstraction : virtual public NaryOperationAbstraction < ParamType && >, virtual public ValueOperationAbstraction < ReturnType > {
17public:
18 std::shared_ptr < abstraction::Value > run ( ) const override {
19 const std::shared_ptr < abstraction::Value > & rawParam = std::get < 0 > ( this->getParams ( ) );
20 ParamType && param = retrieveValue < ParamType && > ( rawParam );
21
22 return std::make_shared < abstraction::ValueHolder < ReturnType > > ( factory::NormalizeFactory::normalize ( std::move ( param ) ), true );
23 }
24
25};
26
27} /* namespace abstraction */
28
const ext::array< std::shared_ptr< abstraction::Value >, NumberOfParams > & getParams() const
Definition: NaryOperationAbstraction.hpp:21
Definition: NaryOperationAbstraction.hpp:77
Definition: NormalizeAbstraction.hpp:16
std::shared_ptr< abstraction::Value > run() const override
Definition: NormalizeAbstraction.hpp:18
Definition: ValueOperationAbstraction.hpp:19
static normalizer< SourceType > normalize(SourceType &&source)
Definition: NormalizeFactory.hpp:35
Definition: AlgorithmAbstraction.hpp:11