reader.h
Go to the documentation of this file.
00001 
00026 #ifndef ODVA_ETHERNETIP_SERIALIZATION_READER_H
00027 #define ODVA_ETHERNETIP_SERIALIZATION_READER_H
00028 
00029 #include <stdexcept>
00030 #include <boost/asio.hpp>
00031 
00032 #include "odva_ethernetip/eip_types.h"
00033 
00034 using boost::asio::mutable_buffer;
00035 
00036 namespace eip {
00037 namespace serialization {
00038 
00042 class Reader
00043 {
00044 public:
00045 
00051   template <typename T> void read(T& v)
00052   {
00053     readBytes(&v, sizeof(v));
00054   }
00055 
00063   virtual void readBytes(void* buf, size_t n) = 0;
00064 
00069   virtual void readBuffer(mutable_buffer buf) = 0;
00070 
00075   virtual size_t getByteCount() = 0;
00076 
00082   virtual void skip(size_t n) = 0;
00083 };
00084 
00085 } // namespace serialization
00086 } // namespace eip
00087 #endif  // ODVA_ETHERNETIP_SERIALIZATION_READER_H


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Sat Jun 8 2019 20:21:23