suanPan
LogicCriterion.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 LOGICCRITERION_H
32#define LOGICCRITERION_H
33
34#include "Criterion.h"
35
36class LogicCriterion : public Criterion {
37 const unsigned tag_a, tag_b;
38
39protected:
40 shared_ptr<Criterion> criterion_a, criterion_b;
41
42public:
43 explicit LogicCriterion(unsigned, unsigned, unsigned, unsigned);
44
45 int initialize(const shared_ptr<DomainBase>&) override;
46};
47
48class LogicCriterionAND final : public LogicCriterion {
49public:
51
52 unique_ptr<Criterion> get_copy() override;
53
54 int process(const shared_ptr<DomainBase>&) override;
55};
56
57class LogicCriterionOR final : public LogicCriterion {
58public:
60
61 unique_ptr<Criterion> get_copy() override;
62
63 int process(const shared_ptr<DomainBase>&) override;
64};
65
66#endif
67
A Criterion class.
Definition: Criterion.h:38
Definition: LogicCriterion.h:48
int process(const shared_ptr< DomainBase > &) override
Definition: LogicCriterion.cpp:49
unique_ptr< Criterion > get_copy() override
Definition: LogicCriterion.cpp:47
A LogicCriterion class.
Definition: LogicCriterion.h:36
int initialize(const shared_ptr< DomainBase > &) override
Definition: LogicCriterion.cpp:26
shared_ptr< Criterion > criterion_b
Definition: LogicCriterion.h:40
LogicCriterion(unsigned, unsigned, unsigned, unsigned)
Definition: LogicCriterion.cpp:21
shared_ptr< Criterion > criterion_a
Definition: LogicCriterion.h:40
Definition: LogicCriterion.h:57
unique_ptr< Criterion > get_copy() override
Definition: LogicCriterion.cpp:58
int process(const shared_ptr< DomainBase > &) override
Definition: LogicCriterion.cpp:60