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


Static Public Member Functions | |
| static void | swap (FactorIterator &a, FactorIterator &b) |
Private Member Functions | |
| void | next () |
| Get next factor in expression. | |
| void | prev () |
| Get previous factor in expression. | |
Private Attributes | |
| Node * | m_node |
| Current factor. | |
| Term * | m_pTerm |
| Parent term of current factor. | |
| Expression * | m_gpExpr |
| Grandparent expresson of current factor. | |
| unsigned int | m_factor_index |
| Index of current factor in parent term. | |
| unsigned int | m_term_index |
| Term index of current factor in grandparent expression. | |
Iteratorate over every factor in an expression. The precedence is the first factor in the first termn to the last factor in the last term.
| FactorIterator::FactorIterator | ( | Node * | node | ) |
Constructor for FactorIterator class. Initialize the current node this iterator points to.
| node | New current node. |
|
inline |
Constructor for FactorIterator class from NodeIterator. Initialize the current node this iterator points to from NodeIterator.
| n | New current node. |
| FactorIterator::FactorIterator | ( | Expression * | expr | ) |
Constructor for FactorIterator class from Expression object. Initialize the current node this iterator points to from first factor in Expression.
| expr | New cucrrent node from first factor of expr. |
| void FactorIterator::erase | ( | ) |
Erase factor pointed to by iterator. Erase current node leaving iterator pointing to next factor.
| void FactorIterator::erase | ( | const FactorIterator & | end | ) |
Erase all nodes to given iterator. Starting with this iterators node to node pointed to by given iterator is erased. Iterator will be left pointing to next iterator.
| end | Final node to be erased. |
|
inline |
Get iterator pointing to first factor in the expression of this FactorIterator.
|
inline |
Get iterator pointing to last factor in the expression of this FactorIterator.
| void FactorIterator::insert | ( | Node * | node | ) |
Insert node before factor pointed to by this iterator. After insertion this iterator will point to new node.
| node | Factor to be inserted. |
| void FactorIterator::insert | ( | Term * | node, |
| bool | sign = true |
||
| ) |
Insert term before the parent term of the current factor.
| node | Term to be inserted. |
| sign | Sign of term. |
| void FactorIterator::insertAfter | ( | Node * | node | ) |
Insert node after factor pointed to by this iterator. After insertion this iterator will point to new node. If iterator is end, exception thrown.
| node | Factor to be inserted. |
| void FactorIterator::insertAfter | ( | Term * | term, |
| bool | sign = true |
||
| ) |
Insert term after the parent term of the current factor.
| term | Term to be inserted. |
| sign | Sign of term. |
|
inline |
Check if current factor is first in its grandparent expresion.
|
inline |
Check if current factor is first in its parent term.
|
inline |
Check if current factor is last in its grandparent expresion.
| bool FactorIterator::isEndTerm | ( | ) |
Check if current factor is last in its parent term.
| void FactorIterator::mergeNextTerm | ( | ) |
Merge term pointed to by this iterator with next term if it exists.
|
inline |
Overloaded not equal operator.
| rhs | Node to be compared. |
|
inline |
Overloaded dereference operator.
|
inline |
Overloaded postfix increment operator.
|
inline |
Overloaded prefix increment operator. This NodeIterator object will be decremented. Return an object with old iterator value.
|
inline |
Overloaded postfix decrement operator.
|
inline |
Overloaded prefix decrement operator. This NodeIterator object will be decremented. Return an object with old iterator value.
|
inline |
Overloaded member function operator. Returns pointer to current node to access member functions.
| bool FactorIterator::operator< | ( | const FactorIterator & | rhs | ) |
Overloaded lesser operator.
| rhs | Node to be compared |
| bool FactorIterator::operator<= | ( | const FactorIterator & | rhs | ) |
Overloaded lesser or equal operator.
| rhs | Node to be compared |
|
inline |
Overloaded equal operator.
| rhs | Node to be compared. |
| bool FactorIterator::operator> | ( | const FactorIterator & | rhs | ) |
Overloaded greater operator.
| rhs | Node to be compared |
| bool FactorIterator::operator>= | ( | const FactorIterator & | rhs | ) |
Overloaded greater or equal operator.
| rhs | Node to be compared |
| void FactorIterator::replace | ( | Term * | term | ) |
Replace the parent term of factor pointed to by iterator with new term.
| term | Term to replace factor's parent term pointed to by iterator. |
| void FactorIterator::replace | ( | Node * | node | ) |
Replace factor pointed to by iterator with node.
| node | Node to replace factor pointed to by iterator. |
| void FactorIterator::setNode | ( | int | factor, |
| int | term | ||
| ) |
Point iterator to a specific factor in a specific term.
| factor | Index of factor in term. |
| term | Index of term in expression. |
| Term * FactorIterator::splitTerm | ( | bool | fNeg = false | ) |
Split current term at factor pointed to by this iterator.
| fNeg | If true, term is negative. |
1.8.11