Skip to content
Snippets Groups Projects
Select Git revision
  • e9a031290b1d188281a0f8f8065f22e7b3462f60
  • master default protected
2 results

ConfigParser.hpp

Blame
  • user avatar
    Igor Danielewicz authored
    e9a03129
    History
    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;
    };