diff --git a/src/RawJPG.cpp b/src/RawJPG.cpp new file mode 100644 index 0000000..a509caa --- /dev/null +++ b/src/RawJPG.cpp @@ -0,0 +1,52 @@ +/** + * RawJPG + */ + +/* Include --------------------------------------------- */ +#include "RawJPG.hpp" + +#include + +/* Defines --------------------------------------------- */ + +/* Class implentation ---------------------------------- */ +std::ostream &operator<<(std::ostream &pOs, const RawJPG &pRawJPG) { + pOs << "RawJPG data : " << pRawJPG.rawData(); + + return pOs; +} + +RawJPG::RawJPG() { + /* Empty on purpose */ +} + +RawJPG::RawJPG(const std::string &pStr) : mRawData(pStr) +{ + /* Empty on purpose */ +} + +RawJPG::~RawJPG() { + /* Empty on purpose */ +} + +void RawJPG::print(void) const { + std::cout << "[INFO ] RawJPG value is : " << *this << std::endl; +} + +/* Getters */ +std::string RawJPG::rawData(void) const { + return mRawData; +} + +bool RawJPG::isComplete(void) const { + return mComplete; +} + +/* Setters */ +void RawJPG::setRawData(const std::string &pStr) { + mRawData = pStr; +} + +void RawJPG::setCompleted(const bool &pComplete) { + mComplete = pComplete; +} diff --git a/src/RawJPG.hpp b/src/RawJPG.hpp new file mode 100644 index 0000000..bb11abe --- /dev/null +++ b/src/RawJPG.hpp @@ -0,0 +1,37 @@ +/** + * RawJPG + */ + +#ifndef RAW_JPG_HPP +#define RAW_JPG_HPP + +/* Include --------------------------------------------- */ +#include + +/* Defines --------------------------------------------- */ + +/* Class ----------------------------------------------- */ +class RawJPG { + public: + RawJPG(); + RawJPG(const std::string &pStr); + virtual ~RawJPG(); + + void print(void) const; + + /* Getters */ + std::string rawData(void) const; + bool isComplete(void) const; + + /* Setters */ + void setRawData(const std::string &pStr); + void setCompleted(const bool &pStr); + + private: + std::string mRawData; + bool mComplete; +}; + +std::ostream &operator<<(std::ostream &pOs, const RawJPG &pRawJPG); + +#endif /* RAW_JPG_HPP */