00001 00006 #ifndef hpRefineSpacePreBuilder2D_hh 00007 #define hpRefineSpacePreBuilder2D_hh 00008 00009 #include <string> 00010 #include "spacePreBuilder.hh" 00011 #include "toolbox/sequence.hh" 00012 00013 namespace hp2D { 00014 00015 // ********************************************************** refinehpFull ** 00016 00067 void refinehpFull(hp2D::hpFull& prebuild, std::string refinement); 00068 00069 // ****************************************** APrioriRefinementRuleFactory ** 00070 00078 class APrioriRefinementRuleFactory : public concepts::OutputOperator { 00079 public: 00080 enum rTypes {None = 0, hRef = 1, pRef = 2, hpRef = 3}; 00081 00086 APrioriRefinementRuleFactory(const std::string text); 00087 00089 void refine(hp2D::hpFull& prebuild) const; 00090 protected: 00091 virtual std::ostream& info(std::ostream& os) const; 00092 private: 00094 std::string text_; 00098 uint refAttr_; 00099 00103 uint refToEdgeAttr_; 00104 00108 uint refToVtxAttr_; 00109 00111 enum rTypes rType_; 00112 00114 int pMax_[2]; 00115 00117 concepts::Level<2> level_; 00118 00122 void getRefAttr_(std::string& text); 00123 00125 void getToAttr_(std::string& text); 00126 00128 void getRType_(std::string& text); 00129 00131 void getPoly_(std::string& text); 00132 00134 void getHRefLevel_(std::string& text); 00135 00137 void getHPRefLevel_(std::string& text); 00138 00142 concepts::Sequence<int> getNumbers_(std::string& text); 00143 }; 00144 00145 } // namespace hp2D 00146 00147 #endif // hpRefineSpacePreBuilder2D_hh