ParserItem: differentiate between input type and internal data type

Differentiate between the input type, as specified in the json configuration
file, and the internal native type used to store data. This is a many-to-one
mapping, where e.g. both the input types STRING and RAW_STRING map to the
internal datatype std::string.

Additional changes:

 - Have removed several ParserItem() constructors.
 - The size_type::SINGLE is default for a ParserItem, and not set explicitly in
   the generated ParserKeywords.cpp file.
 - Have removed a call to boost::lexical_cast<> - just use std::to_string()
This commit is contained in:
Joakim Hove
2019-03-27 07:39:59 +01:00
parent 75d28fc6ce
commit e6aecbd7ac
8 changed files with 359 additions and 293 deletions

View File

@@ -517,7 +517,7 @@ BOOST_AUTO_TEST_CASE(get_byNameNonExisting_throws) {
}
BOOST_AUTO_TEST_CASE(StringsWithSpaceOK) {
ParserItem itemString("STRINGITEM1", "" );
ParserItem itemString("STRINGITEM1", ParserItem::itype::STRING);
ParserRecord record1;
RawRecord rawRecord( " ' VALUE ' " );
ParseContext parseContext;