|
Milo
0.1
Milo:EquationManipulationProgram
|
#include <milo.h>


Public Member Functions | |
Constructor and Virtual Destructor | |
| Input (Parser &p, Node *parent=nullptr) | |
| Input (Equation &eqn, std::string txt=std::string(), bool current=true, Node *parent=nullptr, bool neg=false, Node::Select s=Node::Select::NONE) | |
| Input (EqnXMLParser &in, Node *parent) | |
| ~Input () | |
| Virtual desctructor. | |
Virtual Public Member Functions | |
| std::string | toString () const |
| int | numFactors () const |
| const std::string & | getName () const |
| std::type_index | getType () const |
Helper Public Member functions | |
| bool | empty () const |
| void | add (char ch) |
| void | add (const std::string &s) |
| void | remove () |
| void | clear () |
| const std::string & | getBuffer () |
| bool | checkSN (int sn) |
| bool | getCurrent () |
| void | setCurrent (bool current) |
| void | makeCurrent () |
| FactorIterator | emptyBuffer () |
| bool | unremovable () |
Public Member Functions inherited from Node | |
| void | calculateSize (UI::Graphics &gc) |
| void | out (XML::Stream &xml) |
| void | calculateOrigin (UI::Graphics &gc, int x, int y) |
| void | setUpDraw (UI::Graphics &gc) |
| void | draw (UI::Graphics &gc) const |
| void | setSelect (Select s) |
| Select | getSelect () const |
| void | setDrawParenthesis (bool fDrawPar) |
| bool | getDrawParenthesis () const |
| const Frame & | getFrame () const |
| Node * | first () |
| Node * | last () |
| Node * | getNextLeft () |
| Node * | getNextRight () |
| void | setParent (Node *parent) |
| Node * | getParent () const |
| int | getDepth () const |
| int | getNth () const |
| void | addNth (int n) |
| void | multNth (int n) |
| void | setNth (int n) |
| void | negative () |
| bool | getSign () const |
| Complex | getValue () const |
| std::shared_ptr< Node > | getSharedPtr () |
| Node (Node *parent=nullptr, bool fNeg=false, Select s=NONE) | |
| Node (EqnXMLParser &in, Node *parent) | |
| virtual | ~Node () |
| Abstract base class needs virtual desctructor. | |
| virtual bool | isLeaf () const |
| virtual bool | isFactor () const |
| virtual Node * | findNode (int x, int y) |
| virtual Node * | findNode (const Box &b) |
| virtual void | normalize () |
| virtual bool | simplify () |
| virtual bool | less (NodePtr b) const |
Static Public Member Functions | |
| static Input * | parse (Parser &p, Node *parent=nullptr) |
Static Public Member Functions inherited from Node | |
| static bool | createNodeByName (std::string name, Equation &eqn) |
Static Public Attributes | |
| static const std::string | name = "input" |
| Name of Input class. | |
| static const std::type_index | type = typeid(Input) |
| Type of Input class. | |
Static Public Attributes inherited from Node | |
| static const std::vector< std::string > | select_tags = { "NONE", "START", "END", "ALL" } |
Private Member Functions | |
Virtual Private Member Functions | |
| Frame | calcSize (UI::Graphics &gc) |
| void | calcOrig (UI::Graphics &gc, int x, int y) |
| void | drawNode (UI::Graphics &gc) const |
| Complex | getNodeValue () const |
| void | xml_out (XML::Stream &xml) const |
Private Attributes | |
| int | m_sn |
| Unique serial number of Input class. | |
| std::string | m_typed |
| Stored type characters from keyboard. | |
| bool | m_current |
| True if current active Input class object. | |
| Equation & | m_eqn |
| Equation class object containing this input node. | |
| Box | m_internal |
| Bounding box of Input node. | |
Static Private Attributes | |
| static int | input_sn = -1 |
| Serial number of last created Input node. | |
Additional Inherited Members | |
Public Types inherited from Node | |
| enum | Select { NONE, START, END, ALL } |
Take input from keyboard and display it on screen. Usually just holds a string of letters and numbers representing a term.
Constructor using a text parser for input.
| p | Input parser. |
| parent | Parent of this input node. |
| Input::Input | ( | Equation & | eqn, |
| std::string | txt = std::string(), |
||
| bool | current = true, |
||
| Node * | parent = nullptr, |
||
| bool | neg = false, |
||
| Node::Select | s = Node::Select::NONE |
||
| ) |
Constructor directly taking all needed parameters.
| eqn | Equation holding this input. |
| txt | Text stored from keyboard. |
| current | True if active. |
| parent | Parent node. |
| neg | True if negative sign. |
| s | Selection state. |
| Input::Input | ( | EqnXMLParser & | in, |
| Node * | parent | ||
| ) |
Constructor using xml for input
| in | XML input stream. |
| parent | Parent of this input node. |
|
inline |
Add charactor to end of input buffer.
| ch | Character to add to end of buffer. |
|
inline |
Add string to end of input buffer.
| s | String to add to end of buffer. |
|
privatevirtual |
Calculate origin of this node offset from the point (x,y) given it.
| gc | Graphics context. |
| x | Horizontal origin. |
| y | Vertical origin. |
Implements Node.
|
privatevirtual |
Calculate size of this node in given graphics context.
| gc | Graphics context. |
Implements Node.
|
inline |
Check if serial number matches this node.
| sn | Serial number to check. |
|
inline |
Clear input buffer.
|
privatevirtual |
|
inline |
Check if input buffer is empty.
| FactorIterator Input::emptyBuffer | ( | ) |
|
inline |
Get input buffer.
|
inline |
Get state of this node being the active input.
|
inlinevirtual |
|
privatevirtual |
|
inlinevirtual |
|
inline |
Make this node the current input.
|
inlinevirtual |
|
inline |
Remove character from end of input buffer.
|
inline |
Set state of this node being the active input.
| current | True, if current active input. |
|
virtual |
Output text repesentation of input node. If empty output a '?' or a '#' if active. Otherwise '[typed_text]'.
Implements Node.
|
inline |
Determine if input is to be removed when deactivated. Input nodes that are empy and the only factor in their term should not be removed when deactivated. All others are.
|
privatevirtual |
1.8.11