Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MapErrorMsg.h
Go to the documentation of this file.
1 //
2 // MapErrorMsg.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2011, Christopher John Topping, Aarhus University
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without modification, are permitted provided
10 that the following conditions are met:
11 
12 Redistributions of source code must retain the above copyright notice, this list of conditions and the
13 following disclaimer.
14 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
15 the following disclaimer in the documentation and/or other materials provided with the distribution.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
20 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 ********************************************************************************************************
26 */
27 
28 #ifndef MAPERRORMSG_H
29 #define MAPERRORMSG_H
30 
31 extern class MapErrorMsg *g_msg;
32 
33 typedef enum {
42 
44 {
45 public:
46 
48  std::string m_warnfile;
49 
50 public:
51  void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2);
52  void Warn(MapErrorState a_level, std::string a_msg1, int);
53  void Warn(std::string a_msg1, std::string a_msg2);
54  void Warn(std::string a_msg1, double a_num);
55  void WarnAddInfo(MapErrorState a_level, std::string a_add1, std::string a_add2);
56  void WarnAddInfo(MapErrorState a_level, std::string a_add1, double a_num);
57  void SetWarnLevel(MapErrorState a_level);
58  void SetFilename(std::string a_warnfile);
59  std::string GetFilename();
60  MapErrorMsg();
61 };
62 
64 
65 //#define __UNIX__
66 #ifdef __UNIX__
67 // #define AnsiString char *
68 // typedef char * AnsiString
69 #endif // __UNIX__
70 
71 #endif // MAPERRORMSG_H
72 
WARN_FILE
Definition: MapErrorMsg.h:37
WARN_MSG
Definition: MapErrorMsg.h:38
MapErrorMsg::MapErrorMsg
MapErrorMsg()
Definition: MapErrorMsg.cpp:43
MapErrorMsg::WarnAddInfo
void WarnAddInfo(MapErrorState a_level, std::string a_add1, std::string a_add2)
Definition: MapErrorMsg.cpp:160
WARN_FATAL
Definition: MapErrorMsg.h:35
MapErrorMsg::SetFilename
void SetFilename(std::string a_warnfile)
Definition: MapErrorMsg.cpp:48
CreateErrorMsg
MapErrorMsg * CreateErrorMsg()
Definition: MapErrorMsg.cpp:202
g_msg
class MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
MapErrorMsg::m_level
MapErrorState m_level
Definition: MapErrorMsg.h:47
CreateErrorMsg
MapErrorMsg * CreateErrorMsg()
Definition: MapErrorMsg.cpp:202
MapErrorMsg
Definition: MapErrorMsg.h:43
WARN_UNDEF
Definition: MapErrorMsg.h:36
MapErrorMsg::SetWarnLevel
void SetWarnLevel(MapErrorState a_level)
Definition: MapErrorMsg.cpp:58
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
MapErrorMsg::GetFilename
std::string GetFilename()
Definition: MapErrorMsg.cpp:53
MapErrorMsg.h
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
WARN_ALL
Definition: MapErrorMsg.h:40
MapErrorMsg::m_warnfile
std::string m_warnfile
Definition: MapErrorMsg.h:48
MapErrorState
MapErrorState
Definition: MapErrorMsg.h:33
WARN_BUG
Definition: MapErrorMsg.h:34
WARN_TRIVIAL
Definition: MapErrorMsg.h:39