00001 // This is gel/gmvl/gmvl_connection.h 00002 #ifndef gmvl_connection_h_ 00003 #define gmvl_connection_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \author crossge@crd.ge.com 00010 // 00011 // \verbatim 00012 // Modifications 00013 // 10-sep-2004 Peter Vanroose Added copy ctor with explicit vbl_ref_count init 00014 // \endverbatim 00015 00016 #include <vcl_iosfwd.h> 00017 #include <vbl/vbl_ref_count.h> 00018 #include <gmvl/gmvl_node_sptr.h> 00019 00020 class gmvl_connection : public vbl_ref_count 00021 { 00022 public: 00023 // constructors / destructors 00024 00025 gmvl_connection( const gmvl_node_sptr node1, const gmvl_node_sptr node2); 00026 gmvl_connection(gmvl_connection const& x) 00027 : vbl_ref_count(), n1_(x.n1_), n2_(x.n2_) {} 00028 ~gmvl_connection(); 00029 00030 // accessors 00031 00032 gmvl_node_sptr get_node1() const { return n1_; } 00033 gmvl_node_sptr get_node2() const { return n2_; } 00034 00035 friend vcl_ostream &operator<<( vcl_ostream &os, const gmvl_connection &c); 00036 00037 protected: 00038 gmvl_node_sptr n1_, n2_; 00039 }; 00040 00041 vcl_ostream &operator<<( vcl_ostream &os, const gmvl_connection &c); 00042 00043 #endif // gmvl_connection_h_