data.h
Go to the documentation of this file.
00001 
00032 #ifndef CREATE_DATA_H
00033 #define CREATE_DATA_H
00034 
00035 #include <boost/shared_ptr.hpp>
00036 #include <boost/make_shared.hpp>
00037 #include <map>
00038 #include <vector>
00039 
00040 #include "create/packet.h"
00041 #include "create/types.h"
00042 
00043 namespace create {
00044   class Data {
00045     private:
00046       std::map<uint8_t, boost::shared_ptr<Packet> > packets;
00047       uint32_t totalDataBytes;
00048       std::vector<uint8_t> ids;
00049 
00050     public:
00051       Data(ProtocolVersion version = V_3);
00052       ~Data();
00053 
00054       bool isValidPacketID(const uint8_t id) const;
00055       boost::shared_ptr<Packet> getPacket(const uint8_t id);
00056       void validateAll();
00057       uint32_t getTotalDataBytes() const;
00058       uint8_t getNumPackets() const;
00059       std::vector<uint8_t> getPacketIDs();
00060   };
00061 }  // namespace create
00062 
00063 #endif // CREATE_DATA_H


libcreate
Author(s): Jacob Perron
autogenerated on Sat Nov 26 2016 03:41:46