Changeset 181
- Timestamp:
- 04/19/11 16:01:52 (14 years ago)
- Location:
- XMLIO_V2/dev/dev_rv/src/xmlio
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/manager/xios_manager.cpp
r180 r181 3 3 #include "tree_manager.hpp" 4 4 #include "data_treatment.hpp" 5 #include "nc4_data_output.hpp" 6 #include "attribute_template_impl.hpp" 5 7 6 8 namespace xmlioserver … … 72 74 } 73 75 76 data::CDataTreatment dt; 77 74 78 StdOStringStream oss; 75 79 oss << StdString("data/def/def_server_end.") … … 77 81 CTreeManager::PrintTreeToFile(oss.str()); 78 82 79 //data::CDataTreatment dt;83 dt.createDataOutput<io::CNc4DataOutput>(); 80 84 } 81 85 -
XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp
r168 r181 130 130 { 131 131 // TODO : à compléter; 132 } 133 134 //---------------------------------------------------------------- 135 136 void CField::fromBinary(StdIStream & is) 137 { 138 SuperClass::fromBinary(is); 139 #define CLEAR_ATT(name_)\ 140 SuperClassAttribute::operator[](#name_)->clear() 141 142 CLEAR_ATT(domain_ref); 143 CLEAR_ATT(axis_ref); 144 #undef CLEAR_ATT 145 132 146 } 133 147 -
XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp
r173 r181 76 76 void solveOperation(void); 77 77 78 virtual void fromBinary(StdIStream & is); 79 78 80 /// Destructeur /// 79 81 virtual ~CField(void); -
XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp
r180 r181 13 13 : CObjectTemplate<CGrid>(), CGridAttributes() 14 14 , withAxis(false), isChecked(false), axis(), domain() 15 , storeIndex( ), out_i_index(), out_j_index(), out_l_index()15 , storeIndex(1), out_i_index(1), out_j_index(1), out_l_index(1) 16 16 { /* Ne rien faire de plus */ } 17 17 … … 19 19 : CObjectTemplate<CGrid>(id), CGridAttributes() 20 20 , withAxis(false), isChecked(false), axis(), domain() 21 , storeIndex( ), out_i_index(), out_j_index(), out_l_index()21 , storeIndex(1), out_i_index(1), out_j_index(1), out_l_index(1) 22 22 { /* Ne rien faire de plus */ } 23 23 … … 33 33 //---------------------------------------------------------------- 34 34 35 const ARRAY(int, 1)& CGrid::getStoreIndex(void) const35 const std::deque<ARRAY(int, 1)> & CGrid::getStoreIndex(void) const 36 36 { 37 37 return (this->storeIndex ); … … 40 40 //--------------------------------------------------------------- 41 41 42 const ARRAY(int, 1)& CGrid::getOutIIndex(void) const42 const std::deque<ARRAY(int, 1)> & CGrid::getOutIIndex(void) const 43 43 { 44 44 return (this->out_i_index ); … … 47 47 //--------------------------------------------------------------- 48 48 49 const ARRAY(int, 1)& CGrid::getOutJIndex(void) const49 const std::deque<ARRAY(int, 1)> & CGrid::getOutJIndex(void) const 50 50 { 51 51 return (this->out_j_index ); … … 54 54 //--------------------------------------------------------------- 55 55 56 const ARRAY(int, 1)& CGrid::getOutLIndex(void) const56 const std::deque<ARRAY(int, 1)> & CGrid::getOutLIndex(void) const 57 57 { 58 58 return (this->out_l_index ); … … 87 87 this->solveDomainRef() ; 88 88 this->solveAxisRef() ; 89 this->computeIndex() ; 89 if (this->storeIndex.size() == 1) 90 this->computeIndex() ; 90 91 this->isChecked = true; 91 92 } … … 175 176 176 177 //std::cout << indexCount << std::endl; 177 ARRAY_ASSIGN(this->storeIndex , int, 1, [indexCount]);178 ARRAY_ASSIGN(this->out_l_index , int, 1, [indexCount]);179 ARRAY_ASSIGN(this->out_i_index , int, 1, [indexCount]);180 ARRAY_ASSIGN(this->out_j_index , int, 1, [indexCount]);178 ARRAY_ASSIGN(this->storeIndex[0] , int, 1, [indexCount]); 179 ARRAY_ASSIGN(this->out_l_index[0], int, 1, [indexCount]); 180 ARRAY_ASSIGN(this->out_i_index[0], int, 1, [indexCount]); 181 ARRAY_ASSIGN(this->out_j_index[0], int, 1, [indexCount]); 181 182 182 183 for(int count = 0, indexCount = 0, l = 0; l < size; l++) … … 195 196 (j >= 0 && j < nj) && (*mask)[i][j]) 196 197 { 197 (*this->storeIndex ) [indexCount] = count ;198 (*this->out_l_index )[indexCount] = l ;199 (*this->out_i_index )[indexCount] = i ;200 (*this->out_j_index )[indexCount] = j ;198 (*this->storeIndex[0]) [indexCount] = count ; 199 (*this->out_l_index[0])[indexCount] = l ; 200 (*this->out_i_index[0])[indexCount] = i ; 201 (*this->out_j_index[0])[indexCount] = j ; 201 202 indexCount++ ; 202 203 } … … 235 236 (const ARRAY(double, 1) stored, ARRAY(double, 3) field) const 236 237 { 237 for(StdSize n = 0; n < storeIndex ->num_elements(); n++)238 (*field)[(*out_i_index )[n]][(*out_j_index)[n]][(*out_l_index)[n]] = (*stored)[n] ;238 for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++) 239 (*field)[(*out_i_index[0])[n]][(*out_j_index[0])[n]][(*out_l_index[0])[n]] = (*stored)[n] ; 239 240 } 240 241 … … 245 246 (const ARRAY(double, 1) stored, ARRAY(double, 2) field) const 246 247 { 247 for(StdSize n = 0; n < storeIndex ->num_elements(); n++)248 (*field)[(*out_i_index )[n]][(*out_j_index)[n]] = (*stored)[n] ;248 for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++) 249 (*field)[(*out_i_index[0])[n]][(*out_j_index[0])[n]] = (*stored)[n] ; 249 250 } 250 251 … … 255 256 (const ARRAY(double, 1) stored, ARRAY(double, 1) field) const 256 257 { 257 for(StdSize n = 0; n < storeIndex ->num_elements(); n++)258 (*field)[(*out_i_index )[n]] = (*stored)[n] ;258 for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++) 259 (*field)[(*out_i_index[0])[n]] = (*stored)[n] ; 259 260 } 260 261 … … 264 265 (const double * const data, ARRAY(double, 1) stored) const 265 266 { 266 const StdSize size = storeIndex ->num_elements() ;267 const StdSize size = storeIndex[0]->num_elements() ; 267 268 stored->resize(boost::extents[size]) ; 268 269 for(StdSize i = 0; i < size; i++) 269 (*stored)[i] = data[(*storeIndex )[i]] ;270 (*stored)[i] = data[(*storeIndex[0])[i]] ; 270 271 } 271 272 … … 275 276 { 276 277 SuperClass::toBinary(os); 277 this->storeIndex ->toBinary(os);278 this->out_i_index ->toBinary(os);279 this->out_j_index ->toBinary(os);280 this->out_l_index ->toBinary(os);278 this->storeIndex[0]->toBinary(os); 279 this->out_i_index[0]->toBinary(os); 280 this->out_j_index[0]->toBinary(os); 281 this->out_l_index[0]->toBinary(os); 281 282 } 282 283 … … 297 298 out_l_index_->fromBinary(is); 298 299 300 this->storeIndex .push_back(storeIndex_); 301 this->out_i_index.push_back(out_i_index_); 302 this->out_j_index.push_back(out_j_index_); 303 this->out_l_index.push_back(out_l_index_); 299 304 } 300 305 -
XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp
r180 r181 59 59 60 60 /// Accesseurs /// 61 const ARRAY(int, 1)& getStoreIndex(void) const;62 const ARRAY(int, 1)& getOutIIndex(void) const;63 const ARRAY(int, 1)& getOutJIndex(void) const;64 const ARRAY(int, 1)& getOutLIndex(void) const;61 const std::deque<ARRAY(int, 1)> & getStoreIndex(void) const; 62 const std::deque<ARRAY(int, 1)> & getOutIIndex(void) const; 63 const std::deque<ARRAY(int, 1)> & getOutJIndex(void) const; 64 const std::deque<ARRAY(int, 1)> & getOutLIndex(void) const; 65 65 66 66 const boost::shared_ptr<CAxis> getRelAxis (void) const; … … 110 110 boost::shared_ptr<CDomain> domain ; 111 111 112 ARRAY(int, 1)storeIndex ;113 ARRAY(int, 1)out_i_index ;114 ARRAY(int, 1)out_j_index ;115 ARRAY(int, 1)out_l_index ;112 std::deque<ARRAY(int, 1)> storeIndex ; 113 std::deque<ARRAY(int, 1)> out_i_index ; 114 std::deque<ARRAY(int, 1)> out_j_index ; 115 std::deque<ARRAY(int, 1)> out_l_index ; 116 116 117 117 }; // class CGrid -
XMLIO_V2/dev/dev_rv/src/xmlio/xmlioserver_spl.hpp
r152 r181 19 19 #include <list> 20 20 #include <map> 21 #include <deque> 21 22 22 23 // Flux.
Note: See TracChangeset
for help on using the changeset viewer.