Public Member Functions | Public Attributes | List of all members
CountDown Struct Reference

Public Member Functions

 CountDown (int index, int n=10)
 
bool operator() (int &x)
 
 CountDown (int index, int n=10)
 
bool operator() (int &x)
 

Public Attributes

const int index
 
int count
 

Detailed Description

Definition at line 30 of file _test_tbb_composite.cxx.

Constructor & Destructor Documentation

CountDown::CountDown ( int  index,
int  n = 10 
)
inline

Definition at line 33 of file _test_tbb_composite.cxx.

33  : index(index), count(n) {
34  std::cerr << "CountDown("<<index << " , " <<n<<")\n";
35  }
std::size_t n
Definition: format.h:3399
CountDown::CountDown ( int  index,
int  n = 10 
)
inline

Definition at line 16 of file test_tbb_join.cxx.

16  : index(index), count(n) {
17  cerr << "CountDown("<<index << " , " <<n<<")\n";
18  }
std::size_t n
Definition: format.h:3399

Member Function Documentation

bool CountDown::operator() ( int &  x)
inline

Definition at line 19 of file test_tbb_join.cxx.

19  {
20  if (!count) {
21  cerr << "CountDown("<<index<<"): EOS\n";
22  return false;
23  }
24  x = count--;
25  cerr << "CountDown("<<index<<"): " << x << endl;
26  return true;
27  }
list x
Definition: train.py:276
QTextStream & endl(QTextStream &s)
bool CountDown::operator() ( int &  x)
inline

Definition at line 36 of file _test_tbb_composite.cxx.

36  {
37  if (!count) {
38  std::cerr << "CountDown("<<index<<"): EOS\n";
39  return false;
40  }
41  x = count--;
42  std::cerr << "CountDown("<<index<<"): " << x << std::endl;
43  return true;
44  }
list x
Definition: train.py:276
QTextStream & endl(QTextStream &s)

Member Data Documentation

int CountDown::count

Definition at line 32 of file _test_tbb_composite.cxx.

const int CountDown::index

Definition at line 31 of file _test_tbb_composite.cxx.


The documentation for this struct was generated from the following files: