kim-api  2.2.1+v2.2.1.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
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--2020, 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-2.2.1 package.
31 //
32 
33 
34 #ifndef KIM_LOG_VERBOSITY_HPP_
35 #define KIM_LOG_VERBOSITY_HPP_
36 
37 #include <string>
38 
39 
40 namespace KIM
41 {
52 {
53  public:
64 
68  LogVerbosity();
69 
75  LogVerbosity(int const id);
76 
85  LogVerbosity(std::string const & str);
86 
95  bool Known() const;
96 
102  bool operator<(LogVerbosity const & rhs) const;
103 
110  bool operator>(LogVerbosity const & rhs) const;
111 
118  bool operator<=(LogVerbosity const & rhs) const;
119 
126  bool operator>=(LogVerbosity const & rhs) const;
127 
135  bool operator==(LogVerbosity const & rhs) const;
136 
144  bool operator!=(LogVerbosity const & rhs) const;
145 
156  std::string const & ToString() const;
157 }; // class LogVerbosity
158 
161 namespace LOG_VERBOSITY
162 {
172 extern LogVerbosity const silent;
173 
185 extern LogVerbosity const fatal;
186 
198 extern LogVerbosity const error;
199 
214 extern LogVerbosity const warning;
215 
228 extern LogVerbosity const information;
229 
242 extern LogVerbosity const debug;
243 
244 
255 void GetNumberOfLogVerbosities(int * const numberOfLogVerbosities);
256 
271 int GetLogVerbosity(int const index, LogVerbosity * const logVerbosity);
272 
277 {
282  bool operator()(LogVerbosity const & a, LogVerbosity const & b) const
283  {
284  return a.logVerbosityID < b.logVerbosityID;
285  }
286 }; // struct Comparator
287 } // namespace LOG_VERBOSITY
288 } // namespace KIM
289 
290 #endif // KIM_LOG_VERBOSITY_HPP_
int GetLogVerbosity(int const index, LogVerbosity *const logVerbosity)
Get the identity of each defined standard LogVerbosity.
bool operator<(LogVerbosity const &rhs) const
Compares LogVerbosity objects for less-than.
std::string const & ToString() const
Converts the object to a string.
LogVerbosity const information
The standard information verbosity.
bool operator<=(LogVerbosity const &rhs) const
Compares LogVerbosity objects for less-than-equal.
LogVerbosity()
Create an uninitialized LogVerbosity object.
int logVerbosityID
Integer identifying the specific LogVerbosity represented.
LogVerbosity const debug
The standard debug verbosity.
LogVerbosity const silent
The standard silent verbosity.
void GetNumberOfLogVerbosities(int *const numberOfLogVerbosities)
Get the number of standard LogVerbosity&#39;s defined by the KIM API.
bool operator!=(LogVerbosity const &rhs) const
Compares LogVerbosity objects for inequality.
An Extensible Enumeration for the LogVerbosity&#39;s supported by the KIM API.
bool operator>=(LogVerbosity const &rhs) const
Compares LogVerbosity objects for greater-than-equal.
LogVerbosity const warning
The standard warning verbosity.
Structure provided for use with std::map.
bool operator>(LogVerbosity const &rhs) const
Compares LogVerbosity objects for greater-than.
bool operator==(LogVerbosity const &rhs) const
Compares LogVerbosity objects for equality.
bool Known() const
Determines if the object is a quantity known to the KIM API.
LogVerbosity const fatal
The standard fatal verbosity.
bool operator()(LogVerbosity const &a, LogVerbosity const &b) const
Provides an (logically unmeaningful) ordering for LogVerbosity objects so that they can be stored in ...
LogVerbosity const error
The standard error verbosity.