ElementPtr
fromStringstreamNumber(std::istream& in, const std::string& file,
const int& line, int& pos) {
+ // Remember position where the value starts. It will be set in the
+ // Position structure of the Element to be created.
const uint32_t start_pos = pos;
+ // This will move the pos to the end of the value.
const std::string number = numberFromStringstream(in, pos);
if (number.find_first_of(".eE") < number.size()) {
fromStringstreamBool(std::istream& in, const std::string& file,
const int line, int& pos)
{
+ // Remember position where the value starts. It will be set in the
+ // Position structure of the Element to be created.
const uint32_t start_pos = pos;
+ // This will move the pos to the end of the value.
const std::string word = wordFromStringstream(in, pos);
if (boost::iequals(word, "True")) {
fromStringstreamNull(std::istream& in, const std::string& file,
const int line, int& pos)
{
+ // Remember position where the value starts. It will be set in the
+ // Position structure of the Element to be created.
const uint32_t start_pos = pos;
+ // This will move the pos to the end of the value.
const std::string word = wordFromStringstream(in, pos);
if (boost::iequals(word, "null")) {
return (Element::create(Element::Position(line, start_pos)));
fromStringstreamString(std::istream& in, const std::string& file, int& line,
int& pos)
{
+ // Remember position where the value starts. It will be set in the
+ // Position structure of the Element to be created.
const uint32_t start_pos = pos;
+ // This will move the pos to the end of the value.
const std::string string_value = strFromStringstream(in, file, line, pos);
return (Element::create(string_value, Element::Position(line, start_pos)));
}