#include <disassembly.h>


Public Member Functions | |
| separationInfo_c (xmlParser_c &pars) | |
| load separationInfo from parser | |
| separationInfo_c (const separation_c *sep) | |
| create a separation infor from a normal separation | |
| void | save (xmlWriter_c &xml) const |
| save into an xml node | |
| virtual unsigned int | sumMoves (void) const |
| the number of moves to completely disassemble the puzzle, including all sub separations | |
| virtual void | movesText (char *txt, int len) const |
| fill a string with dot separated numbers containing the moves required to disassemble the puzzle not more than len characters are written | |
| virtual unsigned int | getSequenceLength (unsigned int x) const |
| helper function used for "compare" to get the number of moves for the x-th place in the string | |
| virtual unsigned int | getNumSequences (void) const |
| helper function used for "compare" to get the number of move sequences | |
Private Member Functions | |
| bool | containsMultiMoves (unsigned int root) const |
| used in movesText to find out if a branch has a movesequence longer than 1 | |
| void | recursiveConstruction (const separation_c *sep) |
| used in constructor for create separationInfo from normal separation | |
| int | movesText2 (char *txt, int len, unsigned int idx) const |
| separationInfo_c (const separationInfo_c &) | |
| void | operator= (const separationInfo_c &) |
Private Attributes | |
| std::vector< unsigned int > | values |
| this array contains the whole disassembly tree in prefix order, root, left, removed. | |
it is used as a memory efficient replacement for the basic information in separation_c without the detailed disassembly instructions
| separationInfo_c::separationInfo_c | ( | xmlParser_c & | pars | ) |
load separationInfo from parser
References xmlParser_c::END_TAG, xmlParser_c::exception(), xmlParser_c::getText(), xmlParser_c::next(), xmlParser_c::require(), xmlParser_c::START_TAG, xmlParser_c::TEXT, and values.
| separationInfo_c::separationInfo_c | ( | const separation_c * | sep | ) |
| separationInfo_c::separationInfo_c | ( | const separationInfo_c & | ) | [private] |
| bool separationInfo_c::containsMultiMoves | ( | unsigned int | root | ) | const [private] |
used in movesText to find out if a branch has a movesequence longer than 1
References values.
Referenced by movesText2().
| unsigned int separationInfo_c::getNumSequences | ( | void | ) | const [virtual] |
helper function used for "compare" to get the number of move sequences
Implements disassembly_c.
References values.
| unsigned int separationInfo_c::getSequenceLength | ( | unsigned int | x | ) | const [virtual] |
helper function used for "compare" to get the number of moves for the x-th place in the string
Implements disassembly_c.
References values.
| virtual void separationInfo_c::movesText | ( | char * | txt, | |
| int | len | |||
| ) | const [inline, virtual] |
fill a string with dot separated numbers containing the moves required to disassemble the puzzle not more than len characters are written
Implements disassembly_c.
References movesText2().
| int separationInfo_c::movesText2 | ( | char * | txt, | |
| int | len, | |||
| unsigned int | idx | |||
| ) | const [private] |
| void separationInfo_c::operator= | ( | const separationInfo_c & | ) | [private] |
| void separationInfo_c::recursiveConstruction | ( | const separation_c * | sep | ) | [private] |
used in constructor for create separationInfo from normal separation
References separation_c::getLeft(), separation_c::getMoves(), separation_c::getRemoved(), and values.
Referenced by separationInfo_c().
| void separationInfo_c::save | ( | xmlWriter_c & | xml | ) | const |
save into an xml node
References xmlWriter_c::addContent(), xmlWriter_c::endTag(), xmlWriter_c::newTag(), and values.
Referenced by solution_c::save().
| unsigned int separationInfo_c::sumMoves | ( | void | ) | const [virtual] |
the number of moves to completely disassemble the puzzle, including all sub separations
Implements disassembly_c.
References values.
std::vector<unsigned int> separationInfo_c::values [private] |
this array contains the whole disassembly tree in prefix order, root, left, removed.
When a certain subtree is empty a zero is included, otherwise the number is the number of states within this tree node
example:
3 2 1 0 0 0 0 tree root 3 --> 2 --> 1 another example
3 1 1 0 0 0 1 1 0 0 0 tree root 3 --> 1 --> 1
\--> 1 --> 1 Referenced by containsMultiMoves(), getNumSequences(), getSequenceLength(), movesText2(), recursiveConstruction(), save(), separationInfo_c(), and sumMoves().
1.5.8