contrib/gel/gmvl/gmvl_node.h
Go to the documentation of this file.
00001 // This is gel/gmvl/gmvl_node.h
00002 #ifndef gmvl_node_h_
00003 #define gmvl_node_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  Inlined all 1-line methods in class decl
00014 // \endverbatim
00015 
00016 #include <vcl_iosfwd.h>
00017 #include <vcl_string.h>
00018 #include <vbl/vbl_ref_count.h>
00019 
00020 class gmvl_node_cache;
00021 class gmvl_connection_cache;
00022 
00023 //:
00024 // Types of node:
00025 //  -    images
00026 //  -    image features (points, lines, conics...)
00027 //  -    transformations (homographies, projection matrices...)
00028 //  -    coordinate systems (?)
00029 
00030 class gmvl_node : public vbl_ref_count
00031 {
00032  public:
00033   gmvl_node() : type_("gmvl_node"), ref_(-1) {}
00034   gmvl_node(gmvl_node const& n) : vbl_ref_count(), type_(n.type_), ref_(n.ref_) {}
00035   virtual ~gmvl_node() {}
00036 
00037   // getter
00038   vcl_string &type() { return type_; }
00039 
00040   // input output
00041   friend vcl_ostream &operator<<( vcl_ostream &os, gmvl_node &node);
00042 
00043   // to allow the cache to access ref
00044   friend class gmvl_node_cache;
00045   friend class gmvl_connection_cache;
00046 
00047  protected:
00048   // type name (name of class)
00049   vcl_string type_;
00050 
00051   // reference number (used by caches)
00052   int ref_;
00053 };
00054 
00055 vcl_ostream &operator<<(vcl_ostream &os, gmvl_node &node);
00056 
00057 #endif // gmvl_node_h_