00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 #ifndef __ContigLink_AMOS_HH 00011 #define __ContigLink_AMOS_HH 1 00012 00013 #include "Link_AMOS.hh" 00014 #include "Contig_AMOS.hh" 00015 #include <utility> 00016 00017 00018 00019 00020 namespace AMOS { 00021 00022 //================================================ ContigLink_t ================ 00030 //============================================================================== 00031 class ContigLink_t : public Link_t 00032 { 00033 00034 private: 00035 00036 void setNodeType (NCode_t nodtype); 00037 00038 00039 protected: 00040 00041 //--------------------------------------------------- readRecord ------------- 00042 virtual void readRecord (std::istream & fix, std::istream & var); 00043 00044 00045 //--------------------------------------------------- readRecordFix ---------- 00046 virtual void readRecordFix (std::istream & fix); 00047 00048 00049 //--------------------------------------------------- writeRecord ------------ 00050 virtual void writeRecord (std::ostream & fix, std::ostream & var) const; 00051 00052 00053 public: 00054 00055 static const NCode_t NCODE; 00057 00058 00059 //--------------------------------------------------- ContigLink_t ----------- 00064 ContigLink_t ( ) 00065 { 00066 00067 } 00068 00069 00070 //--------------------------------------------------- ContigLink_t ----------- 00073 ContigLink_t (const ContigLink_t & source) 00074 { 00075 *this = source; 00076 } 00077 00078 00079 //--------------------------------------------------- ~ContigLink_t ---------- 00082 ~ContigLink_t ( ) 00083 { 00084 00085 } 00086 00087 00088 //--------------------------------------------------- clear ------------------ 00089 virtual void clear ( ) 00090 { 00091 Link_t::clear( ); 00092 } 00093 00094 00095 //--------------------------------------------------- getContigs ------------- 00100 std::pair<ID_t, ID_t> getContigs ( ) const 00101 { 00102 return Link_t::getNodes( ); 00103 } 00104 00105 00106 //--------------------------------------------------- getNCode --------------- 00107 virtual NCode_t getNCode ( ) const 00108 { 00109 return ContigLink_t::NCODE; 00110 } 00111 00112 00113 //----------------------------------------------------- getNodeType ---------- 00114 NCode_t getNodeType( ) const 00115 { 00116 return Contig_t::NCODE; 00117 } 00118 00119 00120 //--------------------------------------------------- readMessage ------------ 00121 virtual void readMessage (const Message_t & msg); 00122 00123 00124 //--------------------------------------------------- setContigs ------------- 00133 void setContigs (std::pair<ID_t, ID_t> contigs) 00134 { 00135 Link_t::setNodes (contigs); 00136 } 00137 00138 00139 //--------------------------------------------------- writeMessage ----------- 00140 virtual void writeMessage (Message_t & msg) const; 00141 00142 }; 00143 00144 } // namespace AMOS 00145 00146 #endif // #ifndef __ContigLink_AMOS_HH
1.4.7