diff --git a/QRCodeLibrary/QRCode.cpp b/QRCodeLibrary/QRCode.cpp new file mode 100644 index 0000000..3e86d39 --- /dev/null +++ b/QRCodeLibrary/QRCode.cpp @@ -0,0 +1,8 @@ +#include "pch.h" +#include "QRCode.hpp" + +QRCode::QRCode(string input_, CorrectionLevel corr_lvl_, QRCodeMethod method_, unsigned char version_): + input{ input_ }, corr_lvl{ corr_lvl_ }, method{ method_ }, version{ version_ } +{ + +} diff --git a/QRCodeLibrary/QRCode.hpp b/QRCodeLibrary/QRCode.hpp new file mode 100644 index 0000000..5bccf87 --- /dev/null +++ b/QRCodeLibrary/QRCode.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include + +#include "method.hpp" + +using namespace std; + +class QRCode +{ +public: + QRCode(string input_, CorrectionLevel corr_lvl_ = CorrectionLevel::Q, QRCodeMethod method_ = QRCodeMethod::Dynamic, unsigned char version_ = 0); + +protected: + string input; + CorrectionLevel corr_lvl; + QRCodeMethod method; + unsigned char version; +}; + diff --git a/QRCodeLibrary/QRCodeLibrary.cpp b/QRCodeLibrary/QRCodeLibrary.cpp deleted file mode 100644 index 89e4c4e..0000000 --- a/QRCodeLibrary/QRCodeLibrary.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// QRCodeLibrary.cpp : Defines the functions for the static library. -// - -#include "pch.h" -#include "framework.h" - -// TODO: This is an example of a library function -void fnQRCodeLibrary() -{ -} diff --git a/QRCodeLibrary/QRCodeLibrary.vcxproj b/QRCodeLibrary/QRCodeLibrary.vcxproj index 033fe9b..cca62a9 100644 --- a/QRCodeLibrary/QRCodeLibrary.vcxproj +++ b/QRCodeLibrary/QRCodeLibrary.vcxproj @@ -152,7 +152,9 @@ + + @@ -161,7 +163,7 @@ Create Create - + diff --git a/QRCodeLibrary/QRCodeLibrary.vcxproj.filters b/QRCodeLibrary/QRCodeLibrary.vcxproj.filters index 315b256..31ba2de 100644 --- a/QRCodeLibrary/QRCodeLibrary.vcxproj.filters +++ b/QRCodeLibrary/QRCodeLibrary.vcxproj.filters @@ -21,12 +21,18 @@ Header Files + + Header Files + + + Header Files + - + Source Files - + Source Files diff --git a/QRCodeLibrary/method.hpp b/QRCodeLibrary/method.hpp new file mode 100644 index 0000000..912e775 --- /dev/null +++ b/QRCodeLibrary/method.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include + +using namespace std; + +enum class QRCodeMethod { + Dynamic, + Numeric, + Alphabetic, + Byte +}; + +enum class CorrectionLevel { + L, + M, + Q, + H +}; \ No newline at end of file