Develop Biology
The language of life
Axis.cpp
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#include "bio/physical/Axis.h"
23#include "bio/physical/Wave.h"
25
26namespace bio {
27namespace physical {
28
30{
31
32}
33
35{
36
37}
38
39/*static*/ std::string Axis::Failed()
40{
41 return "FAILED";
42}
43
44std::string Axis::Rotate(Symmetry* symmetry) const
45{
46 return Encode(symmetry);
47}
48
49Symmetry* Axis::Rotate(std::string) const
50{
51 return NULL;
52}
53
54std::string Axis::operator|(Wave* particle) const
55{
56 BIO_SANITIZE(particle, ,
57 return Failed());
58 return Rotate(particle->Spin());
59}
60
61Symmetry* Axis::operator()(std::string encoded) const
62{
63 return Rotate(encoded);
64}
65
66std::string Axis::Encode(Symmetry* symmetry) const
67{
68 return Failed();
69}
70
71} //physical namespace
72} //bio namespace
#define BIO_SANITIZE(test, success, failure)
virtual ~Axis()
Definition: Axis.cpp:34
virtual Symmetry * operator()(std::string encoded) const
Definition: Axis.cpp:61
virtual std::string Rotate(Symmetry *symmetry) const
Definition: Axis.cpp:44
virtual std::string Encode(Symmetry *symmetry) const
Definition: Axis.cpp:66
virtual std::string operator|(Wave *particle) const
Definition: Axis.cpp:54
static std::string Failed()
Definition: Axis.cpp:39
virtual Symmetry * Spin() const
Definition: Wave.cpp:59
Definition: Cell.h:31