Develop Biology
The language of life
FetchPlasmid.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/genetic/Plasmid.h"
25
26namespace bio {
27namespace genetic {
28
30 :
31 molecular::Protein(chemical::PeriodicTable::Instance().GetNameFromType(*this))
32{
33 mc_nameSite = Define("Name Binding Site");
34 mc_idSite = Define("Id Binding Site");
35 mc_returnSite = Define("Return Site");
36}
37
39{
40
41}
42
44{
45 Code ret = code::BadArgument1();
46
48
49 Name boundName = RotateTo< Name >(mc_nameSite);
50 StandardDimension boundId = RotateTo< StandardDimension >(mc_idSite);
51
52 if (boundName)
53 {
54 RotateTo(mc_returnSite)->Bind(PlasmidPerspective::Instance().GetTypeFromIdAs< Plasmid* >(boundId));
55 ret = code::Success();
56 }
57 else if (boundId)
58 {
59 RotateTo(mc_returnSite)->Bind(PlasmidPerspective::Instance().GetTypeFromIdAs< Plasmid* >(boundId));
60 ret = code::Success();
61 }
62
65
66 return ret;
67}
68
69} //genetic namespace
70} //bio namespace
StandardDimension mc_returnSite
Definition: FetchPlasmid.h:56
StandardDimension mc_idSite
Definition: FetchPlasmid.h:55
StandardDimension mc_nameSite
Definition: FetchPlasmid.h:54
virtual Surface * RotateTo(StandardDimension surfaceId)
Definition: Molecule.cpp:48
StandardDimension Define(Name varName)
Definition: Molecule.h:135
T Bind(T toBind, BondType bondType=bond_type::Temporary())
Definition: Surface.h:129
virtual physical::Waves ReleaseAll(BondType bondType=bond_type::Temporary())
Definition: Surface.cpp:207
Code BadArgument1()
Code Success()
Definition: Cell.h:31
const char * Name
Definition: Types.h:46