|
wxMaxima
|
Declares the parser for the <variables> XML documents Maxima sends. More...
#include <wx/string.h>#include <wx/xml/xml.h>#include <vector>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< MaximaVariableUpdate > | ParseMaximaVariableUpdates (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. | |
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.
| 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.
| 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.