Add DeckKeyword::location()

This commit is contained in:
Joakim Hove 2019-08-30 09:34:07 +02:00
parent fa964b5820
commit de5246c701
2 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,8 @@ namespace Opm {
void setLocation(const std::pair<const std::string&, std::size_t>& location);
const std::string& getFileName() const;
int getLineNumber() const;
std::pair<std::string, std::size_t> location() const;
size_t size() const;
void addRecord(DeckRecord&& record);

View File

@ -60,6 +60,10 @@ namespace Opm {
return m_lineNumber;
}
std::pair<std::string, std::size_t> DeckKeyword::location() const {
return std::make_pair( this->getFileName(), this->getLineNumber() );
}
void DeckKeyword::setDataKeyword(bool isDataKeyword_) {
m_isDataKeyword = isDataKeyword_;
}