RaftLib  0.3a
C++ Stream Processing Template Library
portiterator.hpp
1 
20 #ifndef _PORTITERATOR_HPP_
21 #define _PORTITERATOR_HPP_ 1
22 #include <iterator>
23 #include <map>
24 #include <thread>
25 #include <mutex>
26 #include <cstddef>
27 
28 #include "portmap_t.hpp"
29 
30 class FIFO;
31 
32 class PortIterator : public std::iterator< std::forward_iterator_tag, FIFO >
33 {
34 public:
35  PortIterator( portmap_t *port_map );
36 
37  PortIterator( portmap_t *port_map, const std::size_t index );
38 
39  PortIterator( const PortIterator &it );
40 
41  virtual ~PortIterator();
42 
43  PortIterator& operator++();
44 
45  bool operator==(const PortIterator& rhs);
46  bool operator!=(const PortIterator& rhs);
47  FIFO& operator*();
48 
49 private:
50  static void initKeyMap( portmap_t *port_map, std::vector< std::string > &key_map );
51 
52  portmap_t * const port_map;
53  std::vector< std::string > key_map;
54  std::size_t map_index = 0;
55 };
56 
57 #endif /* END _PORTITERATOR_HPP_ */
PortIterator(portmap_t *port_map)
Definition: portiterator.cpp:29
bool operator==(const PortIterator &rhs)
Definition: portiterator.cpp:63
Definition: fifo.hpp:41
Definition: portiterator.hpp:32
Definition: portmap_t.hpp:28