Changeset 168 for XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp
- Timestamp:
- 04/07/11 15:04:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp
r157 r168 10 10 #include "axis.hpp" 11 11 12 namespace xmlioserver 13 { 14 namespace tree 12 namespace xmlioserver { 13 namespace tree { 14 15 /// ////////////////////// Déclarations ////////////////////// /// 16 17 class CGridGroup; 18 class CGridAttributes; 19 class CGrid; 20 21 ///-------------------------------------------------------------- 22 23 // Declare/Define CGridAttribute 24 BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid) 25 #include "grid_attribute.conf" 26 END_DECLARE_ATTRIBUTE_MAP(CGrid) 27 28 ///-------------------------------------------------------------- 29 30 class CGrid 31 : public CObjectTemplate<CGrid> 32 , public CGridAttributes 15 33 { 16 /// ////////////////////// Déclarations ////////////////////// /// 34 /// typedef /// 35 typedef CObjectTemplate<CGrid> SuperClass; 36 typedef CGridAttributes SuperClassAttribute; 17 37 18 class CGridGroup; 19 class CGridAttributes; 20 class CGrid; 38 public : 21 39 22 ///-------------------------------------------------------------- 40 typedef CGridAttributes RelAttributes; 41 typedef CGridGroup RelGroup; 23 42 24 // Declare/Define CGridAttribute 25 BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid) 26 #include "grid_attribute.conf" 27 END_DECLARE_ATTRIBUTE_MAP(CGrid) 43 /// Constructeurs /// 44 CGrid(void); 45 explicit CGrid(const StdString & id); 46 CGrid(const CGrid & grid); // Not implemented yet. 47 CGrid(const CGrid * const grid); // Not implemented yet. 28 48 29 ///-------------------------------------------------------------- 49 /// Traitements /// 50 void solveReference(void); 30 51 31 class CGrid 32 : public CObjectTemplate<CGrid> 33 , public CGridAttributes 34 { 35 /// typedef /// 36 typedef CObjectTemplate<CGrid> SuperClass; 37 typedef CGridAttributes SuperClassAttribute; 52 /// Tests /// 53 bool hasAxis(void) const; 38 54 39 55 public : 40 56 41 typedef CGridAttributes RelAttributes; 42 typedef CGridGroup RelGroup; 57 /// Accesseurs /// 58 const ARRAY(int, 1) & getStoreIndex(void) const; 59 const ARRAY(int, 1) & getOutIIndex(void) const; 60 const ARRAY(int, 1) & getOutJIndex(void) const; 61 const ARRAY(int, 1) & getOutLIndex(void) const; 43 62 44 /// Constructeurs /// 45 CGrid(void); 46 explicit CGrid(const StdString & id); 47 CGrid(const CGrid & grid); // Not implemented yet. 48 CGrid(const CGrid * const grid); // Not implemented yet. 63 const boost::shared_ptr<CAxis> getRelAxis (void) const; 64 const boost::shared_ptr<CDomain> getRelDomain(void) const; 49 65 50 /// Traitements /// 51 void solveReference(void); 66 /// Entrées-sorties de champs /// 67 template <StdSize n> 68 void inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const; 52 69 53 /// Tests ///54 bool hasAxis(void) const;70 template <StdSize n> 71 void outputField(const ARRAY(double, 1) stored, ARRAY(double, n) field) const; 55 72 56 public : 73 /// Destructeur /// 74 virtual ~CGrid(void); 57 75 58 /// Accesseurs /// 59 const ARRAY(int, 1) & getStoreIndex(void) const; 60 const ARRAY(int, 1) & getOutIIndex(void) const; 61 const ARRAY(int, 1) & getOutJIndex(void) const; 62 const ARRAY(int, 1) & getOutLIndex(void) const; 76 public : 63 77 64 const boost::shared_ptr<CAxis> getRelAxis (void) const; 65 const boost::shared_ptr<CDomain> getRelDomain(void) const; 78 /// Accesseurs statiques /// 79 static StdString GetName(void); 80 static StdString GetDefName(void); 81 82 static ENodeType GetType(void); 66 83 67 /// Entrées-sorties de champs /// 68 template <StdSize n> 69 void inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const; 84 /// Instanciateurs Statiques /// 85 static boost::shared_ptr<CGrid> 86 CreateGrid(boost::shared_ptr<CDomain> domain); 87 static boost::shared_ptr<CGrid> 88 CreateGrid(boost::shared_ptr<CDomain> domain, boost::shared_ptr<CAxis> axis); 70 89 71 template <StdSize n> 72 void outputField(const ARRAY(double, 1) stored, ARRAY(double, n) field) const; 90 protected : 73 91 74 /// Destructeur///75 virtual ~CGrid(void);92 /// Entrées-sorties de champs (interne) /// 93 void storeField_arr(const double * const data, ARRAY(double, 1) stored) const; 76 94 77 public : 95 /// Traitements protégés /// 96 void computeIndex(void); 97 void solveDomainRef(void); 98 void solveAxisRef(void); 78 99 79 /// Accesseurs statiques /// 80 static StdString GetName(void); 81 static StdString GetDefName(void); 100 private: 82 101 83 /// Instanciateurs Statiques /// 84 static boost::shared_ptr<CGrid> 85 CreateGrid(boost::shared_ptr<CDomain> domain); 86 static boost::shared_ptr<CGrid> 87 CreateGrid(boost::shared_ptr<CDomain> domain, boost::shared_ptr<CAxis> axis); 102 /// Propriétés privées /// 103 bool withAxis ; 104 bool isChecked; 88 105 89 protected : 106 boost::shared_ptr<CAxis> axis ; 107 boost::shared_ptr<CDomain> domain ; 90 108 91 /// Entrées-sorties de champs (interne) /// 92 void storeField_arr(const double * const data, ARRAY(double, 1) stored) const; 109 ARRAY(int, 1) storeIndex ; 110 ARRAY(int, 1) out_i_index ; 111 ARRAY(int, 1) out_j_index ; 112 ARRAY(int, 1) out_l_index ; 93 113 94 /// Traitements protégés /// 95 void computeIndex(void); 96 void solveDomainRef(void); 97 void solveAxisRef(void); 114 }; // class CGrid 98 115 99 private:116 ///-------------------------------------------------------------- 100 117 101 /// Propriétés privées ///102 bool withAxis ;103 bool isChecked;118 template <StdSize n> 119 void CGrid::inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const 120 { this->storeField_arr(field.data(), stored) ; } 104 121 105 boost::shared_ptr<CAxis> axis ; 106 boost::shared_ptr<CDomain> domain ; 122 ///-------------------------------------------------------------- 107 123 108 ARRAY(int, 1) storeIndex ; 109 ARRAY(int, 1) out_i_index ; 110 ARRAY(int, 1) out_j_index ; 111 ARRAY(int, 1) out_l_index ; 124 // Declare/Define CGridGroup and CGridDefinition 125 DECLARE_GROUP(CGrid); 112 126 113 }; // class CGrid127 ///-------------------------------------------------------------- 114 128 115 ///-------------------------------------------------------------- 116 117 template <StdSize n> 118 void CGrid::inputField(const ARRAY(double, n) field, ARRAY(double, 1) stored) const 119 { this->storeField_arr(field.data(), stored) ; } 120 121 // Declare/Define CGridGroup and CGridDefinition 122 DECLARE_GROUP(CGrid); 123 124 } // namespace tree 129 } // namespace tree 125 130 } // namespace xmlioserver 126 131
Note: See TracChangeset
for help on using the changeset viewer.