CASM
1.1.0
A Clusters Approach to Statistical Mechanics
Validator.hh
Go to the documentation of this file.
1
#ifndef CASM_Validator
2
#define CASM_Validator
3
4
#include <set>
5
#include <string>
6
7
namespace
CASM
{
8
10
struct
Validator
{
11
std::set<std::string>
error
;
12
std::set<std::string>
warning
;
13
14
void
clear
() {
15
error
.clear();
16
warning
.clear();
17
}
18
19
Validator
&
insert
(
const
Validator
&other) {
20
error
.insert(other.
error
.begin(), other.
error
.end());
21
warning
.insert(other.
warning
.begin(), other.
warning
.end());
22
return
*
this
;
23
}
24
25
bool
valid
()
const
{
return
!
error
.size(); }
26
};
27
28
}
// namespace CASM
29
30
#endif
CASM
Main CASM namespace.
Definition:
APICommand.hh:8
CASM::Validator
Data structure to hold error and warning messages.
Definition:
Validator.hh:10
CASM::Validator::insert
Validator & insert(const Validator &other)
Definition:
Validator.hh:19
CASM::Validator::valid
bool valid() const
Definition:
Validator.hh:25
CASM::Validator::error
std::set< std::string > error
Definition:
Validator.hh:11
CASM::Validator::warning
std::set< std::string > warning
Definition:
Validator.hh:12
CASM::Validator::clear
void clear()
Definition:
Validator.hh:14
include
casm
misc
Validator.hh
Generated on Tue Mar 23 2021 14:16:41 for CASM by
1.9.1