ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
FlexDigit Class Reference

#include <CombinatoricsOdometer.h>

Collaboration diagram for FlexDigit:

Public Member Functions

 FlexDigit (int, FlexDigit *=0)
 
 ~FlexDigit ()
 
void setNext (FlexDigit *next)
 
FlexDigitnext ()
 
int digit () const
 
void setDigit (int digit)
 
bool isAtMax ()
 
bool isFirstDigit ()
 
FlexDigit operator++ (int)
 

Private Attributes

int m_digit
 
int m_digitMax
 
FlexDigitm_nextDigit
 

Detailed Description

Definition at line 62 of file CombinatoricsOdometer.h.

Constructor & Destructor Documentation

◆ FlexDigit()

FlexDigit::FlexDigit ( int  digitMax,
FlexDigit nextDigit = 0 
)

Definition at line 27 of file CombinatoricsOdometer.cxx.

28 {
29  m_digit=0;
30  m_digitMax=digitMax-1;
31  m_nextDigit=nextDigit;
32 }

◆ ~FlexDigit()

FlexDigit::~FlexDigit ( )
inline

Definition at line 108 of file CombinatoricsOdometer.h.

108 { m_started = true; }

Member Function Documentation

◆ digit()

int FlexDigit::digit ( ) const
inline

Definition at line 83 of file CombinatoricsOdometer.h.

83 { return m_digit; }

◆ isAtMax()

bool FlexDigit::isAtMax ( )
inline

Definition at line 85 of file CombinatoricsOdometer.h.

85 { return m_digit >= m_digitMax; }

◆ isFirstDigit()

bool FlexDigit::isFirstDigit ( )
inline

Definition at line 86 of file CombinatoricsOdometer.h.

86 { return !m_nextDigit; }

◆ next()

FlexDigit * FlexDigit::next ( )
inline

Definition at line 82 of file CombinatoricsOdometer.h.

82 { return m_nextDigit; }

◆ operator++()

FlexDigit FlexDigit::operator++ ( int  )

Definition at line 35 of file CombinatoricsOdometer.cxx.

36 {
37  if(this->isAtMax())
38  {
39  this->setDigit( 0 );
40  if(!this->isFirstDigit()) (*(this->next()))++;
41  }
42  else
43  {
44  this->setDigit( this->digit()+1 );
45  }
46  return *this;
47 }

◆ setDigit()

void FlexDigit::setDigit ( int  digit)
inline

Definition at line 84 of file CombinatoricsOdometer.h.

84 { m_digit = digit; }

◆ setNext()

void FlexDigit::setNext ( FlexDigit next)
inline

Definition at line 81 of file CombinatoricsOdometer.h.

81 { m_nextDigit=next; }

Member Data Documentation

◆ m_digit

int FlexDigit::m_digit
private

Definition at line 118 of file CombinatoricsOdometer.h.

◆ m_digitMax

int FlexDigit::m_digitMax
private

Definition at line 119 of file CombinatoricsOdometer.h.

◆ m_nextDigit

FlexDigit* FlexDigit::m_nextDigit
private

Definition at line 120 of file CombinatoricsOdometer.h.


The documentation for this class was generated from the following files:
FlexDigit::m_nextDigit
FlexDigit * m_nextDigit
Definition: CombinatoricsOdometer.h:120
FlexDigit::digit
int digit() const
Definition: CombinatoricsOdometer.h:83
FlexDigit::m_digitMax
int m_digitMax
Definition: CombinatoricsOdometer.h:119
FlexDigit::next
FlexDigit * next()
Definition: CombinatoricsOdometer.h:82
FlexDigit::isAtMax
bool isAtMax()
Definition: CombinatoricsOdometer.h:85
FlexDigit::isFirstDigit
bool isFirstDigit()
Definition: CombinatoricsOdometer.h:86
FlexDigit::setDigit
void setDigit(int digit)
Definition: CombinatoricsOdometer.h:84
FlexDigit::m_digit
int m_digit
Definition: CombinatoricsOdometer.h:118