#include <Parser.hpp>

Public Member Functions

 Parser (bool addDefault=true)
 
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 returned. More...
 
DeckPtr parseString (const std::string &data, const ParseMode &parseMode) const
 
DeckPtr parseStream (std::shared_ptr< std::istream > inputStream, const ParseMode &parseMode) const
 
void addParserKeyword (ParserKeywordConstPtr parserKeyword)
 Method to add ParserKeyword instances, these holding type and size information about the keywords and their data. More...
 
bool dropParserKeyword (const std::string &parserKeywordName)
 
ParserKeywordConstPtr getKeyword (const std::string &name) const
 
bool isRecognizedKeyword (const std::string &deckKeywordName) const
 
ParserKeywordConstPtr getParserKeywordFromDeckName (const std::string &deckKeywordName) const
 
std::vector< std::string > getAllDeckNames () const
 
void loadKeywords (const Json::JsonObject &jsonKeywords)
 
bool loadKeywordFromFile (const boost::filesystem::path &configFile)
 
void loadKeywordsFromDirectory (const boost::filesystem::path &directory, bool recursive=true)
 
void applyUnitsToDeck (DeckPtr deck) const
 
size_t size () const
 Returns the approximate number of recognized keywords in decks. More...
 
bool hasInternalKeyword (const std::string &internalKeywordName) const
 Returns whether the parser knows about an keyword with a given internal name. More...
 
ParserKeywordConstPtr getParserKeywordFromInternalName (const std::string &internalKeywordName) const
 Retrieve a ParserKeyword object given an internal keyword name. More...
 
template<class T >
void addKeyword ()
 

Static Public Member Functions

static std::string stripComments (const std::string &inputString)
 

Detailed Description

The hub of the parsing process. An input file in the eclipse data format is specified, several steps of parsing is performed and the semantically parsed result is returned.

Constructor & Destructor Documentation

Opm::Parser::Parser ( bool  addDefault = true)

Member Function Documentation

template<class T >
void Opm::Parser::addKeyword ( )
inline

References addParserKeyword().

void Opm::Parser::addParserKeyword ( ParserKeywordConstPtr  parserKeyword)

Method to add ParserKeyword instances, these holding type and size information about the keywords and their data.

Referenced by addKeyword().

void Opm::Parser::applyUnitsToDeck ( DeckPtr  deck) const
bool Opm::Parser::dropParserKeyword ( const std::string &  parserKeywordName)
std::vector<std::string> Opm::Parser::getAllDeckNames ( ) const
ParserKeywordConstPtr Opm::Parser::getKeyword ( const std::string &  name) const
ParserKeywordConstPtr Opm::Parser::getParserKeywordFromDeckName ( const std::string &  deckKeywordName) const
ParserKeywordConstPtr Opm::Parser::getParserKeywordFromInternalName ( const std::string &  internalKeywordName) const

Retrieve a ParserKeyword object given an internal keyword name.

bool Opm::Parser::hasInternalKeyword ( const std::string &  internalKeywordName) const

Returns whether the parser knows about an keyword with a given internal name.

bool Opm::Parser::isRecognizedKeyword ( const std::string &  deckKeywordName) const
bool Opm::Parser::loadKeywordFromFile ( const boost::filesystem::path &  configFile)
void Opm::Parser::loadKeywords ( const Json::JsonObject jsonKeywords)
void Opm::Parser::loadKeywordsFromDirectory ( const boost::filesystem::path &  directory,
bool  recursive = true 
)
DeckPtr Opm::Parser::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 returned.

DeckPtr Opm::Parser::parseStream ( std::shared_ptr< std::istream >  inputStream,
const ParseMode parseMode 
) const
DeckPtr Opm::Parser::parseString ( const std::string &  data,
const ParseMode parseMode 
) const
size_t Opm::Parser::size ( ) const

Returns the approximate number of recognized keywords in decks.

This is an approximate number because regular expresions are disconsidered.

static std::string Opm::Parser::stripComments ( const std::string &  inputString)
static

The documentation for this class was generated from the following file: