26 #ifndef ODVA_ETHERNETIP_SERIALIZATION_STREAM_READER_H 27 #define ODVA_ETHERNETIP_SERIALIZATION_STREAM_READER_H 30 #include <boost/shared_ptr.hpp> 31 #include <boost/asio.hpp> 35 using boost::shared_ptr;
36 using boost::asio::mutable_buffer;
37 using boost::asio::buffer_cast;
38 using boost::asio::buffer_size;
42 namespace serialization {
66 isp_->read((
char*)buf, n);
76 readBytes(buffer_cast<void*>(buf), buffer_size(buf));
92 virtual void skip(
size_t n)
94 isp_->seekg(n, std::ios_base::cur);
102 #endif // ODVA_ETHERNETIP_SERIALIZATION_STREAM_READER_H
virtual void skip(size_t n)
void readBuffer(mutable_buffer buf)
shared_ptr< istream > isp_
void readBytes(void *buf, size_t n)
StreamReader(shared_ptr< istream > isp)