Mantid
|
#include <MatrixVectorPairParser.h>
Public Member Functions | |
void | addCurrentStateToResult () |
Adds currently stored state to the parse result. More... | |
void | advanceRow () |
Advance to the next row of the matrix/vector pair. More... | |
template<typename T > | |
MatrixVectorPair< T, V3R > | getMatrixVectorPair () const |
Construct and return the actual matrix/vector pair, the rational matrix components are castd to T. More... | |
MatrixVectorPairBuilder () | |
void | reset () |
Completely reset the builder, including stored preliminary results. More... | |
void | resetAccumulatedResults () |
Reset all accumulated results. More... | |
void | resetState () |
Reset the current state, i.e. the state representing the current row. More... | |
void | setCurrentDirection (const std::string &vector) |
Set the direction vector to one of the stored values that correspond to x, y or z. More... | |
void | setCurrentFactor (const ParsedRationalNumber &rationalNumberComponents) |
Set the current factor, which is a rational number. More... | |
void | setCurrentSignNegative () |
Make the current sign negative. More... | |
void | setCurrentSignPositive () |
Make the current sign positive. More... | |
Private Attributes | |
V3R | m_currentDirection |
RationalNumber | m_currentFactor |
size_t | m_currentRow |
int | m_currentSign |
std::map< std::string, V3R > | m_directions |
std::vector< V3R > | m_matrixRows |
V3R | m_vector |
Definition at line 23 of file MatrixVectorPairParser.h.
|
inline |
Definition at line 25 of file MatrixVectorPairParser.h.
References m_directions, and reset().
|
inline |
Adds currently stored state to the parse result.
This function takes the current factor, sign and direction that were assigned using the respective functions and adds to the stored intermediate result.
If the current direction is (0,0,0) then the currently processed component is only a rational number that should go into the vector component of the row that's currently being assembled. Otherwise the direction vector should be multiplied by the rational number and added to the matrix row.
After that, the current state is reset so that the next part of the current component can be processed.
Definition at line 96 of file MatrixVectorPairParser.h.
References m_currentDirection, m_currentFactor, m_currentRow, m_currentSign, m_matrixRows, m_vector, and resetState().
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Advance to the next row of the matrix/vector pair.
Definition at line 113 of file MatrixVectorPairParser.h.
References m_currentRow, and resetState().
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Construct and return the actual matrix/vector pair, the rational matrix components are castd to T.
Definition at line 37 of file MatrixVectorPairParser.h.
References m_currentRow, m_matrixRows, m_vector, Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by Mantid::Geometry::parseMatrixVectorPair().
|
inline |
Completely reset the builder, including stored preliminary results.
Definition at line 119 of file MatrixVectorPairParser.h.
References resetAccumulatedResults(), and resetState().
Referenced by MatrixVectorPairBuilder().
|
inline |
Reset all accumulated results.
Definition at line 132 of file MatrixVectorPairParser.h.
References m_currentRow, m_matrixRows, and m_vector.
Referenced by reset().
|
inline |
Reset the current state, i.e. the state representing the current row.
Definition at line 125 of file MatrixVectorPairParser.h.
References m_currentDirection, m_currentFactor, and m_currentSign.
Referenced by addCurrentStateToResult(), advanceRow(), and reset().
|
inline |
Set the direction vector to one of the stored values that correspond to x, y or z.
Definition at line 72 of file MatrixVectorPairParser.h.
References m_currentDirection, and m_directions.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Set the current factor, which is a rational number.
Depending on whether a direction definition follows, it's processed differently later on.
Definition at line 55 of file MatrixVectorPairParser.h.
References m_currentFactor.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Make the current sign negative.
Definition at line 75 of file MatrixVectorPairParser.h.
References m_currentSign.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Make the current sign positive.
Definition at line 78 of file MatrixVectorPairParser.h.
References m_currentSign.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
private |
Definition at line 145 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), resetState(), and setCurrentDirection().
|
private |
Definition at line 144 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), resetState(), and setCurrentFactor().
|
private |
Definition at line 148 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), advanceRow(), getMatrixVectorPair(), and resetAccumulatedResults().
|
private |
Definition at line 146 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), resetState(), setCurrentSignNegative(), and setCurrentSignPositive().
|
private |
Definition at line 139 of file MatrixVectorPairParser.h.
Referenced by MatrixVectorPairBuilder(), and setCurrentDirection().
|
private |
Definition at line 141 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), getMatrixVectorPair(), and resetAccumulatedResults().
|
private |
Definition at line 142 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), getMatrixVectorPair(), and resetAccumulatedResults().