![]() |
wxMaxima
|
#include <Maxima.h>
Public Member Functions | |
Maxima (wxSocketBase *socket) | |
wxSocketBase * | Socket () const |
bool | IsConnected () const |
void | SetPipeToStdOut (bool pipe) |
bool | Write (const void *buffer, size_t length) |
void | ReadSocket () |
void | ClearFirstPrompt () |
Interface to the Maxima process
Eventually this class will be the entire stand-alone Maxima interface, factored out from wxMaxima. For now, it only provides socket I/O.
It is a source of EVT_MAXIMA events, used to asynchronously decouple the I/O from the front-end. In the future, this class could run on a worker thread perhaps (after it'd do more work in string processing).
|
explicit |
Construct this object when a connection is received from Maxima. The argument should be socketServer.Accept();
|
inline |
Clear the first prompt state, based on what was read from maxima. This is called from prompt recognizer code in the wxMaxima class.
void Maxima::ReadSocket | ( | ) |
Read whatever data is in the socket. This is normally handled by the event handler, but can be called manually to poll for data. Ideally, this should be private.
bool Maxima::Write | ( | const void * | buffer, |
size_t | length | ||
) |
Write more data to be sent to maxima.
buffer | is the data's location, can be null if length is zero |
length | is number of bytes to be written, can be zero to resume sending any data still in the transmit buffer but unsent. This is done from the event handler and doesn't have to be cared for by the user. |