diff options
| author | Aotrix <[email protected]> | 2025-07-06 11:27:52 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-07-06 11:27:52 +0200 |
| commit | a01e968169344a2bb2278c55b42d7f0c2c3e1763 (patch) | |
| tree | 1e712f7e4f59e3e63324a2352b8a3d84f0c63f67 /include | |
| parent | 43ef56e2417de30c693df878d1325b076e45ee39 (diff) | |
added card type handler
Diffstat (limited to 'include')
| -rw-r--r-- | include/cardTypeHandlerInfo.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/cardTypeHandlerInfo.hpp b/include/cardTypeHandlerInfo.hpp new file mode 100644 index 0000000..155633c --- /dev/null +++ b/include/cardTypeHandlerInfo.hpp @@ -0,0 +1,27 @@ +#include <functional> +#include <string> + +class CardTypeHandlerInfo { + public: + CardTypeHandlerInfo() = default; + ~CardTypeHandlerInfo() = default; + CardTypeHandlerInfo(const CardTypeHandlerInfo &) = delete; + CardTypeHandlerInfo(CardTypeHandlerInfo &&) = default; + // TODO: rule of 5 ? delete copy operator ? how to call it I forgot + CardTypeHandlerInfo( + const std::vector<std::string> &kCardTypeVector, + const std::vector<std::string> &kCardValueRegexVector, + const std::vector<std::function<const std::string(const std::string &)>> + kJSONToSQLConverterVector); + + void addCardInfo(const std::string &kCardType, + const std::string &kCardValueRegex, + const std::function<const std::string(const std::string &)> + kJSONToSQLConverter); + + private: + std::vector<std::string> mCardType; + std::vector<std::string> mCardValueRegex; + std::vector<std::function<const std::string(const std::string &)>> + mJSONToSQLConverter; +}; |
