suanPan
Modifier.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2022 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  ******************************************************************************/
28 #ifndef MODIFIER_H
29 #define MODIFIER_H
30 
31 #include <Domain/Tag.h>
32 #include <Element/Element.h>
33 
34 class DomainBase;
35 
36 class Modifier : public Tag {
37  uvec element_tag;
38 
39 protected:
40  std::vector<weak_ptr<Element>> element_pool;
41 
42 public:
43  explicit Modifier(unsigned = 0, // tag
44  uvec&& = {} // element tags
45  );
46  Modifier(const Modifier&) = delete; // copy forbidden
47  Modifier(Modifier&&) = delete; // move forbidden
48  Modifier& operator=(const Modifier&) = delete; // assign forbidden
49  Modifier& operator=(Modifier&&) = delete; // assign forbidden
50 
51  ~Modifier() override;
52 
53  virtual void initialize(const shared_ptr<DomainBase>&);
54 
55  virtual int update_status() = 0;
56 };
57 
58 #endif
59 
The DomainBase class is a template.
Definition: DomainBase.h:90
A Modifier class.
Definition: Modifier.h:36
virtual void initialize(const shared_ptr< DomainBase > &)
Definition: Modifier.cpp:27
Modifier & operator=(const Modifier &)=delete
std::vector< weak_ptr< Element > > element_pool
Definition: Modifier.h:40
Modifier & operator=(Modifier &&)=delete
Modifier(unsigned=0, uvec &&={})
Definition: Modifier.cpp:21
virtual int update_status()=0
Modifier(Modifier &&)=delete
~Modifier() override
Definition: Modifier.cpp:25
Modifier(const Modifier &)=delete
A base Tag class.
Definition: Tag.h:38