Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
CastsIntrospectionCommand.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <ast/Arg.h>
9#include <ast/Command.h>
11#include <alib/list>
12#include <alib/tuple>
13
14namespace cli {
15
17 std::unique_ptr < cli::Arg > m_param;
18 bool m_from;
19 bool m_to;
20
21 static void printTypes ( const ext::list < ext::pair < std::string, bool > > & types );
22
23 static void printCasts ( const ext::list < ext::tuple < std::string, std::string, bool > > & casts );
24
25public:
26 CastsIntrospectionCommand (std::unique_ptr < cli::Arg > param, bool from, bool to ) : m_param ( std::move ( param ) ), m_from ( from ), m_to ( to ) {
27 }
28
29 CommandResult run ( Environment & environment ) const override;
30};
31
32} /* namespace cli */
33
Definition: CastsIntrospectionCommand.h:16
CastsIntrospectionCommand(std::unique_ptr< cli::Arg > param, bool from, bool to)
Definition: CastsIntrospectionCommand.h:26
CommandResult run(Environment &environment) const override
Definition: CastsIntrospectionCommand.cpp:31
Definition: Command.h:14
Definition: Environment.h:29
Class extending the list class from the standard library. Original reason is to allow printing of the...
Definition: list.hpp:44
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
Definition: Arg.h:11
CommandResult
Definition: CommandResult.h:10
Definition: FordFulkerson.hpp:16