2013-03-21 15:37:40 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2013 Statoil ASA.
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
2013-04-08 10:36:14 +02:00
|
|
|
*/
|
2013-06-20 15:30:37 +02:00
|
|
|
#ifndef PARSER_KEYWORD_H
|
|
|
|
|
#define PARSER_KEYWORD_H
|
2013-03-21 15:37:40 +01:00
|
|
|
|
|
|
|
|
#include <string>
|
2013-04-03 11:38:06 +02:00
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
2013-06-21 10:23:24 +02:00
|
|
|
#include <opm/parser/eclipse/Parser/ParserKeywordSize.hpp>
|
2013-05-27 14:28:23 +02:00
|
|
|
#include <opm/parser/eclipse/Parser/ParserRecord.hpp>
|
2013-06-20 15:30:37 +02:00
|
|
|
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
2013-06-03 15:54:16 +02:00
|
|
|
#include <opm/parser/eclipse/RawDeck/RawKeyword.hpp>
|
|
|
|
|
|
2013-03-21 15:37:40 +01:00
|
|
|
|
|
|
|
|
namespace Opm {
|
2013-04-08 10:36:14 +02:00
|
|
|
|
2013-06-20 15:30:37 +02:00
|
|
|
class ParserKeyword {
|
2013-05-06 12:13:49 +02:00
|
|
|
public:
|
2013-06-20 15:30:37 +02:00
|
|
|
ParserKeyword(const std::string& name);
|
2013-06-21 10:23:24 +02:00
|
|
|
ParserKeyword(const std::string& name, ParserKeywordSizePtr recordSize);
|
2013-05-27 14:28:23 +02:00
|
|
|
void setRecord(ParserRecordConstPtr record);
|
|
|
|
|
ParserRecordConstPtr getRecord();
|
2013-05-06 12:13:49 +02:00
|
|
|
const std::string& getName() const;
|
2013-06-20 15:30:37 +02:00
|
|
|
DeckKeywordPtr parse(RawKeywordConstPtr rawKeyword) const;
|
2013-06-03 15:54:16 +02:00
|
|
|
|
2013-05-06 12:13:49 +02:00
|
|
|
private:
|
|
|
|
|
std::string m_name;
|
2013-05-27 14:28:23 +02:00
|
|
|
ParserRecordConstPtr m_record;
|
2013-06-21 10:23:24 +02:00
|
|
|
ParserKeywordSizePtr recordSize;
|
2013-05-06 12:13:49 +02:00
|
|
|
};
|
2013-06-20 15:30:37 +02:00
|
|
|
typedef boost::shared_ptr<ParserKeyword> ParserKeywordPtr;
|
|
|
|
|
typedef boost::shared_ptr<const ParserKeyword> ParserKeywordConstPtr;
|
2013-03-21 15:37:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|