Develop Biology
The language of life
bio::genetic::Insertion Class Reference

#include <Insertion.h>

+ Inheritance diagram for bio::genetic::Insertion:
+ Collaboration diagram for bio::genetic::Insertion:

Public Member Functions

virtual BIO_DISAMBIGUATE_ALL_CLASS_METHODS(physical, Insertion) explicit Insertion(chemical ~Insertion ()
 
virtual chemical::SubstanceGetWhatWillBeInserted ()
 
virtual void InsertThis (chemical::Substance *toInsert)
 
virtual chemical::SubstanceSeek (chemical::Substance *insertIn) const
 
virtual void SetSite (Site site)
 
- Public Member Functions inherited from bio::physical::Class< Insertion >
 Class (Insertion *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Insertion * Convert (Wave *wave)
 
virtual operator Insertion * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::physical::Wave
 Wave (Symmetry *symmetry=NULL)
 
virtual ~Wave ()
 
virtual chemical::AtomAsAtom ()
 
virtual const chemical::AtomAsAtom () const
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual Code Attenuate (const Wave *other)
 
virtual WaveClone () const
 
virtual WaveDemodulate ()
 
virtual const WaveDemodulate () const
 
virtual Code Disattenuate (const Wave *other)
 
virtual Properties GetProperties () const
 
virtual WaveModulate (Wave *signal)
 
virtual Waveoperator* ()
 
virtual const Waveoperator* () const
 
virtual Waveoperator* (Wave *signal)
 
virtual void operator+ (const Wave *other)
 
virtual void operator- (const Wave *other)
 
virtual void operator| (Symmetry *symmetry)
 
virtual Code Reify (Symmetry *symmetry)
 
virtual SymmetrySpin () const
 
- Public Member Functions inherited from bio::genetic::Localization
virtual ~Localization ()
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Localization) explicit Localization(Site site
 
virtual Name GetNameOfSite () const
 
virtual Site GetSite () const
 
virtual chemical::SubstanceSeek (chemical::Substance *seekIn) const
 
virtual void SetNameOfSite (Name name)
 
virtual void SetSite (Site site)
 

Protected Attributes

chemical::Substancem_toInsert
 
- Protected Attributes inherited from bio::physical::Class< Insertion >
Insertion * m_object
 
- Protected Attributes inherited from bio::physical::Wave
Wavem_signal
 
Symmetrym_symmetry
 
- Protected Attributes inherited from bio::genetic::Localization
Name m_name
 
Localizationm_previous
 
Site m_site
 
chemical::ExcitationBasemc_method
 

Additional Inherited Members

- Static Public Member Functions inherited from bio::physical::Wave
static Properties GetResonanceBetween (const Wave *wave, const Properties &properties)
 
static Properties GetResonanceBetween (const Wave *wave1, const Wave *wave2)
 
static Properties GetResonanceBetween (ConstWaves waves)
 
- Public Attributes inherited from bio::genetic::Localization
Name name
 
- Protected Member Functions inherited from bio::genetic::Localization
chemical::SubstanceResolvePrevious (chemical::Substance *seekIn) const
 

Detailed Description

Insertions are a type of Insertion which, instead of just finding a place, add something to a place. This is used to move Proteins to their correct position after Transcription.

NOTE: All Sites currently have a 1 to 1 mapping with Sites and should always be the same value. i.e. Cast< Site >(mySiteId) == InsertionSitePerspective::Instance().GetIdWithoutCreation(mySiteName)

Definition at line 36 of file Insertion.h.

Constructor & Destructor Documentation

◆ ~Insertion()

bio::genetic::Insertion::~Insertion ( )
virtual

Ensure virtual methods point to Class implementations.

Parameters
whatToInsert
site
name

Definition at line 46 of file Insertion.cpp.

47{
48
49}

Member Function Documentation

◆ GetWhatWillBeInserted()

chemical::Substance * bio::genetic::Insertion::GetWhatWillBeInserted ( )
virtual
Returns
what *this will try to insert in its Localization

Definition at line 93 of file Insertion.cpp.

94{
95 return m_toInsert;
96}
chemical::Substance * m_toInsert
Definition: Insertion.h:92

◆ InsertThis()

void bio::genetic::Insertion::InsertThis ( chemical::Substance toInsert)
virtual

Tells *this to insert toInsert in its Localization.

Parameters
toInsert

Definition at line 88 of file Insertion.cpp.

89{
90 m_toInsert = toInsert;
91}

◆ Seek()

chemical::Substance * bio::genetic::Insertion::Seek ( chemical::Substance insertIn) const
virtual

Override of Localization system. This is what does the inserting. Will recurse upward, following m_previous for as long as possible.

Parameters
insertIn
Returns
a Substance somewhere within the Substance provided or NULL.

Reimplemented from bio::genetic::Localization.

Definition at line 51 of file Insertion.cpp.

52{
53 insertIn = ResolvePrevious(insertIn);
54
55 BIO_SANITIZE(insertIn && m_toInsert, ,
56 return insertIn);
57
58 if (m_site == InsertionSitePerspective::InvalidId())
59 {
60 return insertIn;
61 }
62
64 return NULL)
65 ByteStream insertion(m_toInsert);
66 (const_cast< chemical::ExcitationBase* >(mc_method))->EditArg(
67 0,
68 insertion
69 );
70 ByteStream result;
72 insertIn->AsWave(),
73 result
74 );
75 chemical::Substance* insert = ChemicalCast< chemical::Substance* >(Cast< physical::Wave* >(result.IKnowWhatImDoing())); //This is about as safe as we can get right now.
76 BIO_SANITIZE(insert, ,
77 return NULL)
78 return insert;
79}
#define BIO_SANITIZE(test, success, failure)
virtual void CallDown(physical::Wave *wave, ByteStream *ret) const
Definition: Excitation.h:109
chemical::Substance * ResolvePrevious(chemical::Substance *seekIn) const
chemical::ExcitationBase * mc_method
Definition: Localization.h:125

References bio::physical::Class< T >::AsWave(), BIO_SANITIZE, and bio::ByteStream::IKnowWhatImDoing().

Referenced by bio::genetic::Expressor::Translate().

◆ SetSite()

void bio::genetic::Insertion::SetSite ( Site  site)
virtual

Set m_site.

Parameters
site

Reimplemented from bio::genetic::Localization.

Definition at line 81 of file Insertion.cpp.

82{
83 //Assume Sites & Sites always match exactly.
84 m_site = site;
85 mc_method = InsertionSitePerspective::Instance().GetNewObjectFromIdAs< chemical::ExcitationBase* >(m_site);
86}

Member Data Documentation

◆ m_toInsert

chemical::Substance* bio::genetic::Insertion::m_toInsert
protected

Definition at line 92 of file Insertion.h.


The documentation for this class was generated from the following files: