Feature_AMOS.hh

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 #ifndef __Feature_AMOS_HH
00011 #define __Feature_AMOS_HH 1
00012 
00013 #include "Universal_AMOS.hh"
00014 
00015 
00016 
00017 
00018 namespace AMOS {
00019 
00020 typedef char FeatureType_t;
00021 
00022 //====================================================== Feature_t =============
00030 //==============================================================================
00031 class Feature_t : public Universal_t
00032 {
00033 
00034 private:
00035 
00036   std::pair<ID_t, NCode_t> source_m;      
00037   Range_t range_m;                        
00038   FeatureType_t type_m;                   
00039 
00040 
00041 protected:
00042 
00043   //--------------------------------------------------- readRecord -------------
00044   virtual void readRecord (std::istream & fix, std::istream & var);
00045 
00046 
00047   //--------------------------------------------------- readRecordFix ----------
00048   virtual void readRecordFix (std::istream & fix);
00049 
00050 
00051   //--------------------------------------------------- writeRecord ------------
00052   virtual void writeRecord (std::ostream & fix, std::ostream & var) const;
00053 
00054   
00055 public:
00056 
00057   static const NCode_t NCODE;
00059 
00060   static const FeatureType_t NULL_FEATURE = 0;
00061   static const FeatureType_t REPEAT       = 'R';
00062   static const FeatureType_t UNITIG       = 'U';
00063   static const FeatureType_t JOIN         = 'J';
00064   static const FeatureType_t ORF          = 'O';
00065   static const FeatureType_t FIX          = 'F';
00066 
00067   // forensics features
00068   static const FeatureType_t COVERAGE     = 'C';
00069   static const FeatureType_t POLYMORPHISM = 'P';
00070   static const FeatureType_t BREAKPOINT   = 'B';
00071   static const FeatureType_t KMER         = 'K';
00072   static const FeatureType_t MATEPAIR     = 'M';
00073   static const FeatureType_t MISASSEMBLY  = 'A';
00074 
00075 
00076   //--------------------------------------------------------- Feature_t --------
00081   Feature_t ( )
00082   {
00083     source_m . first = NULL_ID;
00084     source_m . second = NULL_NCODE;
00085     type_m = NULL_FEATURE;
00086   }
00087 
00088 
00089   //--------------------------------------------------------- Feature_t --------
00092   Feature_t (const Feature_t & source)
00093   {
00094     *this = source;
00095   }
00096 
00097 
00098   //--------------------------------------------------------- ~Feature_t -------
00101   ~Feature_t ( )
00102   {
00103 
00104   }
00105 
00106 
00107   //--------------------------------------------------- clear ------------------
00108   virtual void clear ( )
00109   {
00110     source_m . first = NULL_ID;
00111     source_m . second = NULL_NCODE;
00112     range_m . clear( );
00113     type_m = NULL_FEATURE;
00114   }
00115 
00116 
00117   //--------------------------------------------------- getNCode ---------------
00118   virtual NCode_t getNCode ( ) const
00119   {
00120     return Feature_t::NCODE;
00121   }
00122 
00123 
00124   //--------------------------------------------------- getRange ---------------
00129   Range_t getRange ( ) const
00130   {
00131     return range_m;
00132   }
00133 
00134 
00135   //--------------------------------------------------- getSource --------------
00144   std::pair<ID_t, NCode_t> getSource ( ) const
00145   {
00146     return source_m;
00147   }
00148 
00149 
00150   //--------------------------------------------------- getType ----------------
00155   FeatureType_t getType ( ) const
00156   {
00157     return type_m;
00158   }
00159 
00160 
00161   //--------------------------------------------------- setRange ---------------
00167   void setRange (Range_t range)
00168   {
00169     range_m = range;
00170   }
00171 
00172 
00173   //--------------------------------------------------- setSource --------------
00179   void setSource (std::pair<ID_t, NCode_t> source)
00180   {
00181     source_m = source;
00182   }
00183 
00184 
00185   //--------------------------------------------------- setType ----------------
00191   void setType (FeatureType_t type)
00192   {
00193     type_m = type;
00194   }
00195 
00196 
00197   //--------------------------------------------------- readMessage ------------
00198   virtual void readMessage (const Message_t & msg);
00199 
00200 
00201   //--------------------------------------------------- writeMessage -----------
00202   virtual void writeMessage (Message_t & msg) const;
00203 
00204 };
00205 
00206 } // namespace AMOS
00207 
00208 #endif // #ifndef __Feature_AMOS_HH

Generated on Mon Feb 22 17:36:27 2010 for libAMOS by  doxygen 1.4.7