LineInput

Files CCore/inc/LineInput.h CCore/src/LineInput.cpp

LineInput is a simple console input class. It reads command lines from a console and implements a simple line edition.


template <class ReadCon,ulen MaxLen=80>
class LineInput : NoCopy
 {
   ....

  public:
  
   template <class ... SS>
   explicit LineInput(SS && ... ss);
   
   ~LineInput() {}
   
   PtrLen<const char> get();
   
   bool get(TimeScope time_scope,PtrLen<const char> &ret);
 };

ReadCon is a console reader class. LineInput constructor forwards arguments to the inner ReadCon object.

get() inputs a command line. The line is entered by pressing the key Enter. Backslash key can be used to edit the input.

The second method get() is a timed variant. Both methods return a range of characters from the internal buffer.