DNA-sim

git clone git://git.codymlewis.com/DNA-sim.git
Log | Files | Refs | README | LICENSE

Codon.h (927B)


      1 /**
      2  * Codon.h - DNA_sim
      3  * Author: Cody Lewis
      4  * Date: 2018-07-07
      5  * Last Modified: 2018-07-07
      6  * Description:
      7  *  A Class for A codon (a collection of three mRNA bases)
      8  */
      9 #ifndef CODON_h
     10 #define CODON_h
     11 #include <string>
     12 #include <vector>
     13 #include <iostream>
     14 namespace DNA_sim {
     15   class Codon {
     16     private:
     17       /* enum Base
     18        *  The invidual bases of mRNA
     19        */
     20       std::string bases; // 3 bases per codon
     21     public:
     22       Codon(); // Default constructor
     23       Codon(std::string input); // Input constructor
     24       ~Codon(); // Destructor
     25 
     26       // Queries
     27       std::string get_bases() const;
     28 
     29       // Mutators
     30       bool set_bases(std::string input);
     31   };
     32   // Operator Overloads
     33   std::istream& operator>>(std::istream& in, Codon& cod); // input
     34   std::ostream& operator<<(std::ostream& out, const Codon& cod); // output
     35   bool operator<(const Codon& lhs, const Codon& rhs);
     36 }
     37 #endif /* ifndef CODON_h */