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

Public Member Functions

 MyGen (int max=-1)
 
virtual MyDataPtr operator() ()
 
virtual bool eof ()
 
- Public Member Functions inherited from IMySource
virtual ~IMySource ()
 

Private Attributes

int m_count
 
int m_max
 

Detailed Description

Definition at line 39 of file test_stream.cxx.

Constructor & Destructor Documentation

MyGen::MyGen ( int  max = -1)
inline

Definition at line 43 of file test_stream.cxx.

43 : m_count(0), m_max(max) {}
int m_max
Definition: test_stream.cxx:41
int m_count
Definition: test_stream.cxx:40
static int max(int a, int b)

Member Function Documentation

virtual bool MyGen::eof ( )
inlinevirtual

Implements IMySource.

Definition at line 50 of file test_stream.cxx.

50  {
51  if (m_max < 0) return false;
52  return m_count >= m_max;
53  }
int m_max
Definition: test_stream.cxx:41
int m_count
Definition: test_stream.cxx:40
virtual MyDataPtr MyGen::operator() ( void  )
inlinevirtual

Implements IMySource.

Definition at line 45 of file test_stream.cxx.

45  {
46  MyData* rawp = new MyData(m_count, m_count, m_count);
47  ++m_count;
48  return MyDataPtr(rawp);
49  }
std::shared_ptr< const MyData > MyDataPtr
Definition: test_stream.cxx:29
int m_count
Definition: test_stream.cxx:40

Member Data Documentation

int MyGen::m_count
private

Definition at line 40 of file test_stream.cxx.

int MyGen::m_max
private

Definition at line 41 of file test_stream.cxx.


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