wxMaxima
Loading...
Searching...
No Matches
Data Structures | Functions
MaximaVariableUpdates.h File Reference

Declares the parser for the <variables> XML documents Maxima sends. More...

#include <wx/string.h>
#include <wx/xml/xml.h>
#include <vector>
Include dependency graph for MaximaVariableUpdates.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MaximaVariableUpdate
 One variable update from a <variables> document Maxima sent. More...
 

Functions

std::vector< MaximaVariableUpdateParseMaximaVariableUpdates (const wxXmlDocument &xmldoc)
 Parses a <variables> XML document Maxima sent into a list of updates.
 
std::vector< wxString > ParseWatchVariableAdditions (const wxXmlDocument &xmldoc)
 Parses the <watch_variables_add> XML document Maxima sends into the list of variable names to add to the watch list.
 

Detailed Description

Declares the parser for the <variables> XML documents Maxima sends.

First step of extracting wxMaxima's Maxima-XML-response handling (the Read* method cluster) out of the wxMaxima god class: the pure XML -> data-structure parsing lives here, GUI-free and unit-testable; wxMaxima::ReadVariables() only iterates the parsed updates and dispatches them to the GUI and the variable-action handlers.

Function Documentation

◆ ParseMaximaVariableUpdates()

std::vector< MaximaVariableUpdate > ParseMaximaVariableUpdates ( const wxXmlDocument &  xmldoc)

Parses a <variables> XML document Maxima sent into a list of updates.

Returns one entry per <variable> element that contains a <name>. An entry is bound if the element also contains a non-empty

node.

The document's validity (wxXmlDocument::IsOk()) is the caller's responsibility; an invalid or empty document yields an empty list.

◆ ParseWatchVariableAdditions()

std::vector< wxString > ParseWatchVariableAdditions ( const wxXmlDocument &  xmldoc)

Parses the <watch_variables_add> XML document Maxima sends into the list of variable names to add to the watch list.

Unlike the <variables> document above, each <variable> element here holds the variable's name directly as its text content.

The document's validity (wxXmlDocument::IsOk()) is the caller's responsibility; an invalid or empty document yields an empty list.