msmazes::PhysicalPattern<> Class Template Reference
[Core Pattern Layer]

#include <msmazes/core/pattern/physical.hpp>

List of all members.


Detailed Description

template<>
class msmazes::PhysicalPattern<>

All Physical Pattern models provided by the Core Library are derived from the PhysicalPattern class template, which handles common initialization tasks and implements most of the associated types and functions specified in the Pattern and Physical Pattern concepts.


Template parameters

Parameter Description Default
CoordinateType The type that will represent the coordinates of each cell.
DirectionType The type that will represent the course or bearing that is followed when traversing an edge in the underlying graph.
DirectionChangeType The type that will represent the change in course or bearing that occurs when traversing two consecutive edges in the underlying graph.
CellContainerSelector The type of the container that will store the cells. boost::vecS


Model of


Type requirements



Public Types

typedef implementation_defined Cell
typedef implementation_defined Coordinate
typedef implementation_defined CellEqualityPolicy
typedef implementation_defined Graph
typedef implementation_defined CellIndex
typedef implementation_defined EdgeDirectedCategory
typedef implementation_defined Direction
typedef implementation_defined DirectionChange
typedef implementation_defined OutDegree
typedef implementation_defined HasIndexableEndpointCells

Public Member Functions

virtual ~PhysicalPattern ()
 The destructor.
const GraphgetGraph () const
CellIndex getCellCount () const
const CellgetCell (const CellIndex index) const
const CellgetEntranceCell () const
const CellgetSourceCell () const
const CellgetTargetCell () const
const CellgetExitCell () const
Direction getEdgeDirection (const CellIndex source_index, const CellIndex target_index) const
DirectionChange getYawTurn (const CellIndex source_index, const CellIndex parent_index, const CellIndex target_index) const
OutDegree getMaxOutDegree () const

Static Public Member Functions

Cell createCell (const Coordinate x, const Coordinate y, const Coordinate z)

Protected Member Functions

 PhysicalPattern ()
 The default constructor.
template<typename TesselationFormer, typename ArgumentPack>
void initializeWithTesselationFormer (const TesselationFormer &tesselation_former, const ArgumentPack &p)
virtual Direction getEdgeDirectionDerived (const Cell &source, const Cell &target) const
virtual DirectionChange getYawTurnDerived (const Cell &source, const Cell &parent, const Cell &target) const
virtual OutDegree getMaxOutDegreeDerived () const =0


Member Typedef Documentation

typedef implementation_defined msmazes::PhysicalPattern<>::Cell
 

The type of the objects to be connected together, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::Coordinate
 

The type that represents the coordinates of each cell, as defined in the Physical Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::CellEqualityPolicy
 

The type of the function object that determines equality between any two cells, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::Graph
 

The type of the underlying object that represents the manner in which the cells are connected together, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::CellIndex
 

An unsigned integral type for representing either the index of a cell or the number of such cells, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::EdgeDirectedCategory
 

The type that represents whether the edges in the underlying graph are undirected, directed, or bidirectional, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::Direction
 

The type that represents the course or bearing that is followed when traversing an edge in the underlying graph, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::DirectionChange
 

The type that represents the change in course or bearing that occurs when traversing two consecutive edges in the underlying graph, as defined in the Physical Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::OutDegree
 

The type that represents the number of edges from a source vertex in the underlying graph, as defined in the Pattern concept.

typedef implementation_defined msmazes::PhysicalPattern<>::HasIndexableEndpointCells
 

The type that indicates that the entrance and exit cells are not indexable, as defined in the Pattern concept.


Constructor & Destructor Documentation

msmazes::PhysicalPattern<>::PhysicalPattern  )  [inline, protected]
 

Because the PhysicalPattern class template defines pure virtual functions, direct instantiation is allowed only at the beginning of the initialization phase of construction of a subclass instance that fully implements these functions.

virtual msmazes::PhysicalPattern<>::~PhysicalPattern  )  [inline, virtual]
 

Destroys this PhysicalPattern.


Member Function Documentation

Cell msmazes::PhysicalPattern<>::createCell const Coordinate  x,
const Coordinate  y,
const Coordinate  z
[inline, static]
 

Constructs a new cell for use in initializing this PhysicalPattern.

Parameter Name Description Preconditions
x The x-coordinate of the new cell.
y The y-coordinate of the new cell.
z The z-coordinate of the new cell.

Returns:
the new cell.

template<typename TesselationFormer, typename ArgumentPack>
void msmazes::PhysicalPattern<>::initializeWithTesselationFormer const TesselationFormer &  tesselation_former,
const ArgumentPack &  p
[inline, protected]
 

Constructs the cells and their connections in this PhysicalPattern using the specified Tesselation Former and any specified arguments that are subclass-specific. Call this function during initialization of the subclass instance.

Parameter Name Description Preconditions
tesselation_former The specified tesselation former. TesselationFormer must model the Tesselation Former concept.
p An object containing the other arguments. ArgumentPack must model the Argument Pack concept.

const Graph& msmazes::PhysicalPattern<>::getGraph  )  const [inline]
 

Returns a const reference to the underlying object that represents the manner in which the cells are connected together in this PhysicalPattern, as defined in the Pattern concept.

CellIndex msmazes::PhysicalPattern<>::getCellCount  )  const [inline]
 

Returns the number of cells in this PhysicalPattern, as defined in the Pattern concept.

const Cell& msmazes::PhysicalPattern<>::getCell const CellIndex  index  )  const [inline]
 

Returns a const reference to the cell in this PhysicalPattern to which the specified index refers, as defined in the Pattern concept.

const Cell& msmazes::PhysicalPattern<>::getEntranceCell  )  const [inline]
 

Returns a const reference to the entrance cell in the solution path of an overlying maze, as defined in the Pattern concept.

const Cell& msmazes::PhysicalPattern<>::getSourceCell  )  const [inline]
 

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.

const Cell& msmazes::PhysicalPattern<>::getTargetCell  )  const [inline]
 

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.

const Cell& msmazes::PhysicalPattern<>::getExitCell  )  const [inline]
 

Returns a const reference to the exit cell in the solution path of an overlying maze, as defined in the Pattern concept.

virtual Direction msmazes::PhysicalPattern<>::getEdgeDirectionDerived const Cell source,
const Cell target
const [inline, protected, virtual]
 

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.

virtual DirectionChange msmazes::PhysicalPattern<>::getYawTurnDerived const Cell source,
const Cell parent,
const Cell target
const [inline, protected, virtual]
 

Override this function to calculate the change in course or bearing that occurs when traversing the corresponding edges in the underlying graph. Do not override the public version.

virtual OutDegree msmazes::PhysicalPattern<>::getMaxOutDegreeDerived  )  const [protected, pure virtual]
 

Override this function to calculate the maximum number of edges from any source vertex in the underlying graph. Do not override the public version.

Direction msmazes::PhysicalPattern<>::getEdgeDirection const CellIndex  source_index,
const CellIndex  target_index
const [inline]
 

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.

DirectionChange msmazes::PhysicalPattern<>::getYawTurn const CellIndex  source_index,
const CellIndex  parent_index,
const CellIndex  target_index
const [inline]
 

Returns the change in course or bearing that occurs when traversing the corresponding edges in the underlying graph, as defined in the Physical Pattern concept.

OutDegree msmazes::PhysicalPattern<>::getMaxOutDegree  )  const [inline]
 

Returns the maximum number of edges from any source vertex in the underlying graph, as defined in the Pattern concept.


Multi-State Mazes in C++ is hosted by SourceForge.net. Use the Table of Contents for navigation.