My Project
Loading...
Searching...
No Matches
MessageLimits.hpp
1/*
2 Copyright 2016 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 OPM_MESSAGES_HPP
21#define OPM_MESSAGES_HPP
22
23namespace Opm {
24
25 class Deck;
26 class DeckKeyword;
27
29 public:
31 explicit MessageLimits(const Deck& deck);
32
33 static MessageLimits serializationTestObject();
34
36 int getMessagePrintLimit() const;
37 int getCommentPrintLimit() const;
38 int getWarningPrintLimit() const;
39 int getProblemPrintLimit() const;
40 int getErrorPrintLimit() const;
41 int getBugPrintLimit() const;
42 void setMessagePrintLimit(int value);
43 void setCommentPrintLimit(int value);
44 void setWarningPrintLimit(int value);
45 void setProblemPrintLimit(int value);
46 void setErrorPrintLimit(int value);
47 void setBugPrintLimit(int value);
48
49 int getMessageStopLimit() const;
50 int getCommentStopLimit() const;
51 int getWarningStopLimit() const;
52 int getProblemStopLimit() const;
53 int getErrorStopLimit() const;
54 int getBugStopLimit() const;
55 void setMessageStopLimit(int value);
56 void setCommentStopLimit(int value);
57 void setWarningStopLimit(int value);
58 void setProblemStopLimit(int value);
59 void setErrorStopLimit(int value);
60 void setBugStopLimit(int value);
61
62 bool operator==(const MessageLimits& data) const;
63 void update(const DeckKeyword& keyword);
64
65 template<class Serializer>
66 void serializeOp(Serializer& serializer)
67 {
68 serializer(message_print_limit);
69 serializer(comment_print_limit);
70 serializer(warning_print_limit);
71 serializer(problem_print_limit);
72 serializer(error_print_limit);
73 serializer(bug_print_limit);
74 serializer(message_stop_limit);
75 serializer(comment_stop_limit);
76 serializer(warning_stop_limit);
77 serializer(problem_stop_limit);
78 serializer(error_stop_limit);
79 serializer(bug_stop_limit);
80 }
81
82 private:
83 int message_print_limit;
84 int comment_print_limit;
85 int warning_print_limit;
86 int problem_print_limit;
87 int error_print_limit;
88 int bug_print_limit;
89 int message_stop_limit;
90 int comment_stop_limit;
91 int warning_stop_limit;
92 int problem_stop_limit;
93 int error_stop_limit;
94 int bug_stop_limit;
95 };
96}
97
98#endif
Definition DeckKeyword.hpp:36
Definition Deck.hpp:49
Definition MessageLimits.hpp:28
int getMessagePrintLimit() const
Get all the value from MESSAGES keyword.
Definition MessageLimits.cpp:67
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30