Jpp test-rotations-old
the software that should make you happy
|
The JShell clas can be used to interact with the shell via I/O streams. More...
#include <JShell.hh>
Public Member Functions | |
JShell (const std::size_t size=65536) | |
Constructor. | |
~JShell () | |
Destructor. | |
const std::string & | getPrompt () const |
Get prompt. | |
template<class T > | |
bool | get (T &value) |
Get value. | |
bool | getline (std::string &buffer, const char eol='\n') |
Get line of text. | |
JShell & | flush (std::ostream &out=null) |
Extracts characters from this shell and flush them to the given output stream until the prompt is read. | |
virtual bool | getStatus () const override |
Get status of this shell. | |
void | exit () |
Exit this shell. | |
JFileInputStreamBuffer * | getInputStreamBuffer (const std::size_t size=65536) |
Get pointer to input stream buffer connected to the normal output stream. | |
JFileInputStreamBuffer * | getErrorStreamBuffer (const std::size_t size=65536) |
Get pointer to input stream buffer connected to the error output stream. | |
JFileOutputStreamBuffer * | getOutputStreamBuffer (const std::size_t size=65536) |
Get pointer to output stream buffer connected to the normal input stream. | |
operator bool () const | |
Type conversion operator. | |
bool | operator! () const |
Negated status of this object. | |
Static Public Member Functions | |
static JShell & | getInstance () |
Get reference to unique instance of this class object. | |
Protected Types | |
typedef traits_type::int_type | int_type |
typedef traits_type::int_type | int_type |
typedef std::streamsize | streamsize |
Protected Member Functions | |
void | execute (const char *path, const char *arg0, const char *arg1=(char *) NULL, const char *arg2=(char *) NULL, const char *arg3=(char *) NULL, const char *arg4=(char *) NULL, const char *arg5=(char *) NULL, const char *arg6=(char *) NULL, const char *arg7=(char *) NULL, const char *arg8=(char *) NULL, const char *arg9=(char *) NULL) |
Execute command. | |
virtual int_type | underflow () override |
Check underflow. | |
bool | in_avail (JTimeval timeout=JTimeval::min()) const |
Check availability of input. | |
virtual int_type | overflow (int_type c) override |
Check overflow. | |
virtual int | sync () override |
Synchronise buffer. | |
bool | out_avail (JTimeval timeout=JTimeval::min()) const |
Check availability of output. | |
int | flush () |
Flush internal buffer. | |
Protected Attributes | |
std::string | prompt |
int | out |
int | err |
int | in |
JFile | in |
std::size_t | memory |
JFile | out |
Private Member Functions | |
JShell (const JShell &) | |
JShell (JShell &&) | |
JShell & | operator= (const JShell &) |
JShell & | operator= (JShell &&) |
Private Attributes | |
JFileInputStreamBuffer * | gOut |
JFileInputStreamBuffer * | gErr |
JFileOutputStreamBuffer * | gIn |
The JShell clas can be used to interact with the shell via I/O streams.
|
inherited |
Definition at line 32 of file JFileStreamBuffer.hh.
|
inherited |
Definition at line 121 of file JFileStreamBuffer.hh.
|
inherited |
Definition at line 122 of file JFileStreamBuffer.hh.
|
inline |
Constructor.
size | size of internal buffer |
Definition at line 47 of file JShell.hh.
|
inline |
Destructor.
|
private |
|
private |
|
inlinestatic |
|
inline |
|
inline |
Get value.
Note that
value | value |
|
inline |
Get line of text.
Extracts characters from this shell and stores them into the given buffer until the end of line character is found or the prompt is read.
buffer | buffer |
eol | end of line character |
Definition at line 137 of file JShell.hh.
|
inline |
Extracts characters from this shell and flush them to the given output stream until the prompt is read.
out | output stream |
Definition at line 184 of file JShell.hh.
|
inlineoverridevirtual |
Get status of this shell.
Implements JLANG::JAbstractObjectStatus.
Definition at line 201 of file JShell.hh.
|
inline |
|
inlineinherited |
Get pointer to input stream buffer connected to the normal output stream.
size | size of internal buffers |
Definition at line 86 of file JProcess.hh.
|
inlineinherited |
Get pointer to input stream buffer connected to the error output stream.
size | size of internal buffers |
Definition at line 102 of file JProcess.hh.
|
inlineinherited |
Get pointer to output stream buffer connected to the normal input stream.
size | size of internal buffers |
Definition at line 118 of file JProcess.hh.
|
inlineprotectedinherited |
Execute command.
path | path |
arg0 | comma separted argument list |
arg1 | comma separted argument list |
arg2 | comma separted argument list |
arg3 | comma separted argument list |
arg4 | comma separted argument list |
arg5 | comma separted argument list |
arg6 | comma separted argument list |
arg7 | comma separted argument list |
arg8 | comma separted argument list |
arg9 | comma separted argument list |
Definition at line 143 of file JProcess.hh.
|
inlineoverridevirtualinherited |
Check underflow.
This method reads as many bytes as possible.
Definition at line 60 of file JFileStreamBuffer.hh.
|
inlineinherited |
Check availability of input.
This method returns true if at least one byte can be read without blocking.
timeout | timeout |
Definition at line 94 of file JFileStreamBuffer.hh.
|
inlineoverridevirtualinherited |
Check overflow.
This method writes one byte if possible.
c | character |
Definition at line 159 of file JFileStreamBuffer.hh.
|
inlineoverridevirtualinherited |
Synchronise buffer.
Definition at line 179 of file JFileStreamBuffer.hh.
|
inlineinherited |
Check availability of output.
This method returns true if at least one byte can be written without blocking.
timeout | timeout |
Definition at line 195 of file JFileStreamBuffer.hh.
|
inlineprotectedinherited |
Flush internal buffer.
Definition at line 204 of file JFileStreamBuffer.hh.
|
inlineinherited |
Type conversion operator.
Definition at line 33 of file JAbstractObjectStatus.hh.
|
inlineinherited |
Negated status of this object.
Definition at line 44 of file JAbstractObjectStatus.hh.
|
protectedinherited |
Definition at line 202 of file JProcess.hh.
|
protectedinherited |
Definition at line 203 of file JProcess.hh.
|
protectedinherited |
Definition at line 204 of file JProcess.hh.
|
privateinherited |
Definition at line 207 of file JProcess.hh.
|
privateinherited |
Definition at line 208 of file JProcess.hh.
|
privateinherited |
Definition at line 209 of file JProcess.hh.
|
protectedinherited |
Definition at line 100 of file JFileStreamBuffer.hh.
|
protectedinherited |
Definition at line 101 of file JFileStreamBuffer.hh.
|
protectedinherited |
Definition at line 221 of file JFileStreamBuffer.hh.