Develop Biology
The language of life
Protein.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
26
27namespace bio {
28namespace molecular {
29
30void Protein::CtorCommon()
31{
32 m_source = NULL;
33}
34
35Protein::~Protein()
36{
37}
38
40{
41 Code ret = code::Success();
43 chemical::Emission result = ForEach<Protein*>(fold);
44 //We don't care about result right now.
45 return ret;
46}
47
49{
50 SetEnvironment(environment);
51 BIO_EXCITATION_CLASS(Protein, Code, Vesicle*) recruitChaperones(&Protein::RecruitChaperones, environment);
52 chemical::Emission result = ForEach<Protein*>(&recruitChaperones);
53 //We don't care about result right now.
54 return code::Success();
55}
56
57
59{
60 Code ret = code::Success();
62 chemical::Emission result = ForEach<Protein*>(activate);
63 //We don't care about result right now.
64 return ret;
65}
66
68{
69 return Activate();
70}
71
72Code Protein::SetSource(const DNA* source)
73{
74 m_source = source;
75 return code::Success();
76}
77
78const DNA* Protein::GetSource() const
79{
80 return m_source;
81}
82
83} //molecular namespace
84} //bio namespace
#define BIO_EXCITATION_CLASS(wave, ret,...)
virtual void SetEnvironment(Vesicle *environment)
virtual Code Activate()
Definition: Protein.cpp:58
virtual Code RecruitChaperones(Vesicle *environment)
Definition: Protein.cpp:48
virtual const DNA * GetSource() const
Definition: Protein.cpp:78
virtual Code operator()()
Definition: Protein.cpp:67
virtual Code SetSource(const DNA *source)
Definition: Protein.cpp:72
virtual Code Fold()
Definition: Protein.cpp:39
const DNA * m_source
Definition: Protein.h:140
Code Success()
Definition: Cell.h:31