Public Member Functions | Private Attributes | List of all members
MockSource Class Reference
Inheritance diagram for MockSource:
MockNode

Public Member Functions

 MockSource (int maxcount=10)
 
virtual ~MockSource ()
 
virtual NodeCategory category ()
 
virtual bool extract (boost::any &out)
 
- Public Member Functions inherited from MockNode
virtual ~MockNode ()
 
virtual int concurrency ()
 

Private Attributes

int m_count
 
const int m_maxcount
 

Detailed Description

Definition at line 30 of file test_tbb_dfp_any.cxx.

Constructor & Destructor Documentation

MockSource::MockSource ( int  maxcount = 10)
inline

Definition at line 34 of file test_tbb_dfp_any.cxx.

34 : m_count(0), m_maxcount(maxcount) {}
const int m_maxcount
virtual MockSource::~MockSource ( )
inlinevirtual

Definition at line 35 of file test_tbb_dfp_any.cxx.

35 {}

Member Function Documentation

virtual NodeCategory MockSource::category ( )
inlinevirtual

Implements MockNode.

Definition at line 36 of file test_tbb_dfp_any.cxx.

36 { return sourceCat; }
virtual bool MockSource::extract ( boost::any &  out)
inlinevirtual

Definition at line 37 of file test_tbb_dfp_any.cxx.

37  {
38  cerr << "Source: " << m_count << endl;
39  if (m_count > m_maxcount) {
40  cerr << "ModeSource drained\n";
41  return false;
42  }
43  ++m_count;
44  out = m_count;
45  return true;
46  }
const int m_maxcount
QTextStream & endl(QTextStream &s)

Member Data Documentation

int MockSource::m_count
private

Definition at line 31 of file test_tbb_dfp_any.cxx.

const int MockSource::m_maxcount
private

Definition at line 32 of file test_tbb_dfp_any.cxx.


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