contrib/gel/vtol/vtol_topology_cache.h

Go to the documentation of this file.
00001 #ifndef vtol_topology_cache_h_
00002 #define vtol_topology_cache_h_
00003 //:
00004 // \file
00005 // \brief Cache inferiors of TopologyObject
00006 //
00007 //  The vtol_topology_cache is a class used to cache vertices, edges, faces, blocks, etc.
00008 //
00009 // \author
00010 //     William A. Hoffman
00011 //     ported by Luis E. Galup
00012 //
00013 //-----------------------------------------------------------------------------
00014 
00015 #include <vtol/vtol_topology_object.h>
00016 //#include <vtol/vtol_topology_cache_sptr.h>
00017 #include <vcl_vector.h>
00018 #include <vul/vul_timestamp.h>
00019 
00020 class vtol_vertex;
00021 class vtol_edge;
00022 class vtol_zero_chain;
00023 class vtol_one_chain;
00024 class vtol_face;
00025 class vtol_two_chain;
00026 class vtol_block;
00027 class vtol_topology_object;
00028 
00029 //:
00030 // This class keeps a cache of various topology object lists
00031 
00032 class vtol_topology_cache : public vul_timestamp
00033 {
00034   //: private default constructor
00035   vtol_topology_cache();
00036   //: private constructor
00037   vtol_topology_cache(vtol_topology_object* to_be_cached);
00038   //: private destructor
00039   ~vtol_topology_cache();
00040 
00041   //accessors
00042 
00043   //: set the source
00044   void set_source(vtol_topology_object *to_be_cached);
00045 
00046   //: get the vertices
00047   void vertices(vertex_list&);
00048   //: get the zero chains
00049   void zero_chains(zero_chain_list&);
00050   //: get the edges
00051   void edges(edge_list&);
00052   //: get the one chains
00053   void one_chains(one_chain_list&);
00054   //: get the faces
00055   void faces(face_list&);
00056   //: get the two chains
00057   void two_chains(two_chain_list&);
00058   //: get the blocks
00059   void blocks(block_list&);
00060 
00061   // cache utilities
00062 
00063   //: validate the cache
00064   void validate_cache();
00065   //: clear the cache
00066   void clear_cache();
00067 
00068  private:
00069 
00070   //members
00071   vtol_topology_object* source_;
00072 
00073   vcl_vector<vtol_vertex*>* vertices_;
00074   vcl_vector<vtol_zero_chain*>* zerochains_;
00075   vcl_vector<vtol_edge*>* edges_;
00076   vcl_vector<vtol_one_chain*>*  onechains_;
00077   vcl_vector<vtol_face*>*  faces_;
00078   vcl_vector<vtol_two_chain*>*  twochains_;
00079   vcl_vector<vtol_block*>*  blocks_;
00080 
00081   //friend classes
00082   friend class vtol_vertex;
00083   friend class vtol_zero_chain;
00084   friend class vtol_edge;
00085   friend class vtol_one_chain;
00086   friend class vtol_face;
00087   friend class vtol_two_chain;
00088   friend class vtol_block;
00089   friend class vtol_topology_object;
00090 };
00091 
00092 #endif // vtol_topology_cache_h_

Generated on Tue Dec 2 05:15:30 2008 for contrib/gel/vtol by  doxygen 1.5.1