Develop Biology
The language of life
Symmetry.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
23#include "bio/common/String.h"
24
25namespace bio {
26namespace physical {
27
29 :
30 Class< Symmetry >(this),
31 Identifiable< StandardDimension >(&SymmetryPerspective::Instance()),
32 m_type(&SymmetryTypePerspective::Instance())
33{
34
35}
36
37Symmetry::Symmetry(
38 Name name,
39 Name type
40)
41 :
42 Class< Symmetry >(this),
43 m_type(
44 type,
45 &SymmetryTypePerspective::Instance())
46{
48 name,
49 &SymmetryPerspective::Instance()
50 );
51}
52
54 Name name,
55 SymmetryType type
56)
57 :
58 Class< Symmetry >(this),
59 m_type(
60 type,
61 &SymmetryTypePerspective::Instance())
62{
64 name,
65 &SymmetryPerspective::Instance()
66 );
67}
68
70 StandardDimension id,
71 Name type
72)
73 :
74 Class< Symmetry >(this),
75 m_type(
76 type,
77 &SymmetryTypePerspective::Instance())
78{
80 id,
81 &SymmetryPerspective::Instance()
82 );
83}
84
86 StandardDimension id,
87 SymmetryType type
88)
89 :
90 Class< Symmetry >(this),
91 m_type(
92 type,
93 &SymmetryTypePerspective::Instance())
94{
96 id,
97 &SymmetryPerspective::Instance()
98 );
99}
100
102{
103}
104
106{
107 return m_type;
108}
109
110void Symmetry::SetType(SymmetryType type)
111{
112 m_type.SetId(type);
113}
114
116{
117 m_type.SetName(type);
118}
119
121{
122 m_value = bytes;
123}
124
126{
127 return m_value;
128}
129
131{
132 return &m_value;
133}
134
135} //physical namespace
136} //bio namespace
void Initialize(ByteStreams args)
Definition: VirtualBase.cpp:40
Name GetType() const
Definition: Symmetry.h:48
void SetType(SymmetryType type)
Definition: Symmetry.cpp:110
ByteStream m_value
Definition: Symmetry.h:60
Symmetry(Name name, Name type)
Definition: Symmetry.cpp:37
virtual const ByteStream & GetValue() const
Definition: Symmetry.cpp:125
SetValue(const ByteStream &bytes)
Definition: Symmetry.cpp:120
virtual ByteStream * AccessValue()
Definition: Symmetry.cpp:130
Identifiable< SymmetryType > m_type
Definition: Symmetry.h:133
Definition: Cell.h:31
const char * Name
Definition: Types.h:46