Changeset 472 for XIOS/trunk/src/interface/c/icxml_tree.cpp
- Timestamp:
- 02/03/14 14:16:20 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/interface/c/icxml_tree.cpp
r352 r472 20 20 #include "axis.hpp" 21 21 #include "domain.hpp" 22 #include "variable.hpp" 22 23 23 24 extern "C" … … 43 44 typedef xios::CAxis * XAxisPtr; 44 45 typedef xios::CAxisGroup * XAxisGroupPtr; 45 46 47 typedef xios::CVariable * XVariablePtr; 48 typedef xios::CVariableGroup * XVariableGroupPtr; 49 46 50 // ----------------------- Ajout d'enfant à un parent ----------------------- 47 51 … … 155 159 } 156 160 161 void cxios_xml_tree_add_variabletofile 162 (XFilePtr parent_, XVariablePtr * child_, const char * child_id, int child_id_size) 163 { 164 std::string child_id_str; 165 CTimer::get("XIOS").resume() ; 166 167 if (cstr2string(child_id, child_id_size, child_id_str)) 168 { 169 *child_ = parent_->addVariable(child_id_str); 170 parent_->sendAddVariable(child_id_str) ; 171 } 172 else 173 { 174 *child_ = parent_->addVariable(); 175 parent_->sendAddVariable() ; 176 } 177 CTimer::get("XIOS").suspend() ; 178 } 179 180 void cxios_xml_tree_add_variabletofield 181 (XFieldPtr parent_, XVariablePtr * child_, const char * child_id, int child_id_size) 182 { 183 std::string child_id_str; 184 CTimer::get("XIOS").resume() ; 185 186 if (cstr2string(child_id, child_id_size, child_id_str)) 187 { 188 *child_ = parent_->addVariable(child_id_str); 189 parent_->sendAddVariable(child_id_str) ; 190 } 191 else 192 { 193 *child_ = parent_->addVariable(); 194 parent_->sendAddVariable() ; 195 } 196 CTimer::get("XIOS").suspend() ; 197 } 157 198 // ----------------------- Ajout de groupe à un parent ---------------------- 158 199 … … 264 305 CTimer::get("XIOS").suspend() ; 265 306 } 307 308 void cxios_xml_tree_add_variablegrouptofile 309 (XFilePtr parent_, XVariableGroupPtr * child_, const char * child_id, int child_id_size) 310 { 311 std::string child_id_str; 312 CTimer::get("XIOS").resume() ; 313 if (cstr2string(child_id, child_id_size, child_id_str)) 314 { 315 *child_ = parent_->addVariableGroup(child_id_str); 316 parent_->sendAddVariableGroup(child_id_str) ; 317 } 318 else 319 { 320 *child_ = parent_->addVariableGroup(); 321 parent_->sendAddVariableGroup() ; 322 } 323 CTimer::get("XIOS").suspend() ; 324 } 325 326 void cxios_xml_tree_add_variablegrouptofield 327 (XFieldPtr parent_, XVariableGroupPtr * child_, const char * child_id, int child_id_size) 328 { 329 std::string child_id_str; 330 CTimer::get("XIOS").resume() ; 331 if (cstr2string(child_id, child_id_size, child_id_str)) 332 { 333 *child_ = parent_->addVariableGroup(child_id_str); 334 parent_->sendAddVariableGroup(child_id_str) ; 335 } 336 else 337 { 338 *child_ = parent_->addVariableGroup(); 339 parent_->sendAddVariableGroup() ; 340 } 341 CTimer::get("XIOS").suspend() ; 342 } 266 343 267 344
Note: See TracChangeset
for help on using the changeset viewer.