suanPan
Bead.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
******************************************************************************/
26
#ifndef BEAD_H
27
#define BEAD_H
28
29
#include <
Domain/Storage.hpp
>
30
31
class
DomainBase
;
32
33
class
Bead
{
34
unsigned
current_domain_tag = 1;
35
36
DomainBaseStorage
domain_pool;
37
38
public
:
39
Bead
();
40
41
bool
insert
(
const
shared_ptr<DomainBase>&);
42
void
erase_domain
(
unsigned
);
43
void
enable_domain
(
unsigned
);
44
void
disable_domain
(
unsigned
);
45
46
void
set_current_domain_tag
(
unsigned
);
47
unsigned
get_current_domain_tag
()
const
;
48
49
const
shared_ptr<DomainBase>&
get_domain
(
unsigned
)
const
;
50
const
shared_ptr<DomainBase>&
get_current_domain
()
const
;
51
52
friend
shared_ptr<DomainBase>&
get_domain
(
const
shared_ptr<Bead>&,
unsigned
);
53
friend
shared_ptr<DomainBase>&
get_current_domain
(
const
shared_ptr<Bead>&);
54
55
int
precheck
();
56
57
int
analyze
();
58
};
59
60
#endif
Storage.hpp
Bead
A Bead class is a top level container.
Definition:
Bead.h:33
Bead::analyze
int analyze()
Definition:
Bead.cpp:70
Bead::erase_domain
void erase_domain(unsigned)
Definition:
Bead.cpp:26
Bead::enable_domain
void enable_domain(unsigned)
Definition:
Bead.cpp:43
Bead::get_current_domain_tag
unsigned get_current_domain_tag() const
Definition:
Bead.cpp:49
Bead::precheck
int precheck()
Definition:
Bead.cpp:55
Bead::insert
bool insert(const shared_ptr< DomainBase > &)
Definition:
Bead.cpp:24
Bead::disable_domain
void disable_domain(unsigned)
Definition:
Bead.cpp:45
Bead::get_current_domain
const shared_ptr< DomainBase > & get_current_domain() const
Definition:
Bead.cpp:53
Bead::Bead
Bead()
Definition:
Bead.cpp:22
Bead::get_domain
const shared_ptr< DomainBase > & get_domain(unsigned) const
Definition:
Bead.cpp:51
Bead::set_current_domain_tag
void set_current_domain_tag(unsigned)
Definition:
Bead.cpp:47
DomainBase
The DomainBase class is a template.
Definition:
DomainBase.h:104
Storage< DomainBase >
Step
Bead.h
Generated by
1.9.4