Develop Biology
The language of life
DNA.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/molecular/DNA.h"
27
28namespace bio {
29namespace molecular {
30
31void DNA::CtorCommon()
32{
33 m_protein = NULL;
34 m_version = 0.0f;
35}
36
37DNA::~DNA()
38{
39 if (m_protein)
40 {
41 delete m_protein;
42 m_protein = NULL;
43 }
44}
45
47{
48 return m_protein;
49}
50
52{
53 return m_protein;
54}
55
56StandardDimension DNA::GetProteinId() const
57{
59 return ProteinPerspective::InvalidId());
60 return m_protein->GetId();
61}
62
64{
65 return m_version;
66}
67
68void DNA::SetVersion(Version newVersion)
69{
70 m_version = newVersion;
71}
72
74{
75 m_protein = protein;
76}
77
78} //molecular namespace
79} //bio namespace
#define BIO_SANITIZE(test, success, failure)
virtual Protein * GetProtein()
Definition: DNA.cpp:46
virtual void SetProtein(Protein *protein)
Definition: DNA.cpp:73
virtual Version GetVersion()
Definition: DNA.cpp:63
virtual StandardDimension GetProteinId() const
Definition: DNA.cpp:56
virtual void SetVersion(Version newVersion)
Definition: DNA.cpp:68
Version m_version
Definition: DNA.h:106
Protein * m_protein
Definition: DNA.h:105
float Version
Definition: Types.h:34
Definition: Cell.h:31