Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
ImmediateStatement.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <ast/Statement.h>
9
10namespace cli {
11
12template < class Type >
13class ImmediateStatement final : public Statement {
14 std::shared_ptr < abstraction::ValueHolder < Type > > m_value;
15
16public:
17 ImmediateStatement ( Type value ) : m_value ( std::make_shared < abstraction::ValueHolder < Type > > ( std::move ( value ), true ) ) {
18 }
19
20 std::shared_ptr < abstraction::Value > translateAndEval ( const std::shared_ptr < abstraction::Value > &, Environment & ) const override {
21 return m_value;
22 }
23
24};
25
26} /* namespace cli */
27
Definition: Environment.h:29
Definition: ImmediateStatement.h:13
std::shared_ptr< abstraction::Value > translateAndEval(const std::shared_ptr< abstraction::Value > &, Environment &) const override
Definition: ImmediateStatement.h:20
ImmediateStatement(Type value)
Definition: ImmediateStatement.h:17
Definition: Statement.h:14
Definition: AlgorithmAbstraction.hpp:11
Definition: Arg.h:11
Type
Definition: MeasurementTypes.hpp:20
Definition: FordFulkerson.hpp:16