Develop Biology
The language of life
Bond.h
Go to the documentation of this file.
1/*
2 * This file is a part of the Biology project by eons LLC.
3 * Biology (aka Develop Biology) is a framework for approaching software
4 * development from a natural sciences perspective.
5 *
6 * Copyright (C) 2021 Séon O'Shannon & eons LLC
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as
10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
27
28namespace bio {
29
30namespace physical {
31class Wave;
32}
33
34namespace chemical {
35
43class Bond
44{
45public:
49 Bond();
50
56 Bond(
57 AtomicNumber id,
58 physical::Wave* bonded,
59 BondType type = bond_type::Unknown());
60
64 ~Bond();
65
70 bool operator==(const AtomicNumber id) const;
71
76 bool operator==(const Bond& other) const;
77
86 bool Form(
87 AtomicNumber id,
88 physical::Wave* bonded,
89 BondType type = bond_type::Unknown());
90
94 AtomicNumber GetId() const;
95
100
104 const physical::Wave* GetBonded() const;
105
109 BondType GetType() const;
110
114 bool IsEmpty() const;
115
119 void Break();
120
121private:
122 AtomicNumber m_id;
123 physical::Wave* m_bonded;
124 BondType m_type;
125};
126
128
129} //chemical namespace
130} //bio namespace
bool IsEmpty() const
Definition: Bond.cpp:89
bool operator==(const AtomicNumber id) const
Definition: Bond.cpp:101
BondType GetType() const
Definition: Bond.cpp:84
bool Form(AtomicNumber id, physical::Wave *bonded, BondType type=bond_type::Unknown())
Definition: Bond.cpp:55
AtomicNumber GetId() const
Definition: Bond.cpp:69
physical::Wave * GetBonded()
Definition: Bond.cpp:74
BondType Unknown()
uint16_t AtomicNumber
Definition: Types.h:72
physical::Arrangement< Bond * > Bonds
Definition: Bond.h:127
Definition: Cell.h:31