00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef SEDGEREMAPELEMENT_H
00014 #define SEDGEREMAPELEMENT_H
00015 
00016 #include <vector>
00017 #include <utility>
00018 #include <functional>
00019 #include <algorithm>
00020 
00021 
00022 namespace shells {
00023     struct SElementS;
00024     struct SEdgeS;
00025     class SEdgeRemapElement;
00026 }
00027 
00028 
00029 
00030 class shells::SEdgeRemapElement : 
00031     public std::unary_function<shells::SEdgeS *, void> {
00032 
00033 public:
00034     
00035     typedef std::pair<shells::SElementS*, shells::SElementS*> SElementPair;
00036     typedef std::vector<SElementPair> SElementPairCont; 
00037     typedef std::vector<SElementPair>::iterator SElementPairIter; 
00038     
00039     SEdgeRemapElement(SElementPairCont& oldNewActive) :_oldNewActive(oldNewActive)
00040         {
00041             sortOldNewActiveVector();
00042         }
00043     
00044     void operator()(shells::SEdgeS *) const;
00045     
00046     
00047     static SElementPair inline makeSElementPair(shells::SElementS *x, shells::SElementS *y)
00048         {
00049             return std::pair<shells::SElementS *, shells::SElementS *>(x, y);
00050         }    
00051     
00052 private:
00053     SElementPairCont&  _oldNewActive;   
00054 
00055     
00056     void sortOldNewActiveVector();
00057 };
00058 
00059 #endif
00060