add initial broken implementations of list macros
This commit is contained in:
parent
becc44a098
commit
a824c09cee
1 changed files with 23 additions and 3 deletions
|
@ -245,17 +245,37 @@ inline void toLower(std::string &str) {
|
||||||
|
|
||||||
#define VAR_LIST(section, name, type) \
|
#define VAR_LIST(section, name, type) \
|
||||||
VAR_GENERIC(section, name,\
|
VAR_GENERIC(section, name,\
|
||||||
std::string val = checkAndRemove(line, _prefix);\
|
|
||||||
std::vector<type> value;\
|
std::vector<type> value;\
|
||||||
|
std::stringstream ss(line);\
|
||||||
|
type val;\
|
||||||
|
while (ss >> val) {\
|
||||||
|
std::getline(configFile, line);\
|
||||||
|
}\
|
||||||
)
|
)
|
||||||
#define VAR_LIST_SEP(section, name, type, sep) \
|
#define VAR_LIST_SEP(section, name, type, sep) \
|
||||||
VAR_GENERIC(section, name,\
|
VAR_GENERIC(section, name,\
|
||||||
std::string val = checkAndRemove(line, _prefix);\
|
|
||||||
std::vector<type> value;\
|
std::vector<type> value;\
|
||||||
|
std::stringstream ss(line);\
|
||||||
|
std::string val;\
|
||||||
|
type type_val;\
|
||||||
|
while (std::stringstream(val) >> type_val) {\
|
||||||
|
std::getline(ss, val, ',');\
|
||||||
|
}\
|
||||||
|
)
|
||||||
|
#define VAR_LIST_SEP_P(section, name, type, sep, prefix) \
|
||||||
|
VAR_GENERIC_P(section, name,\
|
||||||
|
_prefix = prefix;\
|
||||||
|
line = checkAndRemove(line, _prefix);\
|
||||||
|
std::vector<type> value;\
|
||||||
|
std::stringstream ss(line);\
|
||||||
|
std::string val;\
|
||||||
|
type type_val;\
|
||||||
|
while (std::stringstream(val) >> type_val) {\
|
||||||
|
std::getline(ss, val, ',');\
|
||||||
|
}\
|
||||||
)
|
)
|
||||||
#define VAR_LIST_NUMBERED(section, name, type) \
|
#define VAR_LIST_NUMBERED(section, name, type) \
|
||||||
VAR_GENERIC(section, name,\
|
VAR_GENERIC(section, name,\
|
||||||
std::string val = checkAndRemove(line, _prefix);\
|
|
||||||
std::vector<type> value;\
|
std::vector<type> value;\
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue