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