00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef SELEMENTNEIGHBORS_H
00014 #define SELEMENTNEIGHBORS_H
00015 #include <functional>
00016 #include <set>
00017 #include <vector>
00018 
00019 #include "sedgeCompare.h"
00020 
00021 
00022 namespace shells {
00023     class SElementNeighbors;
00024     struct SElementS;
00025     struct SVertexS;
00026     struct SEdgeS;
00027 }
00028 
00029 
00030 
00031 class shells::SElementNeighbors : public std::unary_function<shells::SElementS *, void> {
00032 public:
00033 
00034     typedef std::set<shells::SEdgeS *, shells::SEdgeCompare> SEdgeSetCont;
00035     typedef SEdgeSetCont::iterator SEdgeSetContIt;
00036 
00037     SElementNeighbors(SEdgeSetCont& edgeSet):_edgeSet(edgeSet){}; 
00038     ~SElementNeighbors(){};
00039     
00040     void operator()(shells::SElementS *element);    
00041 
00042 private:
00043     SEdgeSetCont&   _edgeSet;
00044     
00045     void addOrMatch(shells::SVertexS *a, shells::SVertexS * b, shells::SElementS *tn);
00046 };
00047 
00048 #endif