Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
StringLineInterface.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <string>
9#include <utility>
10
12
13namespace cli {
14
16 std::string m_string;
17
18 bool readline ( std::string & line, bool ) override {
19 if ( m_string.empty ( ) )
20 return false;
21
22 line = std::exchange ( m_string, "" );
23 return true;
24 }
25
26public:
27 StringLineInterface ( std::string string ) : m_string ( std::move ( string ) ) {
28 }
29};
30
31} // namespace cli
32
Definition: LineInterface.h:15
Definition: StringLineInterface.h:15
StringLineInterface(std::string string)
Definition: StringLineInterface.h:27
Definition: Arg.h:11
Definition: FordFulkerson.hpp:16
Definition: RandomStringFactory.cpp:12