2013-05-06 14:31:02 +02: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/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef PARSERRECORD_HPP
|
2013-05-14 21:26:42 +02:00
|
|
|
#define PARSERRECORD_HPP
|
2013-05-06 14:31:02 +02:00
|
|
|
|
2013-05-07 21:55:49 +02:00
|
|
|
#include <vector>
|
2013-05-14 21:26:42 +02:00
|
|
|
#include <map>
|
2013-05-07 21:55:49 +02:00
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
2013-05-23 12:42:59 +02:00
|
|
|
#include <opm/parser/eclipse/Parser/ParserItem.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
|
|
|
|
|
2013-05-07 21:55:49 +02:00
|
|
|
|
|
|
|
|
namespace Opm {
|
|
|
|
|
|
|
|
|
|
class ParserRecord {
|
|
|
|
|
public:
|
|
|
|
|
ParserRecord();
|
2013-06-03 15:54:16 +02:00
|
|
|
size_t size() const;
|
2013-05-14 21:26:42 +02:00
|
|
|
void addItem( ParserItemConstPtr item );
|
2013-06-03 15:54:16 +02:00
|
|
|
ParserItemConstPtr get(size_t index) const;
|
|
|
|
|
ParserItemConstPtr get(const std::string& itemName) const;
|
|
|
|
|
DeckRecordConstPtr parse(RawRecordPtr rawRecord) const;
|
2013-05-23 12:42:59 +02:00
|
|
|
|
2013-05-07 21:55:49 +02:00
|
|
|
private:
|
2013-05-14 21:26:42 +02:00
|
|
|
std::vector<ParserItemConstPtr> m_items;
|
|
|
|
|
std::map<std::string , ParserItemConstPtr> m_itemMap;
|
2013-05-07 21:55:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef boost::shared_ptr<const ParserRecord> ParserRecordConstPtr;
|
|
|
|
|
typedef boost::shared_ptr<ParserRecord> ParserRecordPtr;
|
|
|
|
|
}
|
2013-05-06 14:31:02 +02:00
|
|
|
|
|
|
|
|
|
2013-05-14 21:26:42 +02:00
|
|
|
#endif /* PARSERRECORD_HPP */
|
2013-05-06 14:31:02 +02:00
|
|
|
|