CARMA C++
IPQwriter.h
Go to the documentation of this file.
1 #ifndef CARMA_UTIL_IPQWRITER_H
2 #define CARMA_UTIL_IPQWRITER_H
3 
13 #include "carma/util/IPQbuffer.h"
14 
15 namespace carma {
16 namespace util {
17 
18 
81 template < class E >
82 class IPQwriter : public IPQbuffer, public E {
83 public:
84 
106  IPQwriter( const ::std::string & filenameString,
107  bool isCreator = false,
108  int nElements = 0,
109  unsigned int testOffset = 0);
110 
111 
118  void write( );
119 };
120 
121 
122 }} // End namespace carma::util
123 
124 
125 template < class E >
127  const ::std::string & filenameString,
128  const bool isCreator,
129  const int nElements,
130  const unsigned int testOffset) :
131 IPQbuffer( static_cast< E * >( this ),
132  sizeof( E ),
133  filenameString,
134  isCreator,
135  nElements,
136  testOffset)
137 {
138  init();
139 }
140 
141 
142 template < class E >
143 void
145 {
147 }
148 
149 
150 #endif // CARMA_UTIL_IPQWRITER_H
IPQ (InterProcessQueue) provides a generic way for information to be shared between processes or thre...
Shared memory storage mechanism for an IPQ buffer.
Definition: IPQbuffer.h:37
IPQwriter(const ::std::string &filenameString, bool isCreator=false, int nElements=0, unsigned int testOffset=0)
Constructor for a writer that can create a queue.
Definition: IPQwriter.h:126
void write()
Put an element into the queue.
Definition: IPQwriter.h:144
void write()
Put an element into the queue.
void init()
This does all the real constructor work.