Develop Biology
The language of life
Surface.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
30
31namespace bio {
32namespace molecular {
33
34class Molecule;
35
41class Surface :
42 public Class< Surface >,
43 public chemical::LinearMotif< Molecule* >,
44 public EnvironmentDependent< Molecule >
45{
46public:
47
52 Surface)
53
54
57 Surface(
58 Name name,
60 );
61
68 Surface(const Surface& toCopy);
69
73 virtual ~Surface();
74
79 virtual physical::Symmetry* Spin() const;
80
86 virtual Code Reify(physical::Symmetry* symmetry);
87
96 template < typename T >
97 T Manage(T varPtr)
98 {
100 varPtr,
102 }
103
112 template < typename T >
113 T Use(T varPtr)
114 {
115 FormBond(
116 varPtr,
118 }
119
128 template < typename T >
130 T toBind,
131 BondType bondType = bond_type::Temporary())
132 {
133 FormBond(
134 toBind,
135 bondType
136 );
137 return toBind;
138 }
139
146 virtual physical::Wave* Release(
147 physical::Wave* toRelease,
148 BondType bondType = bond_type::Temporary());
149
159 Name toRelease,
161 BondType bondType = bond_type::Temporary());
162
172 StandardDimension toRelease,
174 BondType bondType = bond_type::Temporary());
175
180 virtual physical::Waves ReleaseAll(BondType bondType = bond_type::Temporary());
181
186 virtual void SetEnvironment(Molecule* environment);
187
192 virtual void SetPerspective(Molecule* perspective);
193
199 template < typename T >
200 T operator+=(T toBind)
201 {
202 return Bind< T >(toBind);
203 }
204
210 virtual physical::Wave* operator-=(physical::Wave* toRelease);
211
217 virtual chemical::Substance* operator-=(Name toRelease);
218
224 virtual chemical::Substance* operator-=(StandardDimension toRelease);
225
230 virtual physical::Waves operator--();
231};
232
233} //molecular namespace
234} //bio namespace
bool FormBond(T toBond, BondType type=bond_type::Unknown())
Definition: Atom.h:237
physical::Perspective< StandardDimension > * perspective
Definition: Class.h:56
T Bind(T toBind, BondType bondType=bond_type::Temporary())
Definition: Surface.h:129
virtual physical::Wave * operator-=(physical::Wave *toRelease)
Definition: Surface.cpp:227
virtual void SetEnvironment(Molecule *environment)
Definition: Surface.cpp:95
T operator+=(T toBind)
Definition: Surface.h:200
T Manage(T varPtr)
Definition: Surface.h:97
virtual void SetPerspective(Molecule *perspective)
Definition: Surface.cpp:102
virtual physical::Waves ReleaseAll(BondType bondType=bond_type::Temporary())
Definition: Surface.cpp:207
Molecule * environment
Definition: Surface.h:59
virtual physical::Wave * Release(physical::Wave *toRelease, BondType bondType=bond_type::Temporary())
Definition: Surface.cpp:119
BIO_DISAMBIGUATE_ALL_CLASS_METHODS(molecular, Surface) Surface(Name name
Surface(const Surface &toCopy)
Definition: Surface.cpp:30
virtual physical::Waves operator--()
Definition: Surface.cpp:242
virtual physical::Symmetry * Spin() const
Definition: Surface.cpp:113
virtual Code Reify(physical::Symmetry *symmetry)
Definition: Surface.cpp:107
BondType Manage()
BondType Temporary()
BondType Use()
std::vector< Wave * > Waves
Definition: Wave.h:48
Definition: Cell.h:31
const char * Name
Definition: Types.h:46