My Project
Loading...
Searching...
No Matches
ParserRecord.hpp
1/*
2 Copyright 2013 Statoil ASA.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PARSERRECORD_HPP
21#define PARSERRECORD_HPP
22
23#include <iosfwd>
24#include <vector>
25#include <memory>
26
27#include <opm/input/eclipse/Parser/ParserItem.hpp>
28
29namespace Opm {
30
31 class Deck;
32 class DeckRecord;
33 class ParseContext;
34 class RawRecord;
35 class ErrorGuard;
36 class UnitSystem;
37 class KeywordLocation;
38
40 public:
42 size_t size() const;
43 void addItem( ParserItem );
44 void addDataItem( ParserItem item );
45 const ParserItem& get(size_t index) const;
46 const ParserItem& get(const std::string& itemName) const;
47 DeckRecord parse( const ParseContext&, ErrorGuard&, RawRecord&, UnitSystem& active_unitsystem, UnitSystem& default_unitsystem, const KeywordLocation& location) const;
48 bool isDataRecord() const;
49 bool equal(const ParserRecord& other) const;
50 bool hasDimension() const;
51 bool hasItem(const std::string& itemName) const;
52 std::vector< ParserItem >::const_iterator begin() const;
53 std::vector< ParserItem >::const_iterator end() const;
54
55 bool operator==( const ParserRecord& ) const;
56 bool operator!=( const ParserRecord& ) const;
57 bool rawStringRecord() const;
58 const std::string& end_string() const;
59
60 private:
61 bool m_dataRecord;
62 std::vector< ParserItem > m_items;
63 bool raw_string_record = false;
64 std::string record_end = "/";
65 };
66
67std::ostream& operator<<( std::ostream&, const ParserRecord& );
68}
69
70
71#endif /* PARSERRECORD_HPP */
72
Definition DeckRecord.hpp:32
Definition ErrorGuard.hpp:29
Definition KeywordLocation.hpp:27
Definition ParseContext.hpp:84
Definition ParserItem.hpp:61
Definition ParserRecord.hpp:39
Class representing the lowest level of the Raw datatypes, a record.
Definition RawRecord.hpp:36
Definition UnitSystem.hpp:34
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30