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


Public Member Functions | |
| ExpressionPtr | getFirstExpression () |
| ExpressionPtr | getSecondExpression () |
Constructor and Virtual Destructor | |
| Binary (char op, Node *one, Node *two, Node *parent, bool neg, Node::Select s) | |
| Binary (EqnXMLParser &in, Node *parent) | |
| virtual | ~Binary () |
Virtual Public Member Functions | |
| std::string | toString () const |
| bool | isLeaf () const |
| Node * | findNode (int x, int y) |
| Node * | findNode (const Box &b) |
| int | numFactors () const |
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 | isFactor () const |
| virtual void | normalize () |
| virtual bool | simplify () |
| virtual bool | less (NodePtr b) const |
| virtual const std::string & | getName () const =0 |
| virtual std::type_index | getType () const =0 |
Static Public Member Functions | |
| static Node * | parse (Parser &p, Node *one, Node *parent) |
Static Public Member Functions inherited from Node | |
| static bool | createNodeByName (std::string name, Equation &eqn) |
Protected Attributes | |
| char | m_op |
| Character repesentation of operator. | |
| NodePtr | m_first |
| First expression owned by this object. | |
| NodePtr | m_second |
| Second expression owned by this object. | |
| Box | m_internal |
| Bounding box of this node. | |
Private Member Functions | |
Virtual Private Member Functions | |
| Node * | downLeft () |
| Node * | downRight () |
| Node * | getLeftSibling (Node *node) |
| Node * | getRightSibling (Node *node) |
| void | xml_out (XML::Stream &xml) const |
Additional Inherited Members | |
Public Types inherited from Node | |
| enum | Select { NONE, START, END, ALL } |
Static Public Attributes inherited from Node | |
| static const std::vector< std::string > | select_tags = { "NONE", "START", "END", "ALL" } |
Base class for nodes represent an operator that contains two expressions. Not all pure virtual functions are overriden so is an abstract base class.
|
inline |
Constructor for Binary class.
| op | Character representing operator. |
| one | First expression. |
| two | Second expression. |
| parent | Parent node. |
| neg | If true, node is negative. |
| s | Selection state of node. |
| Binary::Binary | ( | EqnXMLParser & | in, |
| Node * | parent | ||
| ) |
|
inlinevirtual |
Virtual desctructor. Abstract base class needs virtual desctructor.
|
inlineprivatevirtual |
|
inlineprivatevirtual |
|
virtual |
Rescursive search to find deepest node at point (x,y).
| x | horizontal coordinate. |
| y | vertical coordinate. |
Reimplemented from Node.
Recursive function to return first node from a top to bottom search whose frame is inside Box b.
| b | Bounding box. |
Reimplemented from Node.
| ExpressionPtr Binary::getFirstExpression | ( | ) |
Get first expression of this node.
Left sibiling of given node. If node given is right node, return left node.
| node | Reference node. |
Reimplemented from Node.
Right sibiling of given node. If node given is left node, return right node.
| node | Reference node. |
Reimplemented from Node.
| ExpressionPtr Binary::getSecondExpression | ( | ) |
Get second expression of this node.
|
inlinevirtual |
Override for isLeaf virtual function.
Reimplemented from Node.
|
inlinevirtual |
Get number of factor in this subtree.
Reimplemented from Node.
|
inlinevirtual |
|
privatevirtual |
1.8.11