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 //--------------------------------------------------- readRecordFix ---------- 00044 virtual void readRecordFix (std::istream & fix); 00045 00046 //--------------------------------------------------- writeRecord ------------ 00047 virtual void writeRecord (std::ostream & fix, std::ostream & var) const; 00048 00049 00050 public: 00051 00052 static const NCode_t NCODE; 00054 00055 00056 //--------------------------------------------------- ContigEdge_t ----------- 00059 ContigEdge_t ( ) 00060 { 00061 // ContigLink_t sets NodeType 00062 } 00063 00064 00065 //--------------------------------------------------- ContigEdge_t ----------- 00068 ContigEdge_t (const ContigEdge_t & source) 00069 { 00070 *this = source; 00071 } 00072 00073 00074 //--------------------------------------------------- ~ContigEdge_t ---------- 00077 ~ContigEdge_t ( ) 00078 { 00079 00080 } 00081 00082 00083 //--------------------------------------------------- clear ------------------ 00084 virtual void clear ( ) 00085 { 00086 // ContigLink_t preserves NodeType 00087 ContigLink_t::clear( ); 00088 IEdge_t::clear( ); 00089 } 00090 00091 00092 //--------------------------------------------------- getContigLinks --------- 00097 const std::vector<ID_t> & getContigLinks ( ) const 00098 { 00099 return IEdge_t::getLinks( ); 00100 } 00101 00102 00103 //--------------------------------------------------- getContigLinks --------- 00108 std::vector<ID_t> & getContigLinks ( ) 00109 { 00110 return IEdge_t::getLinks( ); 00111 } 00112 00113 00114 //--------------------------------------------------- getNCode --------------- 00115 virtual NCode_t getNCode ( ) const 00116 { 00117 return ContigEdge_t::NCODE; 00118 } 00119 00120 00121 //--------------------------------------------------- readMessage ------------ 00122 virtual void readMessage (const Message_t & msg); 00123 00124 00125 //--------------------------------------------------- setContigLinks --------- 00131 void setContigLinks (const std::vector<ID_t> & links) 00132 { 00133 IEdge_t::setLinks (links); 00134 } 00135 00136 00137 //--------------------------------------------------- writeMessage ----------- 00138 virtual void writeMessage (Message_t & msg) const; 00139 00140 }; 00141 00142 } // namespace AMOS 00143 00144 #endif // #ifndef __ContigEdge_AMOS_HH
1.4.7