qr_code.hpp
1 #ifndef NOOS_OBJECT_QRCODE
2 #define NOOS_OBJECT_QRCODE
3 /*
4  * LICENSE HERE
5  */
6 #include "includes.ihh"
7 namespace noos {
8 namespace object {
16 struct qr_code
17 {
19  float centre_x;
21  float centre_y;
23  std::string message;
24 
26  qr_code(const json::const_iterator & qr_it);
27 
29  json::object_t to_json() const;
30 
32  bool operator==(const qr_code & rhs) const;
33 
35  bool check_component(const json::const_iterator & it,
36  std::string);
37 };
38 }
39 }
40 #endif
bool check_component(const json::const_iterator &it, std::string)
check if a component of json exist
Definition: asio_handler.hpp:14
json::object_t to_json() const
method to pass the information to json
float centre_y
coordinate y of the center of the QR position
Definition: qr_code.hpp:21
float centre_x
coordinate x of the center of the QR position
Definition: qr_code.hpp:19
qr_code(const json::const_iterator &qr_it)
construct a qr object from a json iterator
bool operator==(const qr_code &rhs) const
Equality operator.
class which should encapsulate a QR code
Definition: qr_code.hpp:16
std::string message
message of the QR found
Definition: qr_code.hpp:23