28 #if ! defined (octave_input_h)
29 #define octave_input_h 1
31 #include "octave-config.h"
37 #include <unordered_map>
69 std::string
PS1 ()
const {
return m_PS1; }
71 std::string
PS1 (
const std::string& s)
73 std::string val = m_PS1;
78 void set_PS1 (
const std::string& s) { m_PS1 = s; }
82 std::string
PS2 ()
const {
return m_PS2; }
84 std::string
PS2 (
const std::string& s)
86 std::string val = m_PS2;
91 void set_PS2 (
const std::string& s) { m_PS2 = s; }
95 return m_last_debugging_command;
100 std::string val = m_last_debugging_command;
101 m_last_debugging_command = s;
110 return m_completion_append_char;
115 char val = m_completion_append_char;
116 m_completion_append_char = c;
128 bool val = m_gud_mode;
141 std::string val = m_mfile_encoding;
142 m_mfile_encoding = s;
157 return m_auto_repeat_debug_command;
162 bool old_val = m_auto_repeat_debug_command;
163 m_auto_repeat_debug_command = val;
196 char m_completion_append_char;
202 std::string m_mfile_encoding;
205 std::unordered_map<std::string, std::string> m_dir_encoding;
208 bool m_auto_repeat_debug_command;
213 std::string m_last_debugging_command;
219 std::string gnu_readline (
const std::string& s,
bool& eof)
const;
236 virtual std::
string get_input (const std::
string& prompt,
bool& eof) = 0;
254 static const std::string s_in_src;
273 std::
string get_input (const std::
string& prompt,
bool& eof)
275 return m_rep->get_input (prompt, eof);
280 return m_rep->input_source ();
285 return m_rep->input_from_terminal ();
290 return m_rep->input_from_file ();
295 return m_rep->input_from_eval_string ();
300 std::shared_ptr<base_reader> m_rep;
303 OCTAVE_END_NAMESPACE(
octave)
virtual std::string input_source() const
std::string octave_gets(const std::string &prompt, bool &eof)
base_reader(interpreter &interp)
virtual std::string get_input(const std::string &prompt, bool &eof)=0
virtual bool input_from_terminal() const
virtual bool input_from_eval_string() const
interpreter & m_interpreter
virtual bool input_from_file() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn