Mantid
|
Simple multilevel-cyclic counter. More...
#include <RotCounter.h>
Public Member Functions | |
int | operator++ () |
Carrys out a rotational addition. More... | |
int | operator++ (const int a) |
Convertion to ++operator (prefix) from operator++ (postfix) More... | |
int | operator-- () |
Carrys out a rotational addition. More... | |
int | operator-- (const int a) |
convertion to –operator (prefix) from operator-- (postfix) More... | |
bool | operator< (const RotaryCounter &) const |
Determines the precidence of the RotaryCounters Operator works on the 0 to high index. More... | |
bool | operator== (const RotaryCounter &) const |
Chec to find if Counters identical in ALL respects. More... | |
bool | operator> (const RotaryCounter &) const |
Determines the precidence of the RotaryCounters Operator works on the 0 to high index. More... | |
int | operator[] (const int I) const |
Accessor operator. More... | |
RotaryCounter (const int S, const int N) | |
Size,Max. More... | |
void | write (std::ostream &) const |
Write out object to a stream. More... | |
Private Attributes | |
std::vector< int > | RC |
rotation list More... | |
int | Rmax |
Number to over cycle. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &, const RotaryCounter &) |
Output stream assesor. More... | |
Simple multilevel-cyclic counter.
Objective is a rolling integer stream ie 1,2,3 going to 1,2,N-1 and then 1,3,4 etc...
Definition at line 28 of file RotCounter.h.
Mantid::Geometry::RotaryCounter::RotaryCounter | ( | const int | S, |
const int | N | ||
) |
Size,Max.
Simple constructor with fixed size and number.
Fills RC with a flat 0->N number list
S | :: Size (number of components) |
N | :: Max number to get to |
Definition at line 26 of file RotCounter.cpp.
References RC.
int Mantid::Geometry::RotaryCounter::operator++ | ( | ) |
Carrys out a rotational addition.
Objective is a rolling integer stream ie 1,2,3 going to 1,2,N-1 and then 1,3,4 etc...
1 | :: the function has looped (carry flag) |
0 | :: no loop occored |
Definition at line 113 of file RotCounter.cpp.
Referenced by operator++().
int Mantid::Geometry::RotaryCounter::operator++ | ( | const int | a | ) |
Convertion to ++operator (prefix) from operator++ (postfix)
a | :: ignored |
Definition at line 101 of file RotCounter.cpp.
References operator++().
int Mantid::Geometry::RotaryCounter::operator-- | ( | ) |
Carrys out a rotational addition.
Objective is a rooling integer stream ie 1,2,3 going to 1,2,N-1 and then 1,3,4 etc...
1 | :: the function has looped (carry flag) |
0 | :: no loop occored |
Definition at line 150 of file RotCounter.cpp.
Referenced by operator--().
int Mantid::Geometry::RotaryCounter::operator-- | ( | const int | a | ) |
convertion to –operator (prefix) from operator-- (postfix)
a | :: ignored |
Definition at line 138 of file RotCounter.cpp.
References operator--().
bool Mantid::Geometry::RotaryCounter::operator< | ( | const RotaryCounter & | A | ) | const |
Determines the precidence of the RotaryCounters Operator works on the 0 to high index.
A | :: RotaryCounter to compare |
Definition at line 80 of file RotCounter.cpp.
bool Mantid::Geometry::RotaryCounter::operator== | ( | const RotaryCounter & | A | ) | const |
Chec to find if Counters identical in ALL respects.
A | :: Counter to compare |
1 | :: All things identical |
0 | :: Something not the same |
Definition at line 39 of file RotCounter.cpp.
bool Mantid::Geometry::RotaryCounter::operator> | ( | const RotaryCounter & | A | ) | const |
Determines the precidence of the RotaryCounters Operator works on the 0 to high index.
A | :: RotaryCounter to compare |
Definition at line 58 of file RotCounter.cpp.
|
inline |
Accessor operator.
Definition at line 42 of file RotCounter.h.
void Mantid::Geometry::RotaryCounter::write | ( | std::ostream & | OX | ) | const |
Write out object to a stream.
OX | :: output stream |
Definition at line 179 of file RotCounter.cpp.
|
friend |
Output stream assesor.
OX | :: Output stream |
A | :: RotaryCounter to writeout |
Definition at line 14 of file RotCounter.cpp.
|
private |
rotation list
Definition at line 33 of file RotCounter.h.
Referenced by operator++(), operator--(), and RotaryCounter().
|
private |
Number to over cycle.
Definition at line 32 of file RotCounter.h.
Referenced by operator++(), and operator--().