00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 #ifndef __ContigEdge_AMOS_HH 00011 #define __ContigEdge_AMOS_HH 1 00012 00013 #include "Edge_AMOS.hh" 00014 #include "ContigLink_AMOS.hh" 00015 #include <vector> 00016 00017 00018 00019 00020 namespace AMOS { 00021 00022 //================================================ ContigEdge_t ================ 00029 //============================================================================== 00030 class ContigEdge_t : public ContigLink_t, public IEdge_t 00031 { 00032 00033 private: 00034 00035 void setNodeType (NCode_t nodtype); 00036 00037 00038 protected: 00039 00040 //--------------------------------------------------- readRecord ------------- 00041 virtual void readRecord (std::istream & fix, std::istream & var); 00042 00043 00044 //--------------------------------------------------- writeRecord ------------ 00045 virtual void writeRecord (std::ostream & fix, std::ostream & var) const; 00046 00047 00048 public: 00049 00050 static const NCode_t NCODE; 00052 00053 00054 //--------------------------------------------------- ContigEdge_t ----------- 00057 ContigEdge_t ( ) 00058 { 00059 // ContigLink_t sets NodeType 00060 } 00061 00062 00063 //--------------------------------------------------- ContigEdge_t ----------- 00066 ContigEdge_t (const ContigEdge_t & source) 00067 { 00068 *this = source; 00069 } 00070 00071 00072 //--------------------------------------------------- ~ContigEdge_t ---------- 00075 ~ContigEdge_t ( ) 00076 { 00077 00078 } 00079 00080 00081 //--------------------------------------------------- clear ------------------ 00082 virtual void clear ( ) 00083 { 00084 // ContigLink_t preserves NodeType 00085 ContigLink_t::clear( ); 00086 IEdge_t::clear( ); 00087 } 00088 00089 00090 //--------------------------------------------------- getContigLinks --------- 00095 const std::vector<ID_t> & getContigLinks ( ) const 00096 { 00097 return IEdge_t::getLinks( ); 00098 } 00099 00100 00101 //--------------------------------------------------- getContigLinks --------- 00106 std::vector<ID_t> & getContigLinks ( ) 00107 { 00108 return IEdge_t::getLinks( ); 00109 } 00110 00111 00112 //--------------------------------------------------- getNCode --------------- 00113 virtual NCode_t getNCode ( ) const 00114 { 00115 return ContigEdge_t::NCODE; 00116 } 00117 00118 00119 //--------------------------------------------------- readMessage ------------ 00120 virtual void readMessage (const Message_t & msg); 00121 00122 00123 //--------------------------------------------------- setContigLinks --------- 00129 void setContigLinks (const std::vector<ID_t> & links) 00130 { 00131 IEdge_t::setLinks (links); 00132 } 00133 00134 00135 //--------------------------------------------------- writeMessage ----------- 00136 virtual void writeMessage (Message_t & msg) const; 00137 00138 }; 00139 00140 } // namespace AMOS 00141 00142 #endif // #ifndef __ContigEdge_AMOS_HH