Parser.hpp
Go to the documentation of this file.
54 DeckPtr parseStream(std::shared_ptr<std::istream> inputStream , const ParseMode& parseMode) const;
69 void loadKeywordsFromDirectory(const boost::filesystem::path& directory , bool recursive = true);
88 ParserKeywordConstPtr getParserKeywordFromInternalName(const std::string& internalKeywordName) const;
111 RawKeywordPtr createRawKeyword(const std::string& keywordString, std::shared_ptr<ParserState> parserState) const;
114 boost::filesystem::path getIncludeFilePath(std::shared_ptr<ParserState> parserState, std::string path) const;
115 std::string doSpecialHandlingForTitleKeyword(std::string line, std::shared_ptr<ParserState> parserState) const;
bool loadKeywordFromFile(const boost::filesystem::path &configFile) bool hasInternalKeyword(const std::string &internalKeywordName) const Returns whether the parser knows about an keyword with a given internal name. std::vector< std::string > getAllDeckNames() const void loadKeywordsFromDirectory(const boost::filesystem::path &directory, bool recursive=true) Parser(bool addDefault=true) bool isRecognizedKeyword(const std::string &deckKeywordName) const Definition: Deck.hpp:29 Definition: Parser.hpp:45 static std::string stripComments(const std::string &inputString) size_t size() const Returns the approximate number of recognized keywords in decks. void loadKeywords(const Json::JsonObject &jsonKeywords) void addParserKeyword(ParserKeywordConstPtr parserKeyword) Method to add ParserKeyword instances, these holding type and size information about the keywords and... DeckPtr parseStream(std::shared_ptr< std::istream > inputStream, const ParseMode &parseMode) const DeckPtr parseFile(const std::string &dataFile, const ParseMode &parseMode) const The starting point of the parsing process. The supplied file is parsed, and the resulting Deck is ret... Definition: JsonObject.hpp:31 ParserKeywordConstPtr getKeyword(const std::string &name) const Definition: ParseMode.hpp:78 void applyUnitsToDeck(DeckPtr deck) const DeckPtr parseString(const std::string &data, const ParseMode &parseMode) const std::shared_ptr< const ParserKeyword > ParserKeywordConstPtr Definition: ParserKeyword.hpp:50 ParserKeywordConstPtr getParserKeywordFromInternalName(const std::string &internalKeywordName) const Retrieve a ParserKeyword object given an internal keyword name. ParserKeywordConstPtr getParserKeywordFromDeckName(const std::string &deckKeywordName) const bool dropParserKeyword(const std::string &parserKeywordName) |