
#include <msmazes/core/pattern/base.hpp>
BasePattern. This class template handles common initialization tasks and implements most of the associated types and functions specified in the Pattern concept.
| Parameter | Description | Default |
|---|---|---|
EdgeDirectedSelector | The type that will represent whether the edges in the underlying graph are undirected (in which case this type is boost::undirectedS), directed (in which case this type is boost::directedS), or bidirectional (in which case this type is boost::bidirectionalS). | |
CellType | The type of the objects that will be connected together. | |
CellEqualityPolicyType | The type of the function object that will determine equality between any two cells in this BasePattern. | |
DirectionType | The type that will represent the course or bearing that is followed when traversing an edge in the underlying graph. | |
CellContainer | The type of the container that will store the cells. | std::vector <CellType> |
EdgeDirectedSelector must be either boost::undirectedS, boost::directedS, or boost::bidirectionalS. CellEqualityPolicyType must be a Binary Predicate that accepts CellType as both argument types. DirectionType must be Default Constructible. CellContainerType must be a Random Access Container whose value type is the same as CellType.
Public Types | |
| typedef implementation_defined | Cell |
| typedef implementation_defined | CellEqualityPolicy |
| typedef implementation_defined | Graph |
| typedef implementation_defined | CellIndex |
| typedef implementation_defined | EdgeDirectedCategory |
| typedef implementation_defined | Direction |
Public Member Functions | |
| virtual | ~BasePattern () |
| The destructor. | |
| const Graph & | getGraph () const |
| CellIndex | getCellCount () const |
| const Cell & | getCell (const CellIndex index) const |
| virtual const Cell & | getEntranceCell () const =0 |
| virtual const Cell & | getSourceCell () const =0 |
| virtual const Cell & | getTargetCell () const =0 |
| virtual const Cell & | getExitCell () const =0 |
| Direction | getEdgeDirection (const CellIndex source_index, const CellIndex target_index) const |
Protected Member Functions | |
| BasePattern () | |
| The default constructor. | |
| template<typename PatternFormer, typename ArgumentPack> | |
| void | initializeWithPatternFormer (const PatternFormer &pattern_former, const ArgumentPack &p) |
| virtual Direction | getEdgeDirectionDerived (const Cell &source, const Cell &target) const |
|
|
The type of the objects to be connected together, as defined in the Pattern concept. |
|
|
The type of the function object that determines equality between any two cells, as defined in the Pattern concept. |
|
|
The type of the underlying object that represents the manner in which the cells are connected together, as defined in the Pattern concept. |
|
|
An unsigned integral type for representing either the index of a cell or the number of such cells, as defined in the Pattern concept. |
|
|
The type that represents whether the edges in the underlying graph are undirected, directed, or bidirectional, as defined in the Pattern concept. |
|
|
A type for representing the course or bearing that is followed when traversing an edge in the underlying graph, as defined in the Pattern concept. |
|
|
Because the |
|
|
Destroys this |
|
||||||||||||||||
|
Constructs the cells and their connections in this
|
|
|
Returns a const reference to the underlying object that represents the manner in which the cells are connected together in this |
|
|
Returns the number of cells in this |
|
|
Returns a const reference to the cell in this |
|
|
Returns a const reference to the entrance cell in the solution path of an overlying maze, as defined in the Pattern concept. |
|
|
Returns a const reference to the cell that topologically follows the entrance cell in the solution path of an overlying maze, as defined in the Pattern concept. |
|
|
Returns a const reference to the cell that topologically precedes the exit cell in the solution path of an overlying maze, as defined in the Pattern concept. |
|
|
Returns a const reference to the exit cell in the solution path of an overlying maze, as defined in the Pattern concept. |
|
||||||||||||
|
Override this function to calculate the course or bearing that is followed when traversing the corresponding edge in the underlying graph. Do not override the public version. |
|
||||||||||||
|
Returns a representation of the course or bearing that is followed when traversing the corresponding edge in the underlying graph, as defined in the Pattern concept. |
Multi-State Mazes in C++ is hosted by . Use the Table of Contents for navigation.