Internalize MESSAGES keyword.
This commit is contained in:
@@ -77,6 +77,7 @@ ${log_source}
|
||||
|
||||
set (state_source
|
||||
EclipseState/EclipseState.cpp
|
||||
EclipseState/Messages.cpp
|
||||
#
|
||||
EclipseState/checkDeck.cpp
|
||||
#
|
||||
@@ -176,6 +177,7 @@ Units/Dimension.hpp
|
||||
Units/ConversionFactors.hpp
|
||||
#
|
||||
EclipseState/EclipseState.hpp
|
||||
EclipseState/Messages.hpp
|
||||
#
|
||||
EclipseState/checkDeck.hpp
|
||||
#
|
||||
|
||||
42
opm/parser/eclipse/EclipseState/Messages.cpp
Normal file
42
opm/parser/eclipse/EclipseState/Messages.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2016 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/>.
|
||||
*/
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/M.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Messages.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
Messages::Messages(const DeckRecord& record) {
|
||||
m_message_print_limit = record.getItem<ParserKeywords::MESSAGES::MESSAGE_PRINT_LIMIT>()->getInt( 0 );
|
||||
m_comment_print_limit = record.getItem<ParserKeywords::MESSAGES::COMMENT_PRINT_LIMIT>()->getInt( 0 );
|
||||
m_warning_print_limit = record.getItem<ParserKeywords::MESSAGES::WARNING_PRINT_LIMIT>()->getInt(0);
|
||||
m_problem_print_limit = record.getItem<ParserKeywords::MESSAGES::PROBLEM_PRINT_LIMIT>()->getInt(0);
|
||||
m_error_print_limit = record.getItem<ParserKeywords::MESSAGES::ERROR_PRINT_LIMIT>()->getInt(0);
|
||||
m_bug_print_limit = record.getItem<ParserKeywords::MESSAGES::BUG_PRINT_LIMIT>()->getInt(0);
|
||||
m_message_stop_limit = record.getItem<ParserKeywords::MESSAGES::MESSAGE_STOP_LIMIT>()->getInt(0);
|
||||
m_comment_stop_limit = record.getItem<ParserKeywords::MESSAGES::COMMENT_STOP_LIMIT>()->getInt(0);
|
||||
m_warning_stop_limit = record.getItem<ParserKeywords::MESSAGES::WARNING_STOP_LIMIT>()->getInt(0);
|
||||
m_problem_stop_limit = record.getItem<ParserKeywords::MESSAGES::PROBLEM_STOP_LIMIT>()->getInt(0);
|
||||
m_error_stop_limit = record.getItem<ParserKeywords::MESSAGES::ERROR_STOP_LIMIT>()->getInt(0);
|
||||
m_bug_stop_limit = record.getItem<ParserKeywords::MESSAGES::BUG_STOP_LIMIT>()->getInt(0);
|
||||
}
|
||||
}
|
||||
|
||||
48
opm/parser/eclipse/EclipseState/Messages.hpp
Normal file
48
opm/parser/eclipse/EclipseState/Messages.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2016 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 OPM_MESSAGES_HPP
|
||||
#define OPM_MESSAGES_HPP
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Messages {
|
||||
public:
|
||||
Messages(const DeckRecord& record);
|
||||
|
||||
private:
|
||||
int m_message_print_limit;
|
||||
int m_comment_print_limit;
|
||||
int m_warning_print_limit;
|
||||
int m_problem_print_limit;
|
||||
int m_error_print_limit;
|
||||
int m_bug_print_limit;
|
||||
|
||||
int m_message_stop_limit;
|
||||
int m_comment_stop_limit;
|
||||
int m_warning_stop_limit;
|
||||
int m_problem_stop_limit;
|
||||
int m_error_stop_limit;
|
||||
int m_bug_stop_limit;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user