Select Git revision
ConfigParser.hpp
ConfigParser.hpp 772 B
#pragma once
#include "functions/Function.hpp"
#include "functions/Replace.hpp"
#include "textIterators/TextIterator.hpp"
#include "textIterators/LineIterator.hpp"
#include "textIterators/TokenIterator.hpp"
#include "textIterators/SentenceIterator.hpp"
#include <boost/property_tree/ptree.hpp>
#include <regex>
#include <queue>
#include <iostream>
using ptree = boost::property_tree::ptree;
class ConfigParser
{
public:
ConfigParser(ptree& config);
bool next();
Function* getFunction();
TextIterator* getTextIterator(std::stringstream& stream);
private:
Function* str2function(std::string name, ptree& config);
TextIterator* str2iterator(std::string name, std::stringstream& stream);
std::queue<std::pair<Function*, std::string>> tasks;
};