Changeset 2603 for XIOS3/trunk/src
- Timestamp:
- 12/11/23 11:18:00 (7 months ago)
- Location:
- XIOS3/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/group_template.hpp
r1875 r2603 37 37 /// Accesseurs /// 38 38 const xios_map<StdString,Group*>& getGroupMap(void) const; 39 const vector<Child*>& getChildList(void) const;39 const xios_map<StdString,Child*>& getChildMap(void) const; 40 40 41 41 void getAllChildren(vector<Child*> & allc) const; -
XIOS3/trunk/src/group_template_impl.hpp
r1875 r2603 229 229 230 230 template <class U, class V, class W> 231 const std::vector<U*>&232 CGroupTemplate<U, V, W>::getChild List(void) const233 { 234 return (this->child List);231 const xios_map<StdString, U*>& 232 CGroupTemplate<U, V, W>::getChildMap(void) const 233 { 234 return (this->childMap); 235 235 } 236 236 -
XIOS3/trunk/src/interface/c/iccontext.cpp
r2121 r2603 38 38 CTimer::get("XIOS").resume() ; 39 39 40 std::vector<xios::CContext*> def_vector=41 xios::CContext::getRoot()->getChild List();42 43 for (std::size_t i = 0; i < def_vector.size(); i++)40 xios_map<StdString, CContext* > def_map = 41 xios::CContext::getRoot()->getChildMap(); 42 43 if (def_map.count(id)) 44 44 { 45 if (def_vector[i]->getId().compare(id) == 0) 46 { 47 *_ret = def_vector[i]; 48 CTimer::get("XIOS").suspend() ; 49 return; 50 } 45 *_ret = def_map[id]; 46 CTimer::get("XIOS").suspend() ; 47 return; 51 48 } 52 49 CTimer::get("XIOS").suspend() ; … … 93 90 94 91 CTimer::get("XIOS").resume(); 95 std::vector<xios::CContext*> def_vector = 96 xios::CContext::getRoot()->getChildList(); 92 93 xios_map<StdString, CContext* > def_map = 94 xios::CContext::getRoot()->getChildMap(); 97 95 98 96 *_ret = false; 99 for (std::size_t i = 0; i < def_vector.size(); i++)97 if (def_map.count(id)) 100 98 { 101 if (def_vector[i]->getId().compare(id) == 0) 102 { 103 *_ret = true; 104 break; 105 } 99 *_ret = true; 100 return; 106 101 } 107 102 CTimer::get("XIOS").suspend(); -
XIOS3/trunk/src/node/context.cpp
r2595 r2603 222 222 { 223 223 StdString currentContextId = CContext::getCurrent() -> getId(); 224 std:: vector<CContext*> def_vector=225 CContext::getRoot()->getChild List();226 std:: vector<CContext*>::iterator227 it = def_ vector.begin(), end = def_vector.end();224 std::map<StdString,CContext*> def_map = 225 CContext::getRoot()->getChildMap(); 226 std::map<StdString,CContext*>::iterator 227 it = def_map.begin(), end = def_map.end(); 228 228 229 229 out << "<? xml version=\"1.0\" ?>" << std::endl; … … 232 232 for (; it != end; it++) 233 233 { 234 CContext* context = *it;234 CContext* context = it->second; 235 235 CContext::setCurrent(context->getId()); 236 236 out << *context << std::endl; … … 813 813 xios::MPI_Comm_dup(interComm, &interCommServer) ; 814 814 CContextClient* client = CContextClient::getNew(this, intraCommClient, interCommClient); 815 815 816 CContextServer* server = CContextServer::getNew(this, intraCommServer, interCommServer); 816 817 client->setAssociatedServer(server) ;
Note: See TracChangeset
for help on using the changeset viewer.