Public Member Functions | Private Attributes | List of all members
IntSource Class Reference
Inheritance diagram for IntSource:
Source< int > Hydra IdNode WireCell::Pgraph::Node

Public Member Functions

 IntSource (int maxcount=10)
 
virtual ~IntSource ()
 
virtual bool extract (output_pointer &out)
 
- Public Member Functions inherited from Source< int >
 Source (int id, int beg, int end)
 
virtual ~Source ()
 
virtual ~Source ()
 
virtual bool ready ()
 
virtual bool operator() ()
 
virtual bool insert (AnyPorts &input)
 
virtual bool extract (AnyPorts &output)
 
- Public Member Functions inherited from Hydra
virtual ~Hydra ()
 
- Public Member Functions inherited from IdNode
 IdNode (const std::string &name, int id, size_t nin=0, size_t nout=0)
 
int id ()
 
virtual std::string ident ()
 
std::ostream & msg (const std::string s)
 
- Public Member Functions inherited from WireCell::Pgraph::Node
 Node ()
 
virtual ~Node ()
 
Portiport (size_t ind=0)
 
Portoport (size_t ind=0)
 
PortListinput_ports ()
 
PortListoutput_ports ()
 
Portport (Port::Type type, size_t ind=0)
 
Portport (Port::Type type, const std::string &name)
 
bool connected ()
 

Private Attributes

int m_count
 
const int m_max
 

Additional Inherited Members

- Public Types inherited from Source< int >
typedef std::shared_ptr< const int > output_pointer
 
- Protected Attributes inherited from WireCell::Pgraph::Node
PortList m_ports [Port::ntypes]
 

Detailed Description

Definition at line 55 of file _test_hydra.cxx.

Constructor & Destructor Documentation

IntSource::IntSource ( int  maxcount = 10)
inline

Definition at line 59 of file _test_hydra.cxx.

59 : m_count(0), m_max(maxcount) {}
const int m_max
Definition: _test_hydra.cxx:57
virtual IntSource::~IntSource ( )
inlinevirtual

Definition at line 60 of file _test_hydra.cxx.

60 {}

Member Function Documentation

virtual bool IntSource::extract ( output_pointer out)
inlinevirtual

Implements Source< int >.

Definition at line 62 of file _test_hydra.cxx.

62  {
63  ++m_count;
64  if (m_count > m_max) { return false; }
65  out = new int(m_count);
66  return true;
67  }
const int m_max
Definition: _test_hydra.cxx:57

Member Data Documentation

int IntSource::m_count
private

Definition at line 56 of file _test_hydra.cxx.

const int IntSource::m_max
private

Definition at line 57 of file _test_hydra.cxx.


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