data.h
Go to the documentation of this file.
1 
32 #ifndef CREATE_DATA_H
33 #define CREATE_DATA_H
34 
35 #include <boost/shared_ptr.hpp>
36 #include <boost/make_shared.hpp>
37 #include <map>
38 #include <vector>
39 
40 #include "create/packet.h"
41 #include "create/types.h"
42 
43 namespace create {
44  class Data {
45  private:
46  std::map<uint8_t, boost::shared_ptr<Packet> > packets;
47  uint32_t totalDataBytes;
48  std::vector<uint8_t> ids;
49 
50  public:
51  Data(ProtocolVersion version = V_3);
52  ~Data();
53 
54  bool isValidPacketID(const uint8_t id) const;
55  boost::shared_ptr<Packet> getPacket(const uint8_t id);
56  void validateAll();
57  uint32_t getTotalDataBytes() const;
58  uint8_t getNumPackets() const;
59  std::vector<uint8_t> getPacketIDs();
60  };
61 } // namespace create
62 
63 #endif // CREATE_DATA_H
uint8_t getNumPackets() const
Definition: data.cpp:84
bool isValidPacketID(const uint8_t id) const
Definition: data.cpp:58
std::vector< uint8_t > getPacketIDs()
Definition: data.cpp:88
uint32_t getTotalDataBytes() const
Definition: data.cpp:80
Data(ProtocolVersion version=V_3)
Definition: data.cpp:7
Definition: create.h:47
boost::shared_ptr< Packet > getPacket(const uint8_t id)
Definition: data.cpp:65
ProtocolVersion
Definition: types.h:41
std::vector< uint8_t > ids
Definition: data.h:48
std::map< uint8_t, boost::shared_ptr< Packet > > packets
Definition: data.h:46
uint32_t totalDataBytes
Definition: data.h:47
void validateAll()
Definition: data.cpp:72


libcreate
Author(s): Jacob Perron
autogenerated on Thu Dec 5 2019 04:03:13