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

Public Member Functions

 MyFilter (IMySource &src, int m=2)
 
virtual ~MyFilter ()
 
virtual MyDataPtr operator() ()
 
virtual bool eof ()
 
- Public Member Functions inherited from IMySource
virtual ~IMySource ()
 

Private Attributes

IMySourcem_src
 
int m_mod
 

Detailed Description

Definition at line 57 of file test_stream.cxx.

Constructor & Destructor Documentation

MyFilter::MyFilter ( IMySource src,
int  m = 2 
)
inline

Definition at line 62 of file test_stream.cxx.

62 : m_src(src), m_mod(m) {}
static const double m
Definition: Units.h:79
IMySource & m_src
Definition: test_stream.cxx:58
virtual MyFilter::~MyFilter ( )
inlinevirtual

Definition at line 63 of file test_stream.cxx.

63 {};

Member Function Documentation

virtual bool MyFilter::eof ( )
inlinevirtual

Implements IMySource.

Definition at line 74 of file test_stream.cxx.

74  {
75  return m_src.eof();
76  }
virtual bool eof()=0
IMySource & m_src
Definition: test_stream.cxx:58
virtual MyDataPtr MyFilter::operator() ( void  )
inlinevirtual

Implements IMySource.

Definition at line 65 of file test_stream.cxx.

65  {
66  while (! m_src.eof()) {
67  MyDataPtr p = m_src();
68  if (0 == p->i % m_mod) {
69  return p;
70  }
71  }
72  return 0;
73  }
virtual bool eof()=0
std::shared_ptr< const MyData > MyDataPtr
Definition: test_stream.cxx:29
IMySource & m_src
Definition: test_stream.cxx:58
p
Definition: test.py:223

Member Data Documentation

int MyFilter::m_mod
private

Definition at line 59 of file test_stream.cxx.

IMySource& MyFilter::m_src
private

Definition at line 58 of file test_stream.cxx.


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