KIM API V2
KIM_LogVerbosity.hpp
Go to the documentation of this file.
1 //
2 // CDDL HEADER START
3 //
4 // The contents of this file are subject to the terms of the Common Development
5 // and Distribution License Version 1.0 (the "License").
6 //
7 // You can obtain a copy of the license at
8 // http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 // specific language governing permissions and limitations under the License.
10 //
11 // When distributing Covered Code, include this CDDL HEADER in each file and
12 // include the License file in a prominent location with the name LICENSE.CDDL.
13 // If applicable, add the following below this CDDL HEADER, with the fields
14 // enclosed by brackets "[]" replaced with your own identifying information:
15 //
16 // Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 //
18 // CDDL HEADER END
19 //
20 
21 //
22 // Copyright (c) 2016--2018, Regents of the University of Minnesota.
23 // All rights reserved.
24 //
25 // Contributors:
26 // Ryan S. Elliott
27 //
28 
29 //
30 // Release: This file is part of the kim-api-v2.0.0-beta.0 package.
31 //
32 
33 
34 #ifndef KIM_LOG_VERBOSITY_HPP_
35 #define KIM_LOG_VERBOSITY_HPP_
36 
37 #include <string>
38 
39 #ifndef KIM_LOG_DEFINES_INC_
40 #include "KIM_LOG_DEFINES.inc"
41 #endif
42 
43 namespace KIM
44 {
45 
47 {
48  public:
50 
51  LogVerbosity();
52  LogVerbosity(int const id);
53  LogVerbosity(std::string const & str);
54  bool operator<(LogVerbosity const & rhs) const;
55  bool operator>(LogVerbosity const & rhs) const;
56  bool operator<=(LogVerbosity const & rhs) const;
57  bool operator>=(LogVerbosity const & rhs) const;
58  bool operator==(LogVerbosity const & rhs) const;
59  bool operator!=(LogVerbosity const & rhs) const;
60  std::string const & String() const;
61 };
62 
63 namespace LOG_VERBOSITY
64 {
65 extern LogVerbosity const silent;
66 extern LogVerbosity const fatal;
67 extern LogVerbosity const error;
68 extern LogVerbosity const warning;
69 extern LogVerbosity const information;
70 extern LogVerbosity const debug;
71 
72 void GetNumberOfLogVerbosities(int * const numberOfLogVerbosities);
73 int GetLogVerbosity(int const index, LogVerbosity * const logVerbosity);
74 
75 struct Comparator
76 {
77  bool operator()(LogVerbosity const & a, LogVerbosity const & b) const
78  {
79  return a.logVerbosityID < b.logVerbosityID;
80  }
81 };
82 } // namespace LOG_VERBOSITY
83 } // namespace KIM
84 #endif // KIM_LOG_VERBOSITY_HPP_
int GetLogVerbosity(int const index, LogVerbosity *const logVerbosity)
bool operator<(LogVerbosity const &rhs) const
LogVerbosity const information
bool operator<=(LogVerbosity const &rhs) const
LogVerbosity const debug
LogVerbosity const silent
void GetNumberOfLogVerbosities(int *const numberOfLogVerbosities)
bool operator!=(LogVerbosity const &rhs) const
bool operator>=(LogVerbosity const &rhs) const
LogVerbosity const warning
std::string const & String() const
bool operator>(LogVerbosity const &rhs) const
bool operator==(LogVerbosity const &rhs) const
LogVerbosity const fatal
bool operator()(LogVerbosity const &a, LogVerbosity const &b) const
LogVerbosity const error