#include "cardTypeHandlerInfo.hpp" void CardTypeHandlerInfo::addCardInfo(const std::string &kCardType, const std::string &kCardValueRegex, const std::function kJSONToSQLConverter) { } const CardTypeHandlerInfo cardTypeHandlerInfoList() { CardTypeHandlerInfo aCardTypeHandlerInfo; aCardTypeHandlerInfo.addCardInfo("INT", "[0-9]+", [](const std::string &kJSONContent) { return kJSONContent; }); aCardTypeHandlerInfo.addCardInfo("BOOL", "true|false", [](const std::string &kJSONContent) { return kJSONContent; }); aCardTypeHandlerInfo.addCardInfo("STRING", "\"[^\"?]*\"", [](const std::string &kJSONContent) { std::string aCopyOfJSONValue = kJSONContent; *aCopyOfJSONValue.begin() = '\''; *std::prev(aCopyOfJSONValue.end()) = '\''; return aCopyOfJSONValue; }); aCardTypeHandlerInfo.addCardInfo("LIST_OF_INT", "\\[[0-9,]*\\]", [](const std::string &kJSONContent) { std::string aCopyOfJSONValue = kJSONContent; aCopyOfJSONValue.append("\'"); aCopyOfJSONValue.insert(aCopyOfJSONValue.begin(), '\''); return aCopyOfJSONValue; }); aCardTypeHandlerInfo.addCardInfo("NULL", "null", [](const std::string &kJSONContent) { return "NULL"; }); return aCardTypeHandlerInfo; }