suanPan
Criterion.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2017-2024 Theodore Chang
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
31#ifndef CRITERION_H
32#define CRITERION_H
33
34#include <Domain/Tag.h>
35
36class DomainBase;
37
38class Criterion : public Tag {
39 unsigned step_tag;
40
41public:
42 explicit Criterion(unsigned = 0, unsigned = 0);
43 ~Criterion() override = default;
44
45 void set_step_tag(unsigned);
46 [[nodiscard]] unsigned get_step_tag() const;
47
48 virtual unique_ptr<Criterion> get_copy() = 0;
49
50 virtual int initialize(const shared_ptr<DomainBase>&);
51
52 virtual int process(const shared_ptr<DomainBase>&) = 0;
53};
54
55#endif
56
A Criterion class.
Definition: Criterion.h:38
void set_step_tag(unsigned)
Definition: Criterion.cpp:25
virtual unique_ptr< Criterion > get_copy()=0
~Criterion() override=default
virtual int initialize(const shared_ptr< DomainBase > &)
Definition: Criterion.cpp:29
Criterion(unsigned=0, unsigned=0)
Definition: Criterion.cpp:21
unsigned get_step_tag() const
Definition: Criterion.cpp:27
virtual int process(const shared_ptr< DomainBase > &)=0
The DomainBase class is a template.
Definition: DomainBase.h:104
A base Tag class.
Definition: Tag.h:38