#include <command_line_program.h>
Public Member Functions | |
void | create_process (cstring name) |
start a process having the given name. | |
void | terminate_threads () |
join the watching threads, which implicitly reads all the remaing readable pipe data. | |
void | write_line (cstring s) |
give a command to the program. | |
string | read () |
read from the program's output buffer. | |
string | read_error () |
read from the programs error buffer; | |
bool | process_is_dead () |
tell us if the command line process is still active. | |
void | finish () |
wait for the process to complete, then terminate the threads. | |
Public Attributes | |
bool & | seperate_std_error |
determimes whether or not STD_ERROR should be watched seperatly from STD_OUT. | |
bool & | writeable |
a boolean that controls whether or not we can write to the stdin of the given process. |
mostly, i'm hiding the CommandLineProgram implemenation class because i'd prefer not to expose the boost theading header files, they take a while to process, and generate a lot of garbage warnings in msvc, and i'd rather not to have them included in every source file that uses this command line program struct.
Definition at line 34 of file command_line_program.h.
|
wait for the process to complete, then terminate the threads. after finish has been called, the output of read() is gauranteed to be the completation of the processes output. Definition at line 690 of file command_line_program.cpp. |
|
join the watching threads, which implicitly reads all the remaing readable pipe data. then cleanup the pipe handles. Definition at line 692 of file command_line_program.cpp. |
|
a boolean that controls whether or not we can write to the stdin of the given process. defaults to true. Definition at line 90 of file command_line_program.h. |