wxMaxima
Public Member Functions | List of all members
Maxima Class Reference

#include <Maxima.h>

Inheritance diagram for Maxima:
Inheritance graph
[legend]
Collaboration diagram for Maxima:
Collaboration graph
[legend]

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 ()
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ Maxima()

Maxima::Maxima ( wxSocketBase *  socket)
explicit

Construct this object when a connection is received from Maxima. The argument should be socketServer.Accept();

Member Function Documentation

◆ ClearFirstPrompt()

void Maxima::ClearFirstPrompt ( )
inline

Clear the first prompt state, based on what was read from maxima. This is called from prompt recognizer code in the wxMaxima class.

◆ ReadSocket()

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.

◆ Write()

bool Maxima::Write ( const void *  buffer,
size_t  length 
)

Write more data to be sent to maxima.

Parameters
bufferis the data's location, can be null if length is zero
lengthis 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.
Returns
true if writing was attempted, false if there's nothing else left to send.

The documentation for this class was generated from the following files: