Public Types | Public Member Functions | Public Attributes | List of all members
number_source< DataType > Struct Template Reference

Public Types

typedef DataType data_type
 
typedef std::vector< data_typevector_type
 

Public Member Functions

 number_source (const vector_type &d)
 
bool operator() (data_type &out)
 

Public Attributes

vector_type dat
 

Detailed Description

template<typename DataType>
struct number_source< DataType >

Definition at line 10 of file test_tbb.cxx.

Member Typedef Documentation

template<typename DataType >
typedef DataType number_source< DataType >::data_type

Definition at line 11 of file test_tbb.cxx.

template<typename DataType >
typedef std::vector<data_type> number_source< DataType >::vector_type

Definition at line 12 of file test_tbb.cxx.

Constructor & Destructor Documentation

template<typename DataType >
number_source< DataType >::number_source ( const vector_type d)
inline

Definition at line 14 of file test_tbb.cxx.

14 : dat(d) {}
vector_type dat
Definition: test_tbb.cxx:13

Member Function Documentation

template<typename DataType >
bool number_source< DataType >::operator() ( data_type out)
inline

Definition at line 15 of file test_tbb.cxx.

15  {
16  cerr << "number_source with " << dat.size() << " element " << endl;
17  if (dat.empty()) {
18  cerr << "\tempty" << endl;
19  return false;
20  }
21  out = dat.front();
22  dat.erase(dat.begin());
23  cerr << "\treturning value: " << out << endl;
24  return true;
25  }
vector_type dat
Definition: test_tbb.cxx:13
QTextStream & endl(QTextStream &s)

Member Data Documentation

template<typename DataType >
vector_type number_source< DataType >::dat

Definition at line 13 of file test_tbb.cxx.


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