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