Go to the documentation of this file.
35 #ifndef TTA_EDIT_LINE_READER_HH
36 #define TTA_EDIT_LINE_READER_HH
59 std::string defPrompt =
"",
65 std::string question, std::string allowedChars,
66 bool caseSensitive =
false,
char defaultAnswer =
'\0');
70 typedef std::map<EditLine*, EditLineReader*>::value_type
ValType;
72 typedef std::map<EditLine*, EditLineReader*>::iterator
MapIt;
std::string program_
The name of the invocating program.
virtual void initialize(std::string defPrompt="", FILE *in=stdin, FILE *out=stdout, FILE *err=stderr)
History * history_
History instance.
void updateHistory(const char *c)
EditLine * editLine_
EditLine instance.
EditLineReader & operator=(const EditLineReader &)
Assignment not allowed.
std::map< EditLine *, EditLineReader * >::value_type ValType
value_type for map.
static char * wrapperToCallPrompt(EditLine *edit)
std::map< EditLine *, EditLineReader * >::iterator MapIt
Iterator for map.
virtual std::string readLine(std::string prompt="")
FILE * in_
Input stream is saved for end-of-file checking.
virtual ~EditLineReader()
EditLineReader(std::string program="")
char * prompt_
Line reader prompt.
find Finds info of the inner loops in the program
virtual char charQuestion(std::string question, std::string allowedChars, bool caseSensitive=false, char defaultAnswer='\0')
static std::map< EditLine *, EditLineReader * > lineReaders_
Map containing all (EditLine*, EditLineReader*) pairs to make prompt printing possible....