Changeset 347 for XIOS/trunk/src
- Timestamp:
- 05/21/12 17:57:22 (12 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 4 added
- 2 deleted
- 55 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/buffer_client.cpp
r335 r347 5 5 #include "cxios.hpp" 6 6 #include <mpi.h> 7 #include "tracer.hpp" 7 8 8 9 namespace xios … … 70 71 if (pending) 71 72 { 73 traceOff() ; 72 74 MPI_Test(&request,&flag,&status) ; 75 traceOn() ; 73 76 if (flag==true) pending=false ; 74 77 } -
XIOS/trunk/src/client.cpp
r346 r347 6 6 #include "context.hpp" 7 7 #include "context_client.hpp" 8 #include "tree_manager.hpp"9 8 #include "oasis_cinterface.hpp" 10 9 #include <mpi.h> 10 #include "timer.hpp" 11 11 12 12 namespace xios … … 130 130 { 131 131 CContext::setCurrent(id) ; 132 shared_ptr<CContext>context=CContext::create(id) ;132 CContext* context=CContext::create(id) ; 133 133 134 134 if (!CXios::isServer) … … 193 193 } 194 194 info(20) << "Client side context is finalized"<<endl ; 195 report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 196 report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 197 report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ; 198 report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 195 199 } 196 200 } -
XIOS/trunk/src/context_client.cpp
r345 r347 10 10 #include "context.hpp" 11 11 #include <mpi.h> 12 #include "timer.hpp" 12 13 13 14 namespace xios … … 92 93 } 93 94 free=false ; 95 96 CTimer::get("Blocking time").resume(); 94 97 while(!free) 95 98 { … … 101 104 } 102 105 } 106 CTimer::get("Blocking time").suspend(); 107 103 108 for(itBuffer=bufferList.begin(),itSize=sizeList.begin(); itBuffer!=bufferList.end();itBuffer++,itSize++) 104 109 { … … 185 190 } 186 191 sendEvent(event) ; 187 192 193 CTimer::get("Blocking time").resume(); 188 194 while(stop) 189 195 { … … 192 198 for(itBuff=buffers.begin();itBuff!=buffers.end();itBuff++) stop|=itBuff->second->hasPendingRequest() ; 193 199 } 194 200 CTimer::get("Blocking time").suspend(); 201 195 202 releaseBuffers() ; 196 203 } -
XIOS/trunk/src/context_server.cpp
r346 r347 6 6 #include "group_template_impl.hpp" 7 7 #include "attribute_template_impl.hpp" 8 #include "tree_manager.hpp"9 8 #include "domain.hpp" 10 9 11 10 #include <mpi.h> 11 #include "tracer.hpp" 12 #include "timer.hpp" 12 13 13 14 … … 61 62 if (pendingRequest.find(rank)==pendingRequest.end()) 62 63 { 64 traceOff() ; 63 65 MPI_Iprobe(rank,20,interComm,&flag,&status); 66 traceOn() ; 64 67 if (flag==true) 65 68 { … … 92 95 { 93 96 rank=it->first ; 97 traceOff() ; 94 98 MPI_Test(& it->second, &flag, &status) ; 99 traceOn() ; 95 100 if (flag==true) 96 101 { … … 144 149 if (event->isFull()) 145 150 { 151 CTimer::get("Process events").resume() ; 146 152 dispatchEvent(*event) ; 153 CTimer::get("Process events").suspend() ; 147 154 pendingEvent=false ; 148 155 delete event ; -
XIOS/trunk/src/cxios.cpp
r346 r347 4 4 #include "client.hpp" 5 5 #include "server.hpp" 6 //#include "tree_manager.hpp"7 6 #include "xml_parser.hpp" 8 7 #include <boost/functional/hash.hpp> -
XIOS/trunk/src/data_output.cpp
r346 r347 14 14 //---------------------------------------------------------------- 15 15 16 void CDataOutput::writeGrid 17 (const boost::shared_ptr<CGrid> grid) 16 void CDataOutput::writeGrid(CGrid* grid) 18 17 { 19 18 if (grid->domain_ref.isEmpty()) … … 34 33 //---------------------------------------------------------------- 35 34 36 void CDataOutput::writeFile 37 (const boost::shared_ptr<CFile> file) 35 void CDataOutput::writeFile(CFile* file) 38 36 { 39 37 this->writeFile_(file); … … 52 50 //---------------------------------------------------------------- 53 51 54 void CDataOutput::writeGrid 55 (const boost::shared_ptr<CDomain> domain, 56 const boost::shared_ptr<CAxis> axis) 52 void CDataOutput::writeGrid(CDomain* domain,CAxis* axis) 57 53 { 58 54 this->writeDomain_(domain); … … 62 58 //---------------------------------------------------------------- 63 59 64 void CDataOutput::writeGrid 65 (const boost::shared_ptr<CDomain> domain) 60 void CDataOutput::writeGrid(CDomain* domain) 66 61 { 67 62 this->writeDomain_(domain); … … 70 65 //---------------------------------------------------------------- 71 66 72 void CDataOutput::writeField 73 (const boost::shared_ptr<CField> field) 67 void CDataOutput::writeField(CField* field) 74 68 { 75 boost::shared_ptr<CContext>context = CContext::getCurrent() ;69 CContext* context = CContext::getCurrent() ; 76 70 boost::shared_ptr<CCalendar> calendar = context->getCalendar(); 77 71 … … 82 76 //---------------------------------------------------------------- 83 77 84 void CDataOutput::writeFieldGrid 85 (const boost::shared_ptr<CField> field) 78 void CDataOutput::writeFieldGrid(CField* field) 86 79 { 87 80 this->writeGrid(field->getRelGrid()); … … 90 83 //---------------------------------------------------------------- 91 84 92 void CDataOutput::writeFieldData( const boost::shared_ptr<CField>field)85 void CDataOutput::writeFieldData(CField* field) 93 86 { 94 boost::shared_ptr<CGrid>grid = CGrid::get(field->grid_ref.getValue());95 boost::shared_ptr<CDomain>domain = CDomain::get(grid->domain_ref.getValue());87 CGrid* grid = CGrid::get(field->grid_ref.getValue()); 88 CDomain* domain = CDomain::get(grid->domain_ref.getValue()); 96 89 97 90 // if (domain->isEmpty()) return; -
XIOS/trunk/src/data_output.hpp
r345 r347 23 23 24 24 /// Ecriture /// 25 void writeFile ( const boost::shared_ptr<CFile>file);25 void writeFile (CFile* file); 26 26 void syncFile (void); 27 27 void closeFile (void); 28 void writeField ( const boost::shared_ptr<CField>field);29 void writeFieldGrid( const boost::shared_ptr<CField>field);30 void writeFieldData( const boost::shared_ptr<CField>field);28 void writeField (CField* field); 29 void writeFieldGrid(CField* field); 30 void writeFieldData(CField* field); 31 31 32 32 virtual void definition_start(void) = 0; … … 38 38 39 39 /// Ecriture /// 40 void writeGrid( const boost::shared_ptr<CGrid>grid);41 void writeGrid( const boost::shared_ptr<CDomain>domain,42 const boost::shared_ptr<CAxis>axis);43 void writeGrid( const boost::shared_ptr<CDomain>domain);40 void writeGrid(CGrid* grid); 41 void writeGrid(CDomain* domain, 42 CAxis* axis); 43 void writeGrid(CDomain* domain); 44 44 45 virtual void writeFile_ ( const boost::shared_ptr<CFile>file) = 0;45 virtual void writeFile_ (CFile* file) = 0; 46 46 virtual void closeFile_ (void) = 0; 47 47 virtual void syncFile_ (void) = 0; 48 virtual void writeField_ ( const boost::shared_ptr<CField>field) = 0;49 virtual void writeFieldData_ ( const boost::shared_ptr<CField>field) = 0;50 virtual void writeDomain_ ( const boost::shared_ptr<CDomain>domain) = 0;51 virtual void writeAxis_ ( const boost::shared_ptr<CAxis>axis) = 0;52 virtual void writeTimeAxis_ ( const boost::shared_ptr<CField>field,53 const boost::shared_ptr<CCalendar> cal) = 0;48 virtual void writeField_ (CField* field) = 0; 49 virtual void writeFieldData_ (CField* field) = 0; 50 virtual void writeDomain_ (CDomain* domain) = 0; 51 virtual void writeAxis_ (CAxis* axis) = 0; 52 virtual void writeTimeAxis_ (CField* field, 53 const shared_ptr<CCalendar> cal) = 0; 54 54 55 55 /// Propriétés protégées /// -
XIOS/trunk/src/field_impl.hpp
r346 r347 7 7 #include "context.hpp" 8 8 #include "grid.hpp" 9 #include "timer.hpp" 9 10 10 11 … … 14 15 void CField::setData(const ARRAY(double, N) _data) 15 16 { 16 const std::vector< boost::shared_ptr<CField> >& refField=getAllReference();17 std::vector< boost::shared_ptr<CField>>::const_iterator it = refField.begin(), end = refField.end();17 const std::vector<CField*>& refField=getAllReference(); 18 std::vector<CField*>::const_iterator it = refField.begin(), end = refField.end(); 18 19 19 20 for (; it != end; it++) (*it)->updateData(_data) ; … … 23 24 bool CField::updateData(const ARRAY(double, N) _data) 24 25 { 25 shared_ptr<CContext>context=CContext::getCurrent();26 CContext* context=CContext::getCurrent(); 26 27 const CDate & currDate = context->getCalendar()->getCurrentDate(); 27 28 const CDate opeDate = *last_operation + freq_operation; … … 52 53 *last_Write = writeDate; 53 54 info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate << std::endl; 55 CTimer::get("XIOS Send Data").resume() ; 54 56 sendUpdateData() ; 57 CTimer::get("XIOS Send Data").suspend() ; 55 58 return (true); 56 59 } -
XIOS/trunk/src/generate_fortran_interface.cpp
r346 r347 11 11 string path="./interface/" ; 12 12 13 CContext* context=CContext::create("interface") .get();13 CContext* context=CContext::create("interface") ; 14 14 CAxis axis ; 15 15 CAxisGroup axisgroup ; -
XIOS/trunk/src/generate_interface_impl.hpp
r335 r347 22 22 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<" "<<name<<")"<<iendl ; 23 23 oss<<"{"<<iendl ; 24 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 24 25 oss<<" "<<className<<"_hdl->"<<name<<".setValue("<<name<<");"<<iendl ; 25 26 oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ; 27 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 26 28 oss<<"}"<<iendl ; 27 29 … … 41 43 oss<<" std::string "<<name<<"_str;"<<iendl; 42 44 oss<<" if(!cstr2string("<<name<<", "<<name<<"_size, "<<name<<"_str)) return;"<<iendl ; 45 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 43 46 oss<<" "<<className<<"_hdl->"<<name<<".setValue("<<name<<"_str);"<<iendl ; 44 47 oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ; 48 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 45 49 oss<<"}"<<iendl ; 46 50 … … 49 53 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, char * "<<name<<", int "<<name<<"_size)"<<iendl ; 50 54 oss<<"{"<<iendl ; 55 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 51 56 oss<<" if(!string_copy("<<className<<"_hdl->"<<name<<".getValue(),"<<name<<" , "<<name<<"_size))"<<iendl ; 52 57 oss<<" ERROR(\"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, char * "<<name<<", int " 53 58 <<name<<"_size)\", <<\"Input string is to short\");"<<iendl ; 54 59 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 55 60 oss<<"}"<<iendl ; 56 61 … … 69 74 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)"<<iendl ;\ 70 75 oss<<"{"<<iendl ;\ 76 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 71 77 oss<<" ARRAY("<<typeName<<",1) array_tmp(new CArray<"<<typeName<<",1>(boost::extents[extent1]));"<<iendl ;\ 72 78 oss<<" std::copy("<<name<<", &("<<name<<"[array_tmp->num_elements()]), array_tmp->data());"<<iendl ;\ … … 80 86 oss<<" ERROR(\"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)\",<<" \ 81 87 <<"\"Output array size is not conform to array size attribute\") ;"<<iendl; \ 88 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 82 89 oss<<"}"<<iendl ;\ 83 90 }\ … … 90 97 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)"<<iendl ;\ 91 98 oss<<"{"<<iendl ;\ 99 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 92 100 oss<<" ARRAY("<<typeName<<",2) array_tmp(new CArray<"<<typeName<<",2>(boost::extents[extent1][extent2]));"<<iendl ;\ 93 101 oss<<" std::copy("<<name<<", &("<<name<<"[array_tmp->num_elements()]), array_tmp->data());"<<iendl ;\ … … 101 109 oss<<" ERROR(\"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)\",<<" \ 102 110 <<"\"Output array size is not conform to array size attribute\") ;"<<iendl; \ 111 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 103 112 oss<<"}"<<iendl ;\ 104 113 }\ … … 111 120 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\ 112 121 oss<<"{"<<iendl ;\ 122 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 113 123 oss<<" ARRAY("<<typeName<<",3) array_tmp(new CArray<"<<typeName<<",3>(boost::extents[extent1][extent2][extent3]));"<<iendl ;\ 114 124 oss<<" std::copy("<<name<<", &("<<name<<"[array_tmp->num_elements()]), array_tmp->data());"<<iendl ;\ … … 122 132 oss<<" ERROR(\"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)\",<<" \ 123 133 <<"\"Output array size is not conform to array size attribute\") ;"<<iendl; \ 134 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 124 135 oss<<"}"<<iendl ;\ 125 136 } -
XIOS/trunk/src/group_factory_impl.hpp
r335 r347 30 30 << " pgroup or cgroup NULL !"); 31 31 if (!child->hasId()) 32 group->childList.insert(group->childList.end(), child );32 group->childList.insert(group->childList.end(), child.get()); 33 33 else 34 34 { 35 group->childList.insert(group->childList.end(), child );36 group->childMap.insert(std::make_pair(child->getId(), child ));35 group->childList.insert(group->childList.end(), child.get()); 36 group->childMap.insert(std::make_pair(child->getId(), child.get())); 37 37 } 38 38 } … … 47 47 { 48 48 boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>()); 49 group->groupList.insert(group->groupList.end(), value );50 group->groupMap.insert(std::make_pair(value->getId(), value ));49 group->groupList.insert(group->groupList.end(), value.get()); 50 group->groupMap.insert(std::make_pair(value->getId(), value.get())); 51 51 return (value); 52 52 } … … 56 56 { 57 57 boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id); 58 group->groupList.insert(group->groupList.end(), value );59 group->groupMap.insert(std::make_pair(id, value ));58 group->groupList.insert(group->groupList.end(), value.get()); 59 group->groupMap.insert(std::make_pair(id, value.get())); 60 60 return (value); 61 61 } … … 72 72 boost::shared_ptr<typename U::RelChild> value = 73 73 CObjectFactory::CreateObject<typename U::RelChild>(); 74 group->childList.insert(group->childList.end(), value );75 group->childMap.insert(std::make_pair(value->getId(), value ));74 group->childList.insert(group->childList.end(), value.get()); 75 group->childMap.insert(std::make_pair(value->getId(), value.get())); 76 76 return (value); 77 77 } … … 82 82 boost::shared_ptr<typename U::RelChild> value = 83 83 CObjectFactory::CreateObject<typename U::RelChild>(id); 84 group->childList.insert(group->childList.end(), value );85 group->childMap.insert(std::make_pair(id, value ));84 group->childList.insert(group->childList.end(), value.get()); 85 group->childMap.insert(std::make_pair(id, value.get())); 86 86 return (value); 87 87 } … … 120 120 << "[ id = " << id << ", U = " << U::GetName() << " ] " 121 121 << " group is not referenced !"); 122 return (group->groupMap[id] );122 return (group->groupMap[id]->getShared()); 123 123 } 124 124 … … 131 131 << "[ id = " << id << ", U = " << U::GetName() << " ] " 132 132 << " child is not referenced !"); 133 return (group->childMap[id] );133 return (group->childMap[id]->getShared()); 134 134 } 135 135 -
XIOS/trunk/src/group_parser.hpp
r346 r347 28 28 29 29 // PARSING POUR GESTION DES ENFANTS 30 boost::shared_ptr<V> group_ptr = (this->hasId())31 ? CObjectFactory::GetObject<V>(this->getId())32 : CObjectFactory::GetObject(boost::polymorphic_downcast<V*>(this));30 V* group_ptr = (this->hasId()) 31 ? V::get(this->getId()) 32 : boost::polymorphic_downcast<V*>(this); 33 33 34 34 if (!(node.goToChildElement())) … … 52 52 { 53 53 if (attributes.end() == attributes.find("id")) 54 CGroupFactory::CreateGroup(group_ptr )->parse(node);54 CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node); 55 55 else 56 CGroupFactory::CreateGroup(group_ptr , attributes["id"])->parse(node);56 CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node); 57 57 continue; 58 58 } … … 61 61 { 62 62 if (attributes.end() == attributes.find("id")) 63 CGroupFactory::CreateChild(group_ptr )->parse(node);63 CGroupFactory::CreateChild(group_ptr->getShared())->parse(node); 64 64 else 65 CGroupFactory::CreateChild(group_ptr , attributes["id"])->parse(node);65 CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node); 66 66 continue; 67 67 } -
XIOS/trunk/src/group_template.hpp
r346 r347 35 35 36 36 /// Accesseurs /// 37 const xios_map<StdString, 38 boost::shared_ptr<Group> >& getGroupMap(void) const; 39 const std::vector<boost::shared_ptr<Child> >& getChildList(void) const; 37 const xios_map<StdString,Group*>& getGroupMap(void) const; 38 const vector<Child*>& getChildList(void) const; 40 39 41 void getAllChildren( std::vector<boost::shared_ptr<Child>> & allc) const;42 std::vector<boost::shared_ptr<Child>> getAllChildren(void) const;40 void getAllChildren(vector<Child*> & allc) const; 41 vector<Child*> getAllChildren(void) const; 43 42 44 43 /// Autres /// … … 65 64 // static boost::shared_ptr<V> get(const string& id) ; 66 65 // static boost::shared_ptr<V> create(const string& id=string("")) ; 67 boost::shared_ptr<U> createChild(const string& id="") ; 68 void addChild(shared_ptr<U> child) ; 69 boost::shared_ptr<V> createChildGroup(const string& id="") ; 70 void addChildGroup(shared_ptr<V> childGroup) ; 66 U* createChild(const string& id="") ; 67 68 void addChild(U* child) ; 69 V* createChildGroup(const string& id="") ; 70 void addChildGroup(V* childGroup) ; 71 71 static bool dispatchEvent(CEventServer& event) ; 72 72 void sendCreateChild(const string& id="") ; … … 92 92 93 93 /// Propriétés /// 94 xios_map<StdString, 95 boost::shared_ptr<Child> > childMap; 96 std::vector<boost::shared_ptr<Child> > childList; 94 xios_map<StdString, Child* > childMap; 95 vector<Child*> childList; 97 96 98 xios_map<StdString, 99 boost::shared_ptr<Group> > groupMap; 100 std::vector<boost::shared_ptr<Group> > groupList; 97 xios_map<StdString,Group* > groupMap; 98 vector<Group* > groupList; 101 99 102 100 }; // class CGroupTemplate -
XIOS/trunk/src/group_template_impl.hpp
r346 r347 49 49 os.write (reinterpret_cast<const char*>(&chdnb) , sizeof(StdSize)); 50 50 51 typename std::vector< boost::shared_ptr<V> >::const_iterator51 typename std::vector<V*>::const_iterator 52 52 itg = this->groupList.begin(), endg = this->groupList.end(); 53 typename std::vector< boost::shared_ptr<U>>::const_iterator53 typename std::vector<U*>::const_iterator 54 54 itc = this->childList.begin(), endc = this->childList.end(); 55 55 56 56 for (; itg != endg; itg++) 57 57 { 58 boost::shared_ptr<V>group = *itg;58 V* group = *itg; 59 59 bool hid = group->hasId(); 60 60 … … 75 75 for (; itc != endc; itc++) 76 76 { 77 boost::shared_ptr<U>child = *itc;77 U* child = *itc; 78 78 bool hid = child->hasId(); 79 79 … … 99 99 SuperClass::fromBinary(is); 100 100 101 boost::shared_ptr<V>group_ptr = (this->hasId())102 ? CObjectFactory::GetObject<V>(this->getId())103 : CObjectFactory::GetObject(boost::polymorphic_downcast<V*>(this));101 V* group_ptr = (this->hasId()) 102 ? V::get(this->getId()) 103 : V::get((V*)this); 104 104 105 105 StdSize grpnb = 0; … … 126 126 StdString id(size, ' '); 127 127 is.read (const_cast<char *>(id.data()), size * sizeof(char)); 128 CGroupFactory::CreateGroup(group_ptr , id)->fromBinary(is);128 CGroupFactory::CreateGroup(group_ptr->getShared(), id)->fromBinary(is); 129 129 } 130 130 else 131 131 { 132 CGroupFactory::CreateGroup(group_ptr )->fromBinary(is);132 CGroupFactory::CreateGroup(group_ptr->getShared())->fromBinary(is); 133 133 } 134 134 } … … 150 150 StdString id(size, ' '); 151 151 is.read (const_cast<char *>(id.data()), size * sizeof(char)); 152 CGroupFactory::CreateChild(group_ptr , id)->fromBinary(is);152 CGroupFactory::CreateChild(group_ptr->getShared(), id)->fromBinary(is); 153 153 } 154 154 else 155 155 { 156 CGroupFactory::CreateChild(group_ptr )->fromBinary(is);156 CGroupFactory::CreateChild(group_ptr->getShared())->fromBinary(is); 157 157 } 158 158 } … … 176 176 oss << SuperClassAttribute::toString() << ">" << std::endl; 177 177 178 typename std::vector< boost::shared_ptr<V>>::const_iterator178 typename std::vector<V*>::const_iterator 179 179 itg = this->groupList.begin(), endg = this->groupList.end(); 180 typename std::vector< boost::shared_ptr<U>>::const_iterator180 typename std::vector<U*>::const_iterator 181 181 itc = this->childList.begin(), endc = this->childList.end(); 182 182 183 183 for (; itg != endg; itg++) 184 184 { 185 boost::shared_ptr<V>group = *itg;185 V* group = *itg; 186 186 oss << *group << std::endl; 187 187 } … … 189 189 for (; itc != endc; itc++) 190 190 { 191 boost::shared_ptr<U>child = *itc;191 U* child = *itc; 192 192 oss << *child << std::endl; 193 193 } … … 226 226 227 227 template <class U, class V, class W> 228 const std::vector< boost::shared_ptr<U>>&228 const std::vector<U*>& 229 229 CGroupTemplate<U, V, W>::getChildList(void) const 230 230 { … … 235 235 236 236 template <class U, class V, class W> 237 const xios_map<StdString, boost::shared_ptr<V>>&237 const xios_map<StdString, V*>& 238 238 CGroupTemplate<U, V, W>::getGroupMap(void) const 239 239 { … … 265 265 SuperClassAttribute::setAttributes(parent); 266 266 267 typename std::vector< boost::shared_ptr<U>>::const_iterator267 typename std::vector<U*>::const_iterator 268 268 itc = this->childList.begin(), endc = this->childList.end(); 269 typename std::vector< boost::shared_ptr<V>>::const_iterator269 typename std::vector<V*>::const_iterator 270 270 itg = this->groupList.begin(), endg = this->groupList.end(); 271 271 272 272 for (; itc != endc; itc++) 273 273 { 274 boost::shared_ptr<U>child = *itc;274 U* child = *itc; 275 275 child->solveDescInheritance(this); 276 276 } … … 278 278 for (; itg != endg; itg++) 279 279 { 280 boost::shared_ptr<V>group = *itg;280 V* group = *itg; 281 281 group->solveRefInheritance(); 282 282 group->solveDescInheritance(this); … … 287 287 288 288 template <class U, class V, class W> 289 void CGroupTemplate<U, V, W>::getAllChildren(std::vector< boost::shared_ptr<U> >& allc) const289 void CGroupTemplate<U, V, W>::getAllChildren(std::vector<U*>& allc) const 290 290 { 291 291 allc.insert (allc.end(), childList.begin(), childList.end()); 292 typename std::vector< boost::shared_ptr<V>>::const_iterator292 typename std::vector<V*>::const_iterator 293 293 itg = this->groupList.begin(), endg = this->groupList.end(); 294 294 295 295 for (; itg != endg; itg++) 296 296 { 297 boost::shared_ptr<V>group = *itg;297 V* group = *itg; 298 298 group->getAllChildren(allc); 299 299 } … … 303 303 304 304 template <class U, class V, class W> 305 std::vector< boost::shared_ptr<U>> CGroupTemplate<U, V, W>::getAllChildren(void) const306 { 307 std::vector< boost::shared_ptr<U>> allc;305 std::vector<U*> CGroupTemplate<U, V, W>::getAllChildren(void) const 306 { 307 std::vector<U*> allc; 308 308 this->getAllChildren(allc); 309 309 return (allc); … … 343 343 344 344 template <class U, class V, class W> 345 boost::shared_ptr<U>CGroupTemplate<U, V, W>::createChild(const string& id)345 U* CGroupTemplate<U, V, W>::createChild(const string& id) 346 346 { 347 return CGroupFactory::CreateChild<V>(this->get (), id) ;347 return CGroupFactory::CreateChild<V>(this->getShared(), id).get() ; 348 348 } 349 349 350 350 template <class U, class V, class W> 351 void CGroupTemplate<U, V, W>::addChild( shared_ptr<U>child)351 void CGroupTemplate<U, V, W>::addChild(U* child) 352 352 { 353 return CGroupFactory::AddChild<V>(this->get (),child) ;353 return CGroupFactory::AddChild<V>(this->getShared,child->getShared()) ; 354 354 } 355 355 356 356 template <class U, class V, class W> 357 boost::shared_ptr<V>CGroupTemplate<U, V, W>::createChildGroup(const string& id)357 V* CGroupTemplate<U, V, W>::createChildGroup(const string& id) 358 358 { 359 return CGroupFactory::CreateGroup<V>(this->get (), id) ;359 return CGroupFactory::CreateGroup<V>(this->getShared(), id).get() ; 360 360 } 361 361 362 362 template <class U, class V, class W> 363 void CGroupTemplate<U, V, W>::addChildGroup( shared_ptr<V>childGroup)363 void CGroupTemplate<U, V, W>::addChildGroup(V* childGroup) 364 364 { 365 return CGroupFactory::AddGroup<V>(this->get (), childGroup) ;365 return CGroupFactory::AddGroup<V>(this->getShared(), childGroup->getShared()) ; 366 366 } 367 367 … … 370 370 void CGroupTemplate<U, V, W>::sendCreateChild(const string& id) 371 371 { 372 shared_ptr<CContext>context=CContext::getCurrent() ;372 CContext* context=CContext::getCurrent() ; 373 373 374 374 if (! context->hasServer ) … … 393 393 void CGroupTemplate<U, V, W>::sendCreateChildGroup(const string& id) 394 394 { 395 shared_ptr<CContext>context=CContext::getCurrent() ;395 CContext* context=CContext::getCurrent() ; 396 396 if (! context->hasServer ) 397 397 { -
XIOS/trunk/src/interface/c/icaxis.cpp
r346 r347 13 13 14 14 #include "icutil.hpp" 15 #include "timer.hpp" 15 16 16 17 extern "C" … … 29 30 std::string id; 30 31 if (!cstr2string(_id, _id_len, id)) return; 31 32 *_ret = xios::CAxis::get(id).get(); 32 CTimer::get("XIOS").resume() ; 33 *_ret = xios::CAxis::get(id); 34 CTimer::get("XIOS").suspend() ; 33 35 } 34 36 … … 37 39 std::string id; 38 40 if (!cstr2string(_id, _id_len, id)) return; 39 40 *_ret = xios::CAxisGroup::get(id).get(); 41 } 41 CTimer::get("XIOS").resume() ; 42 *_ret = xios::CAxisGroup::get(id); 43 CTimer::get("XIOS").suspend() ; 44 } 42 45 43 46 // -------------------- Vérification des identifiants ----------------------- … … 48 51 if (!cstr2string(_id, _id_len, id)) return; 49 52 53 CTimer::get("XIOS").resume() ; 50 54 *_ret = xios::CAxis::has(id); 55 CTimer::get("XIOS").suspend() ; 51 56 } 52 57 … … 56 61 if (!cstr2string(_id, _id_len, id)) return; 57 62 63 CTimer::get("XIOS").resume() ; 58 64 *_ret = xios::CAxisGroup::has(id); 65 CTimer::get("XIOS").suspend() ; 66 59 67 } 60 68 -
XIOS/trunk/src/interface/c/iccontext.cpp
r346 r347 15 15 16 16 #include "icutil.hpp" 17 #include "timer.hpp" 17 18 18 19 extern "C" … … 32 33 std::string id; 33 34 if (!cstr2string(_id, _id_len, id)) return; 34 35 std::vector<boost::shared_ptr<xios::CContext> > def_vector = 35 CTimer::get("XIOS").resume() ; 36 37 std::vector<xios::CContext*> def_vector = 36 38 xios::CContext::getRoot()->getChildList(); 37 39 … … 39 41 { 40 42 if (def_vector[i]->getId().compare(id) == 0) 41 *_ret = def_vector[i].get(); 43 *_ret = def_vector[i]; 44 CTimer::get("XIOS").suspend() ; 42 45 return; 43 46 } 47 CTimer::get("XIOS").suspend() ; 44 48 // Lever une exeception ici 45 49 } … … 49 53 void cxios_context_set_current(XContextPtr context, bool withswap) 50 54 { 55 CTimer::get("XIOS").resume() ; 51 56 CContext::setCurrent(context->getId()); 57 CTimer::get("XIOS").suspend() ; 52 58 } 53 59 … … 59 65 std::string id; 60 66 if (!cstr2string(_id, _id_len, id)) return; 61 62 std::vector<boost::shared_ptr<xios::CContext> > def_vector = 67 68 CTimer::get("XIOS").resume() ; 69 std::vector<xios::CContext*> def_vector = 63 70 xios::CContext::getRoot()->getChildList(); 64 71 … … 69 76 } 70 77 *_ret = false; 78 CTimer::get("XIOS").suspend() ; 71 79 } 72 80 } // extern "C" -
XIOS/trunk/src/interface/c/icdata.cpp
r346 r347 22 22 #include "field_impl.hpp" 23 23 #include <mpi.h> 24 #include "timer.hpp" 24 25 25 26 extern "C" … … 36 37 void cxios_init_server(void) 37 38 { 39 CTimer::get("XIOS").resume() ; 38 40 CXios::initServerSide(); 41 CTimer::get("XIOS").suspend() ; 39 42 } 40 43 … … 46 49 47 50 if (!cstr2string(client_id, len_client_id, str)) return; 48 51 52 CTimer::get("XIOS").resume() ; 53 CTimer::get("XIOS init").resume() ; 49 54 int initialized ; 50 55 MPI_Initialized(&initialized) ; … … 53 58 CXios::initClientSide(str,local_comm,return_comm); 54 59 *f_return_comm=MPI_Comm_c2f(return_comm) ; 60 CTimer::get("XIOS init").suspend() ; 61 CTimer::get("XIOS").suspend() ; 55 62 } 56 63 … … 61 68 62 69 if (!cstr2string(context_id, len_context_id, str)) return; 70 CTimer::get("XIOS").resume() ; 71 CTimer::get("XIOS init context").resume() ; 63 72 comm=MPI_Comm_f2c(*f_comm) ; 64 73 CClient::registerContext(str,comm) ; 74 CTimer::get("XIOS init context").suspend() ; 75 CTimer::get("XIOS").suspend() ; 65 76 } 66 77 67 78 void cxios_context_close_definition() 68 79 { 69 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 80 CTimer::get("XIOS").resume() ; 81 CTimer::get("XIOS close definition").resume() ; 82 CContext* context = CContext::getCurrent() ; 70 83 context->closeDefinition() ; 84 CTimer::get("XIOS close definition").suspend() ; 85 CTimer::get("XIOS").suspend() ; 71 86 } 72 87 73 88 void cxios_context_finalize() 74 89 { 75 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 90 CTimer::get("XIOS").resume() ; 91 CTimer::get("XIOS context finalize").resume() ; 92 CContext* context = CContext::getCurrent() ; 76 93 context->finalize() ; 94 CTimer::get("XIOS context finalize").suspend() ; 95 CTimer::get("XIOS").suspend() ; 77 96 } 78 97 79 98 void cxios_finalize() 80 99 { 100 CTimer::get("XIOS").resume() ; 101 CTimer::get("XIOS finalize").resume() ; 81 102 CXios::clientFinalize() ; 103 CTimer::get("XIOS finalize").suspend() ; 104 CTimer::get("XIOS").suspend() ; 82 105 } 83 106 … … 89 112 { 90 113 std::string fieldid_str; 91 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 92 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 93 114 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 115 116 CTimer::get("XIOS").resume() ; 117 CTimer::get("XIOS send field").resume() ; 118 CContext* context = CContext::getCurrent() ; 94 119 // boost::const_multi_array_ref<double, 1> array_(data_k8, 95 120 // boost::extents [data_Xsize], … … 100 125 // dtreat->write_data(fieldid_str, data); 101 126 CField::get(fieldid_str)->setData(data) ; 127 CTimer::get("XIOS send field").suspend() ; 128 CTimer::get("XIOS").suspend() ; 102 129 } 103 130 … … 105 132 { 106 133 std::string fieldid_str; 107 boost::shared_ptr<CContext> context = CContext::getCurrent() ;108 134 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 135 136 CTimer::get("XIOS").resume() ; 137 CTimer::get("XIOS send field").resume() ; 138 CContext* context = CContext::getCurrent() ; 109 139 110 140 // boost::const_multi_array_ref<double, 2> array_(data_k8, … … 115 145 // dtreat->write_data(fieldid_str, data); 116 146 CField::get(fieldid_str)->setData(data) ; 147 CTimer::get("XIOS send field").suspend() ; 148 CTimer::get("XIOS").suspend() ; 117 149 } 118 150 … … 120 152 { 121 153 std::string fieldid_str; 122 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 123 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 124 154 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 155 156 CTimer::get("XIOS").resume() ; 157 CTimer::get("XIOS send field").resume() ; 158 CContext* context = CContext::getCurrent() ; 125 159 // boost::const_multi_array_ref<double, 3> array_(data_k8, 126 160 // boost::extents [data_Xsize][data_Ysize][data_Zsize], … … 130 164 // dtreat->write_data(fieldid_str, data); 131 165 CField::get(fieldid_str)->setData(data) ; 132 166 CTimer::get("XIOS send field").suspend() ; 167 CTimer::get("XIOS").suspend() ; 133 168 } 134 169 … … 136 171 { 137 172 std::string fieldid_str; 138 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 139 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 140 173 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 174 175 CTimer::get("XIOS").resume() ; 176 CTimer::get("XIOS send field").resume() ; 177 CContext* context = CContext::getCurrent() ; 141 178 // boost::const_multi_array_ref<float, 1> array_(data_k4, 142 179 // boost::extents [data_Xsize], … … 149 186 for(int i=0;i<data->num_elements();i++) ptr_data[i]=data_k4[i]; 150 187 CField::get(fieldid_str)->setData(data) ; 188 CTimer::get("XIOS send field").suspend() ; 189 CTimer::get("XIOS").suspend() ; 151 190 } 152 191 … … 154 193 { 155 194 std::string fieldid_str; 156 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 157 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 158 195 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 196 197 CTimer::get("XIOS").resume() ; 198 CTimer::get("XIOS send field").resume() ; 199 CContext* context = CContext::getCurrent() ; 159 200 // boost::const_multi_array_ref<float, 2> array_(data_k4, 160 201 // boost::extents [data_Xsize][data_Ysize], … … 167 208 for(int i=0;i<data->num_elements();i++) ptr_data[i]=data_k4[i]; 168 209 CField::get(fieldid_str)->setData(data) ; 210 CTimer::get("XIOS send field").suspend() ; 211 CTimer::get("XIOS").suspend() ; 169 212 } 170 213 … … 172 215 { 173 216 std::string fieldid_str; 174 boost::shared_ptr<CContext> context = CContext::getCurrent() ; 175 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 176 217 218 if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return; 219 220 CTimer::get("XIOS").resume() ; 221 CTimer::get("XIOS send field").resume() ; 222 CContext* context = CContext::getCurrent() ; 223 177 224 // boost::const_multi_array_ref<float, 3> array_(data_k4, 178 225 // boost::extents [data_Xsize][data_Ysize][data_Zsize], … … 185 232 for(int i=0;i<data->num_elements();i++) ptr_data[i]=data_k4[i]; 186 233 CField::get(fieldid_str)->setData(data) ; 234 CTimer::get("XIOS send field").suspend() ; 235 CTimer::get("XIOS").suspend() ; 236 187 237 } 188 238 -
XIOS/trunk/src/interface/c/icdate.cpp
r346 r347 15 15 16 16 #include "icutil.hpp" 17 #include "timer.hpp" 17 18 18 19 extern "C" … … 25 26 try 26 27 { 28 CTimer::get("XIOS").resume() ; 27 29 CDuration dur = {ts_year, ts_month, ts_day, ts_hour, ts_minute, ts_second}; 28 boost::shared_ptr<xios::CContext>context = CContext::getCurrent() ;30 xios::CContext* context = CContext::getCurrent() ; 29 31 30 32 context->timestep.setValue(dur.toString()); 31 33 context->sendAttributToServer("timestep") ; 34 CTimer::get("XIOS").suspend() ; 32 35 } 33 36 catch (xios::CException & exc) … … 40 43 void cxios_update_calendar(int step) 41 44 { 42 boost::shared_ptr<xios::CContext> context = CContext::getCurrent() ; 45 CTimer::get("XIOS").resume() ; 46 xios::CContext* context = CContext::getCurrent() ; 43 47 context->updateCalendar(step) ; 44 48 context->sendUpdateCalendar(step) ; 49 CTimer::get("XIOS").suspend() ; 45 50 46 51 } -
XIOS/trunk/src/interface/c/icdomain.cpp
r346 r347 13 13 14 14 #include "icutil.hpp" 15 #include "timer.hpp" 15 16 16 17 extern "C" … … 29 30 std::string id; 30 31 if (!cstr2string(_id, _id_len, id)) return; 31 32 *_ret = CDomain::get(id).get(); 32 CTimer::get("XIOS").resume() ; 33 *_ret = CDomain::get(id); 34 CTimer::get("XIOS").suspend() ; 33 35 } 34 36 … … 38 40 if (!cstr2string(_id, _id_len, id)) return; 39 41 40 *_ret = CDomainGroup::get(id).get(); 42 CTimer::get("XIOS").resume() ; 43 *_ret = CDomainGroup::get(id); 44 CTimer::get("XIOS").suspend() ; 41 45 } 42 46 … … 48 52 if (!cstr2string(_id, _id_len, id)) return; 49 53 54 CTimer::get("XIOS").resume() ; 50 55 *_ret = CDomain::has(id); 56 CTimer::get("XIOS").suspend() ; 51 57 } 52 58 … … 55 61 std::string id; 56 62 if (!cstr2string(_id, _id_len, id)) return; 57 63 CTimer::get("XIOS").resume() ; 58 64 *_ret = CDomainGroup::has(id); 65 CTimer::get("XIOS").suspend() ; 59 66 } 60 67 } // extern "C" -
XIOS/trunk/src/interface/c/icfield.cpp
r346 r347 13 13 14 14 #include "icutil.hpp" 15 #include "timer.hpp" 15 16 16 17 extern "C" … … 31 32 std::string id; 32 33 if (!cstr2string(_id, _id_len, id)) return; 33 34 *_ret = CField::get(id).get(); 34 CTimer::get("XIOS").resume() ; 35 *_ret = CField::get(id); 36 CTimer::get("XIOS").suspend() ; 35 37 } 36 38 … … 39 41 std::string id; 40 42 if (!cstr2string(_id, _id_len, id)) return; 41 42 *_ret = CFieldGroup::get(id).get(); 43 CTimer::get("XIOS").resume() ; 44 *_ret = CFieldGroup::get(id); 45 CTimer::get("XIOS").suspend() ; 43 46 } 44 47 … … 50 53 std::string id; 51 54 if (!cstr2string(_id, _id_len, id)) return; 52 55 CTimer::get("XIOS").resume() ; 53 56 *_ret = CField::has(id); 57 CTimer::get("XIOS").suspend() ; 54 58 } 55 59 … … 58 62 std::string id; 59 63 if (!cstr2string(_id, _id_len, id)) return; 60 64 CTimer::get("XIOS").resume() ; 61 65 *_ret = CFieldGroup::has(id); 66 CTimer::get("XIOS").suspend() ; 62 67 } 63 68 … … 68 73 void cxios_field_is_active (XFieldPtr field_hdl, bool* ret) 69 74 { 75 CTimer::get("XIOS").resume() ; 70 76 *ret = field_hdl->isActive(); 77 CTimer::get("XIOS").suspend() ; 71 78 } 72 79 -
XIOS/trunk/src/interface/c/icfile.cpp
r346 r347 13 13 14 14 #include "icutil.hpp" 15 #include "timer.hpp" 15 16 16 17 extern "C" … … 29 30 std::string id; 30 31 if (!cstr2string(_id, _id_len, id)) return; 31 32 *_ret = CFile::get(id).get(); 32 CTimer::get("XIOS").resume() ; 33 *_ret = CFile::get(id); 34 CTimer::get("XIOS").suspend() ; 33 35 } 34 36 … … 37 39 std::string id; 38 40 if (!cstr2string(_id, _id_len, id)) return; 39 40 *_ret = CFileGroup::get(id).get(); 41 CTimer::get("XIOS").resume() ; 42 *_ret = CFileGroup::get(id); 43 CTimer::get("XIOS").suspend() ; 41 44 } 42 45 … … 47 50 std::string id; 48 51 if (!cstr2string(_id, _id_len, id)) return; 49 52 CTimer::get("XIOS").resume() ; 50 53 *_ret = CFile::has(id); 54 CTimer::get("XIOS").suspend() ; 51 55 } 52 56 … … 55 59 std::string id; 56 60 if (!cstr2string(_id, _id_len, id)) return; 57 61 CTimer::get("XIOS").resume() ; 58 62 *_ret = CFileGroup::has(id); 63 CTimer::get("XIOS").suspend() ; 59 64 } 60 65 } // extern "C" -
XIOS/trunk/src/interface/c/icgrid.cpp
r346 r347 13 13 14 14 #include "icutil.hpp" 15 #include "timer.hpp" 15 16 16 17 extern "C" … … 29 30 std::string id; 30 31 if (!cstr2string(_id, _id_len, id)) return; 31 32 *_ret = CGrid::get(id).get(); 32 CTimer::get("XIOS").resume() ; 33 *_ret = CGrid::get(id); 34 CTimer::get("XIOS").suspend() ; 33 35 } 34 36 … … 37 39 std::string id; 38 40 if (!cstr2string(_id, _id_len, id)) return; 39 40 *_ret = CGridGroup::get(id).get(); 41 CTimer::get("XIOS").resume() ; 42 *_ret = CGridGroup::get(id); 43 CTimer::get("XIOS").suspend() ; 41 44 } 42 45 … … 47 50 std::string id; 48 51 if (!cstr2string(_id, _id_len, id)) return; 49 52 CTimer::get("XIOS").resume() ; 50 53 *_ret = CGrid::has(id); 54 CTimer::get("XIOS").suspend() ; 51 55 } 52 56 … … 55 59 std::string id; 56 60 if (!cstr2string(_id, _id_len, id)) return; 57 61 CTimer::get("XIOS").resume() ; 58 62 *_ret = CGridGroup::has(id); 63 CTimer::get("XIOS").suspend() ; 59 64 } 60 65 } // extern "C" -
XIOS/trunk/src/interface/c/icxml_tree.cpp
r346 r347 13 13 14 14 #include "icutil.hpp" 15 #include "timer.hpp" 15 16 16 17 extern "C" … … 43 44 { 44 45 std::string child_id_str; 45 46 if (cstr2string(child_id, child_id_size, child_id_str)) 47 { 48 *child_ = parent_->createChild(child_id_str).get() ; 49 parent_->sendCreateChild(child_id_str) ; 50 } 51 else 52 { 53 *child_ = parent_->createChild().get() ; 54 parent_->sendCreateChild() ; 55 } 46 CTimer::get("XIOS").resume() ; 47 if (cstr2string(child_id, child_id_size, child_id_str)) 48 { 49 *child_ = parent_->createChild(child_id_str) ; 50 parent_->sendCreateChild(child_id_str) ; 51 } 52 else 53 { 54 *child_ = parent_->createChild() ; 55 parent_->sendCreateChild() ; 56 } 57 CTimer::get("XIOS").suspend() ; 56 58 } 57 59 … … 60 62 { 61 63 std::string child_id_str; 62 if (cstr2string(child_id, child_id_size, child_id_str)) 63 { 64 *child_ = parent_->createChild(child_id_str).get() ; 65 parent_->sendCreateChild(child_id_str) ; 66 } 67 else 68 { 69 *child_ = parent_->createChild().get() ; 70 parent_->sendCreateChild() ; 71 } 64 CTimer::get("XIOS").resume() ; 65 if (cstr2string(child_id, child_id_size, child_id_str)) 66 { 67 *child_ = parent_->createChild(child_id_str) ; 68 parent_->sendCreateChild(child_id_str) ; 69 } 70 else 71 { 72 *child_ = parent_->createChild() ; 73 parent_->sendCreateChild() ; 74 } 75 CTimer::get("XIOS").suspend() ; 72 76 } 73 77 … … 76 80 { 77 81 std::string child_id_str; 78 if (cstr2string(child_id, child_id_size, child_id_str)) 79 { 80 *child_ = parent_->createChild(child_id_str).get() ; 81 parent_->sendCreateChild(child_id_str) ; 82 } 83 else 84 { 85 *child_ = parent_->createChild().get() ; 86 parent_->sendCreateChild() ; 87 } 82 CTimer::get("XIOS").resume() ; 83 if (cstr2string(child_id, child_id_size, child_id_str)) 84 { 85 *child_ = parent_->createChild(child_id_str) ; 86 parent_->sendCreateChild(child_id_str) ; 87 } 88 else 89 { 90 *child_ = parent_->createChild() ; 91 parent_->sendCreateChild() ; 92 } 93 CTimer::get("XIOS").suspend() ; 88 94 } 89 95 … … 92 98 { 93 99 std::string child_id_str; 94 if (cstr2string(child_id, child_id_size, child_id_str)) 95 { 96 *child_ = parent_->createChild(child_id_str).get() ; 97 parent_->sendCreateChild(child_id_str) ; 98 } 99 else 100 { 101 *child_ = parent_->createChild().get() ; 102 parent_->sendCreateChild() ; 103 } 100 CTimer::get("XIOS").resume() ; 101 if (cstr2string(child_id, child_id_size, child_id_str)) 102 { 103 *child_ = parent_->createChild(child_id_str) ; 104 parent_->sendCreateChild(child_id_str) ; 105 } 106 else 107 { 108 *child_ = parent_->createChild() ; 109 parent_->sendCreateChild() ; 110 } 111 CTimer::get("XIOS").suspend() ; 104 112 } 105 113 … … 107 115 (XDomainGroupPtr parent_, XDomainPtr * child_, const char * child_id, int child_id_size) 108 116 { 109 std::string child_id_str; 110 if (cstr2string(child_id, child_id_size, child_id_str)) 111 { 112 *child_ = parent_->createChild(child_id_str).get() ; 113 parent_->sendCreateChild(child_id_str) ; 114 } 115 else 116 { 117 *child_ = parent_->createChild().get() ; 118 parent_->sendCreateChild() ; 119 } 117 std::string child_id_str; 118 CTimer::get("XIOS").resume() ; 119 if (cstr2string(child_id, child_id_size, child_id_str)) 120 { 121 *child_ = parent_->createChild(child_id_str) ; 122 parent_->sendCreateChild(child_id_str) ; 123 } 124 else 125 { 126 *child_ = parent_->createChild() ; 127 parent_->sendCreateChild() ; 128 } 129 CTimer::get("XIOS").suspend() ; 120 130 } 121 131 … … 123 133 (XFilePtr parent_, XFieldPtr * child_, const char * child_id, int child_id_size) 124 134 { 125 std::string child_id_str; 135 std::string child_id_str; 136 CTimer::get("XIOS").resume() ; 126 137 127 138 if (cstr2string(child_id, child_id_size, child_id_str)) 128 139 { 129 *child_ = parent_->addField(child_id_str) .get();140 *child_ = parent_->addField(child_id_str); 130 141 parent_->sendAddField(child_id_str) ; 131 142 } 132 143 else 133 144 { 134 *child_ = parent_->addField() .get();145 *child_ = parent_->addField(); 135 146 parent_->sendAddField() ; 136 147 } 148 CTimer::get("XIOS").suspend() ; 137 149 } 138 150 … … 143 155 { 144 156 std::string child_id_str; 145 146 if (cstr2string(child_id, child_id_size, child_id_str)) 147 { 148 *child_ = parent_->createChildGroup(child_id_str).get() ; 149 parent_->sendCreateChildGroup(child_id_str) ; 150 } 151 else 152 { 153 *child_ = parent_->createChildGroup().get() ; 154 parent_->sendCreateChildGroup(child_id_str) ; 155 } 157 CTimer::get("XIOS").resume() ; 158 if (cstr2string(child_id, child_id_size, child_id_str)) 159 { 160 *child_ = parent_->createChildGroup(child_id_str) ; 161 parent_->sendCreateChildGroup(child_id_str) ; 162 } 163 else 164 { 165 *child_ = parent_->createChildGroup() ; 166 parent_->sendCreateChildGroup(child_id_str) ; 167 } 168 CTimer::get("XIOS").suspend() ; 156 169 } 157 170 … … 160 173 { 161 174 std::string child_id_str; 162 163 if (cstr2string(child_id, child_id_size, child_id_str)) 164 { 165 *child_ = parent_->createChildGroup(child_id_str).get() ; 166 parent_->sendCreateChildGroup(child_id_str) ; 167 } 168 else 169 { 170 *child_ = parent_->createChildGroup().get() ; 171 parent_->sendCreateChildGroup(child_id_str) ; 172 } 175 CTimer::get("XIOS").resume() ; 176 if (cstr2string(child_id, child_id_size, child_id_str)) 177 { 178 *child_ = parent_->createChildGroup(child_id_str) ; 179 parent_->sendCreateChildGroup(child_id_str) ; 180 } 181 else 182 { 183 *child_ = parent_->createChildGroup() ; 184 parent_->sendCreateChildGroup(child_id_str) ; 185 } 186 CTimer::get("XIOS").suspend() ; 173 187 } 174 188 … … 177 191 { 178 192 std::string child_id_str; 179 if (cstr2string(child_id, child_id_size, child_id_str)) 180 { 181 *child_ = parent_->createChildGroup(child_id_str).get() ; 182 parent_->sendCreateChildGroup(child_id_str) ; 183 } 184 else 185 { 186 *child_ = parent_->createChildGroup().get() ; 187 parent_->sendCreateChildGroup(child_id_str) ; 188 } 193 CTimer::get("XIOS").resume() ; 194 if (cstr2string(child_id, child_id_size, child_id_str)) 195 { 196 *child_ = parent_->createChildGroup(child_id_str) ; 197 parent_->sendCreateChildGroup(child_id_str) ; 198 } 199 else 200 { 201 *child_ = parent_->createChildGroup() ; 202 parent_->sendCreateChildGroup(child_id_str) ; 203 } 204 CTimer::get("XIOS").suspend() ; 189 205 } 190 206 … … 193 209 { 194 210 std::string child_id_str; 195 if (cstr2string(child_id, child_id_size, child_id_str)) 196 { 197 *child_ = parent_->createChildGroup(child_id_str).get() ; 198 parent_->sendCreateChildGroup(child_id_str) ; 199 } 200 else 201 { 202 *child_ = parent_->createChildGroup().get() ; 203 parent_->sendCreateChildGroup(child_id_str) ; 204 } 211 CTimer::get("XIOS").resume() ; 212 if (cstr2string(child_id, child_id_size, child_id_str)) 213 { 214 *child_ = parent_->createChildGroup(child_id_str) ; 215 parent_->sendCreateChildGroup(child_id_str) ; 216 } 217 else 218 { 219 *child_ = parent_->createChildGroup() ; 220 parent_->sendCreateChildGroup(child_id_str) ; 221 } 222 CTimer::get("XIOS").suspend() ; 205 223 } 206 224 … … 209 227 { 210 228 std::string child_id_str; 211 if (cstr2string(child_id, child_id_size, child_id_str)) 212 { 213 *child_ = parent_->createChildGroup(child_id_str).get() ; 214 parent_->sendCreateChildGroup(child_id_str) ; 215 } 216 else 217 { 218 *child_ = parent_->createChildGroup().get() ; 219 parent_->sendCreateChildGroup(child_id_str) ; 220 } 229 CTimer::get("XIOS").resume() ; 230 if (cstr2string(child_id, child_id_size, child_id_str)) 231 { 232 *child_ = parent_->createChildGroup(child_id_str) ; 233 parent_->sendCreateChildGroup(child_id_str) ; 234 } 235 else 236 { 237 *child_ = parent_->createChildGroup() ; 238 parent_->sendCreateChildGroup(child_id_str) ; 239 } 240 CTimer::get("XIOS").suspend() ; 221 241 } 222 242 … … 225 245 { 226 246 std::string child_id_str; 227 228 if (cstr2string(child_id, child_id_size, child_id_str)) 229 { 230 *child_ = parent_->addFieldGroup(child_id_str) .get();247 CTimer::get("XIOS").resume() ; 248 if (cstr2string(child_id, child_id_size, child_id_str)) 249 { 250 *child_ = parent_->addFieldGroup(child_id_str); 231 251 parent_->sendAddFieldGroup(child_id_str) ; 232 252 } 233 253 else 234 254 { 235 *child_ = parent_->addFieldGroup() .get();255 *child_ = parent_->addFieldGroup(); 236 256 parent_->sendAddFieldGroup() ; 237 257 } 258 CTimer::get("XIOS").suspend() ; 238 259 } 239 260 -
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string long_name_str; 20 21 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 axis_hdl->long_name.setValue(long_name_str); 22 24 axis_hdl->sendAttributToServer(axis_hdl->long_name); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(axis_hdl->long_name.getValue(),long_name , long_name_size)) 28 32 ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 34 39 std::string name_str; 35 40 if(!cstr2string(name, name_size, name_str)) return; 41 CTimer::get("XIOS").resume(); 36 42 axis_hdl->name.setValue(name_str); 37 43 axis_hdl->sendAttributToServer(axis_hdl->name); 44 CTimer::get("XIOS").suspend(); 38 45 } 39 46 40 47 void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size) 41 48 { 49 CTimer::get("XIOS").resume(); 42 50 if(!string_copy(axis_hdl->name.getValue(),name , name_size)) 43 51 ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short"); 52 CTimer::get("XIOS").suspend(); 44 53 } 45 54 … … 47 56 void cxios_set_axis_size(axis_Ptr axis_hdl, int size) 48 57 { 58 CTimer::get("XIOS").resume(); 49 59 axis_hdl->size.setValue(size); 50 60 axis_hdl->sendAttributToServer(axis_hdl->size); 61 CTimer::get("XIOS").suspend(); 51 62 } 52 63 … … 61 72 std::string standard_name_str; 62 73 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 74 CTimer::get("XIOS").resume(); 63 75 axis_hdl->standard_name.setValue(standard_name_str); 64 76 axis_hdl->sendAttributToServer(axis_hdl->standard_name); 77 CTimer::get("XIOS").suspend(); 65 78 } 66 79 67 80 void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size) 68 81 { 82 CTimer::get("XIOS").resume(); 69 83 if(!string_copy(axis_hdl->standard_name.getValue(),standard_name , standard_name_size)) 70 84 ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 85 CTimer::get("XIOS").suspend(); 71 86 } 72 87 … … 76 91 std::string unit_str; 77 92 if(!cstr2string(unit, unit_size, unit_str)) return; 93 CTimer::get("XIOS").resume(); 78 94 axis_hdl->unit.setValue(unit_str); 79 95 axis_hdl->sendAttributToServer(axis_hdl->unit); 96 CTimer::get("XIOS").suspend(); 80 97 } 81 98 82 99 void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size) 83 100 { 101 CTimer::get("XIOS").resume(); 84 102 if(!string_copy(axis_hdl->unit.getValue(),unit , unit_size)) 85 103 ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", <<"Input string is to short"); 104 CTimer::get("XIOS").suspend(); 86 105 } 87 106 … … 89 108 void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1) 90 109 { 110 CTimer::get("XIOS").resume(); 91 111 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 92 112 std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); … … 99 119 if (!array_copy(axis_hdl->value.getValue(), value, extent1)) 100 120 ERROR("void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute") ; 121 CTimer::get("XIOS").suspend(); 101 122 } 102 123 -
XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string group_ref_str; 20 21 if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 axisgroup_hdl->group_ref.setValue(group_ref_str); 22 24 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->group_ref); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(axisgroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 28 32 ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 34 39 std::string long_name_str; 35 40 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 41 CTimer::get("XIOS").resume(); 36 42 axisgroup_hdl->long_name.setValue(long_name_str); 37 43 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->long_name); 44 CTimer::get("XIOS").suspend(); 38 45 } 39 46 40 47 void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size) 41 48 { 49 CTimer::get("XIOS").resume(); 42 50 if(!string_copy(axisgroup_hdl->long_name.getValue(),long_name , long_name_size)) 43 51 ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 52 CTimer::get("XIOS").suspend(); 44 53 } 45 54 … … 49 58 std::string name_str; 50 59 if(!cstr2string(name, name_size, name_str)) return; 60 CTimer::get("XIOS").resume(); 51 61 axisgroup_hdl->name.setValue(name_str); 52 62 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->name); 63 CTimer::get("XIOS").suspend(); 53 64 } 54 65 55 66 void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size) 56 67 { 68 CTimer::get("XIOS").resume(); 57 69 if(!string_copy(axisgroup_hdl->name.getValue(),name , name_size)) 58 70 ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", <<"Input string is to short"); 71 CTimer::get("XIOS").suspend(); 59 72 } 60 73 … … 62 75 void cxios_set_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int size) 63 76 { 77 CTimer::get("XIOS").resume(); 64 78 axisgroup_hdl->size.setValue(size); 65 79 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->size); 80 CTimer::get("XIOS").suspend(); 66 81 } 67 82 … … 76 91 std::string standard_name_str; 77 92 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 93 CTimer::get("XIOS").resume(); 78 94 axisgroup_hdl->standard_name.setValue(standard_name_str); 79 95 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->standard_name); 96 CTimer::get("XIOS").suspend(); 80 97 } 81 98 82 99 void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size) 83 100 { 101 CTimer::get("XIOS").resume(); 84 102 if(!string_copy(axisgroup_hdl->standard_name.getValue(),standard_name , standard_name_size)) 85 103 ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 104 CTimer::get("XIOS").suspend(); 86 105 } 87 106 … … 91 110 std::string unit_str; 92 111 if(!cstr2string(unit, unit_size, unit_str)) return; 112 CTimer::get("XIOS").resume(); 93 113 axisgroup_hdl->unit.setValue(unit_str); 94 114 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->unit); 115 CTimer::get("XIOS").suspend(); 95 116 } 96 117 97 118 void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size) 98 119 { 120 CTimer::get("XIOS").resume(); 99 121 if(!string_copy(axisgroup_hdl->unit.getValue(),unit , unit_size)) 100 122 ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", <<"Input string is to short"); 123 CTimer::get("XIOS").suspend(); 101 124 } 102 125 … … 104 127 void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1) 105 128 { 129 CTimer::get("XIOS").resume(); 106 130 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 107 131 std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); … … 114 138 if (!array_copy(axisgroup_hdl->value.getValue(), value, extent1)) 115 139 ERROR("void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute") ; 140 CTimer::get("XIOS").suspend(); 116 141 } 117 142 -
XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string calendar_type_str; 20 21 if(!cstr2string(calendar_type, calendar_type_size, calendar_type_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 context_hdl->calendar_type.setValue(calendar_type_str); 22 24 context_hdl->sendAttributToServer(context_hdl->calendar_type); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(context_hdl->calendar_type.getValue(),calendar_type , calendar_type_size)) 28 32 ERROR("void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 34 39 std::string output_dir_str; 35 40 if(!cstr2string(output_dir, output_dir_size, output_dir_str)) return; 41 CTimer::get("XIOS").resume(); 36 42 context_hdl->output_dir.setValue(output_dir_str); 37 43 context_hdl->sendAttributToServer(context_hdl->output_dir); 44 CTimer::get("XIOS").suspend(); 38 45 } 39 46 40 47 void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size) 41 48 { 49 CTimer::get("XIOS").resume(); 42 50 if(!string_copy(context_hdl->output_dir.getValue(),output_dir , output_dir_size)) 43 51 ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", <<"Input string is to short"); 52 CTimer::get("XIOS").suspend(); 44 53 } 45 54 … … 49 58 std::string start_date_str; 50 59 if(!cstr2string(start_date, start_date_size, start_date_str)) return; 60 CTimer::get("XIOS").resume(); 51 61 context_hdl->start_date.setValue(start_date_str); 52 62 context_hdl->sendAttributToServer(context_hdl->start_date); 63 CTimer::get("XIOS").suspend(); 53 64 } 54 65 55 66 void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size) 56 67 { 68 CTimer::get("XIOS").resume(); 57 69 if(!string_copy(context_hdl->start_date.getValue(),start_date , start_date_size)) 58 70 ERROR("void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)", <<"Input string is to short"); 71 CTimer::get("XIOS").suspend(); 59 72 } 60 73 … … 64 77 std::string time_origin_str; 65 78 if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return; 79 CTimer::get("XIOS").resume(); 66 80 context_hdl->time_origin.setValue(time_origin_str); 67 81 context_hdl->sendAttributToServer(context_hdl->time_origin); 82 CTimer::get("XIOS").suspend(); 68 83 } 69 84 70 85 void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size) 71 86 { 87 CTimer::get("XIOS").resume(); 72 88 if(!string_copy(context_hdl->time_origin.getValue(),time_origin , time_origin_size)) 73 89 ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short"); 90 CTimer::get("XIOS").suspend(); 74 91 } 75 92 … … 79 96 std::string timestep_str; 80 97 if(!cstr2string(timestep, timestep_size, timestep_str)) return; 98 CTimer::get("XIOS").resume(); 81 99 context_hdl->timestep.setValue(timestep_str); 82 100 context_hdl->sendAttributToServer(context_hdl->timestep); 101 CTimer::get("XIOS").suspend(); 83 102 } 84 103 85 104 void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size) 86 105 { 106 CTimer::get("XIOS").resume(); 87 107 if(!string_copy(context_hdl->timestep.getValue(),timestep , timestep_size)) 88 108 ERROR("void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)", <<"Input string is to short"); 109 CTimer::get("XIOS").suspend(); 89 110 } 90 111 -
XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 17 18 void cxios_set_domain_data_dim(domain_Ptr domain_hdl, int data_dim) 18 19 { 20 CTimer::get("XIOS").resume(); 19 21 domain_hdl->data_dim.setValue(data_dim); 20 22 domain_hdl->sendAttributToServer(domain_hdl->data_dim); 23 CTimer::get("XIOS").suspend(); 21 24 } 22 25 … … 29 32 void cxios_set_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int extent1) 30 33 { 34 CTimer::get("XIOS").resume(); 31 35 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 32 36 std::copy(data_i_index, &(data_i_index[array_tmp->num_elements()]), array_tmp->data()); … … 39 43 if (!array_copy(domain_hdl->data_i_index.getValue(), data_i_index, extent1)) 40 44 ERROR("void cxios_set_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int extent1)",<<"Output array size is not conform to array size attribute") ; 45 CTimer::get("XIOS").suspend(); 41 46 } 42 47 … … 44 49 void cxios_set_domain_data_ibegin(domain_Ptr domain_hdl, int data_ibegin) 45 50 { 51 CTimer::get("XIOS").resume(); 46 52 domain_hdl->data_ibegin.setValue(data_ibegin); 47 53 domain_hdl->sendAttributToServer(domain_hdl->data_ibegin); 54 CTimer::get("XIOS").suspend(); 48 55 } 49 56 … … 56 63 void cxios_set_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int extent1) 57 64 { 65 CTimer::get("XIOS").resume(); 58 66 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 59 67 std::copy(data_j_index, &(data_j_index[array_tmp->num_elements()]), array_tmp->data()); … … 66 74 if (!array_copy(domain_hdl->data_j_index.getValue(), data_j_index, extent1)) 67 75 ERROR("void cxios_set_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int extent1)",<<"Output array size is not conform to array size attribute") ; 76 CTimer::get("XIOS").suspend(); 68 77 } 69 78 … … 71 80 void cxios_set_domain_data_jbegin(domain_Ptr domain_hdl, int data_jbegin) 72 81 { 82 CTimer::get("XIOS").resume(); 73 83 domain_hdl->data_jbegin.setValue(data_jbegin); 74 84 domain_hdl->sendAttributToServer(domain_hdl->data_jbegin); 85 CTimer::get("XIOS").suspend(); 75 86 } 76 87 … … 83 94 void cxios_set_domain_data_n_index(domain_Ptr domain_hdl, int data_n_index) 84 95 { 96 CTimer::get("XIOS").resume(); 85 97 domain_hdl->data_n_index.setValue(data_n_index); 86 98 domain_hdl->sendAttributToServer(domain_hdl->data_n_index); 99 CTimer::get("XIOS").suspend(); 87 100 } 88 101 … … 95 108 void cxios_set_domain_data_ni(domain_Ptr domain_hdl, int data_ni) 96 109 { 110 CTimer::get("XIOS").resume(); 97 111 domain_hdl->data_ni.setValue(data_ni); 98 112 domain_hdl->sendAttributToServer(domain_hdl->data_ni); 113 CTimer::get("XIOS").suspend(); 99 114 } 100 115 … … 107 122 void cxios_set_domain_data_nj(domain_Ptr domain_hdl, int data_nj) 108 123 { 124 CTimer::get("XIOS").resume(); 109 125 domain_hdl->data_nj.setValue(data_nj); 110 126 domain_hdl->sendAttributToServer(domain_hdl->data_nj); 127 CTimer::get("XIOS").suspend(); 111 128 } 112 129 … … 121 138 std::string domain_group_ref_str; 122 139 if(!cstr2string(domain_group_ref, domain_group_ref_size, domain_group_ref_str)) return; 140 CTimer::get("XIOS").resume(); 123 141 domain_hdl->domain_group_ref.setValue(domain_group_ref_str); 124 142 domain_hdl->sendAttributToServer(domain_hdl->domain_group_ref); 143 CTimer::get("XIOS").suspend(); 125 144 } 126 145 127 146 void cxios_get_domain_domain_group_ref(domain_Ptr domain_hdl, char * domain_group_ref, int domain_group_ref_size) 128 147 { 148 CTimer::get("XIOS").resume(); 129 149 if(!string_copy(domain_hdl->domain_group_ref.getValue(),domain_group_ref , domain_group_ref_size)) 130 150 ERROR("void cxios_get_domain_domain_group_ref(domain_Ptr domain_hdl, char * domain_group_ref, int domain_group_ref_size)", <<"Input string is to short"); 151 CTimer::get("XIOS").suspend(); 131 152 } 132 153 … … 134 155 void cxios_set_domain_ibegin(domain_Ptr domain_hdl, int ibegin) 135 156 { 157 CTimer::get("XIOS").resume(); 136 158 domain_hdl->ibegin.setValue(ibegin); 137 159 domain_hdl->sendAttributToServer(domain_hdl->ibegin); 160 CTimer::get("XIOS").suspend(); 138 161 } 139 162 … … 146 169 void cxios_set_domain_iend(domain_Ptr domain_hdl, int iend) 147 170 { 171 CTimer::get("XIOS").resume(); 148 172 domain_hdl->iend.setValue(iend); 149 173 domain_hdl->sendAttributToServer(domain_hdl->iend); 174 CTimer::get("XIOS").suspend(); 150 175 } 151 176 … … 158 183 void cxios_set_domain_jbegin(domain_Ptr domain_hdl, int jbegin) 159 184 { 185 CTimer::get("XIOS").resume(); 160 186 domain_hdl->jbegin.setValue(jbegin); 161 187 domain_hdl->sendAttributToServer(domain_hdl->jbegin); 188 CTimer::get("XIOS").suspend(); 162 189 } 163 190 … … 170 197 void cxios_set_domain_jend(domain_Ptr domain_hdl, int jend) 171 198 { 199 CTimer::get("XIOS").resume(); 172 200 domain_hdl->jend.setValue(jend); 173 201 domain_hdl->sendAttributToServer(domain_hdl->jend); 202 CTimer::get("XIOS").suspend(); 174 203 } 175 204 … … 182 211 void cxios_set_domain_latvalue(domain_Ptr domain_hdl, double* latvalue, int extent1) 183 212 { 213 CTimer::get("XIOS").resume(); 184 214 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 185 215 std::copy(latvalue, &(latvalue[array_tmp->num_elements()]), array_tmp->data()); … … 192 222 if (!array_copy(domain_hdl->latvalue.getValue(), latvalue, extent1)) 193 223 ERROR("void cxios_set_domain_latvalue(domain_Ptr domain_hdl, double* latvalue, int extent1)",<<"Output array size is not conform to array size attribute") ; 224 CTimer::get("XIOS").suspend(); 194 225 } 195 226 … … 199 230 std::string long_name_str; 200 231 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 232 CTimer::get("XIOS").resume(); 201 233 domain_hdl->long_name.setValue(long_name_str); 202 234 domain_hdl->sendAttributToServer(domain_hdl->long_name); 235 CTimer::get("XIOS").suspend(); 203 236 } 204 237 205 238 void cxios_get_domain_long_name(domain_Ptr domain_hdl, char * long_name, int long_name_size) 206 239 { 240 CTimer::get("XIOS").resume(); 207 241 if(!string_copy(domain_hdl->long_name.getValue(),long_name , long_name_size)) 208 242 ERROR("void cxios_get_domain_long_name(domain_Ptr domain_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 243 CTimer::get("XIOS").suspend(); 209 244 } 210 245 … … 212 247 void cxios_set_domain_lonvalue(domain_Ptr domain_hdl, double* lonvalue, int extent1) 213 248 { 249 CTimer::get("XIOS").resume(); 214 250 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 215 251 std::copy(lonvalue, &(lonvalue[array_tmp->num_elements()]), array_tmp->data()); … … 222 258 if (!array_copy(domain_hdl->lonvalue.getValue(), lonvalue, extent1)) 223 259 ERROR("void cxios_set_domain_lonvalue(domain_Ptr domain_hdl, double* lonvalue, int extent1)",<<"Output array size is not conform to array size attribute") ; 260 CTimer::get("XIOS").suspend(); 224 261 } 225 262 … … 227 264 void cxios_set_domain_mask(domain_Ptr domain_hdl, bool* mask, int extent1, int extent2) 228 265 { 266 CTimer::get("XIOS").resume(); 229 267 ARRAY(bool,2) array_tmp(new CArray<bool,2>(boost::extents[extent1][extent2])); 230 268 std::copy(mask, &(mask[array_tmp->num_elements()]), array_tmp->data()); … … 237 275 if (!array_copy(domain_hdl->mask.getValue(), mask, extent1, extent2)) 238 276 ERROR("void cxios_set_domain_mask(domain_Ptr domain_hdl, bool* mask, int extent1, int extent2)",<<"Output array size is not conform to array size attribute") ; 277 CTimer::get("XIOS").suspend(); 239 278 } 240 279 … … 244 283 std::string name_str; 245 284 if(!cstr2string(name, name_size, name_str)) return; 285 CTimer::get("XIOS").resume(); 246 286 domain_hdl->name.setValue(name_str); 247 287 domain_hdl->sendAttributToServer(domain_hdl->name); 288 CTimer::get("XIOS").suspend(); 248 289 } 249 290 250 291 void cxios_get_domain_name(domain_Ptr domain_hdl, char * name, int name_size) 251 292 { 293 CTimer::get("XIOS").resume(); 252 294 if(!string_copy(domain_hdl->name.getValue(),name , name_size)) 253 295 ERROR("void cxios_get_domain_name(domain_Ptr domain_hdl, char * name, int name_size)", <<"Input string is to short"); 296 CTimer::get("XIOS").suspend(); 254 297 } 255 298 … … 257 300 void cxios_set_domain_ni(domain_Ptr domain_hdl, int ni) 258 301 { 302 CTimer::get("XIOS").resume(); 259 303 domain_hdl->ni.setValue(ni); 260 304 domain_hdl->sendAttributToServer(domain_hdl->ni); 305 CTimer::get("XIOS").suspend(); 261 306 } 262 307 … … 269 314 void cxios_set_domain_ni_glo(domain_Ptr domain_hdl, int ni_glo) 270 315 { 316 CTimer::get("XIOS").resume(); 271 317 domain_hdl->ni_glo.setValue(ni_glo); 272 318 domain_hdl->sendAttributToServer(domain_hdl->ni_glo); 319 CTimer::get("XIOS").suspend(); 273 320 } 274 321 … … 281 328 void cxios_set_domain_nj(domain_Ptr domain_hdl, int nj) 282 329 { 330 CTimer::get("XIOS").resume(); 283 331 domain_hdl->nj.setValue(nj); 284 332 domain_hdl->sendAttributToServer(domain_hdl->nj); 333 CTimer::get("XIOS").suspend(); 285 334 } 286 335 … … 293 342 void cxios_set_domain_nj_glo(domain_Ptr domain_hdl, int nj_glo) 294 343 { 344 CTimer::get("XIOS").resume(); 295 345 domain_hdl->nj_glo.setValue(nj_glo); 296 346 domain_hdl->sendAttributToServer(domain_hdl->nj_glo); 347 CTimer::get("XIOS").suspend(); 297 348 } 298 349 … … 307 358 std::string standard_name_str; 308 359 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 360 CTimer::get("XIOS").resume(); 309 361 domain_hdl->standard_name.setValue(standard_name_str); 310 362 domain_hdl->sendAttributToServer(domain_hdl->standard_name); 363 CTimer::get("XIOS").suspend(); 311 364 } 312 365 313 366 void cxios_get_domain_standard_name(domain_Ptr domain_hdl, char * standard_name, int standard_name_size) 314 367 { 368 CTimer::get("XIOS").resume(); 315 369 if(!string_copy(domain_hdl->standard_name.getValue(),standard_name , standard_name_size)) 316 370 ERROR("void cxios_get_domain_standard_name(domain_Ptr domain_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 371 CTimer::get("XIOS").suspend(); 317 372 } 318 373 … … 320 375 void cxios_set_domain_zoom_ibegin(domain_Ptr domain_hdl, int zoom_ibegin) 321 376 { 377 CTimer::get("XIOS").resume(); 322 378 domain_hdl->zoom_ibegin.setValue(zoom_ibegin); 323 379 domain_hdl->sendAttributToServer(domain_hdl->zoom_ibegin); 380 CTimer::get("XIOS").suspend(); 324 381 } 325 382 … … 332 389 void cxios_set_domain_zoom_ibegin_loc(domain_Ptr domain_hdl, int zoom_ibegin_loc) 333 390 { 391 CTimer::get("XIOS").resume(); 334 392 domain_hdl->zoom_ibegin_loc.setValue(zoom_ibegin_loc); 335 393 domain_hdl->sendAttributToServer(domain_hdl->zoom_ibegin_loc); 394 CTimer::get("XIOS").suspend(); 336 395 } 337 396 … … 344 403 void cxios_set_domain_zoom_jbegin(domain_Ptr domain_hdl, int zoom_jbegin) 345 404 { 405 CTimer::get("XIOS").resume(); 346 406 domain_hdl->zoom_jbegin.setValue(zoom_jbegin); 347 407 domain_hdl->sendAttributToServer(domain_hdl->zoom_jbegin); 408 CTimer::get("XIOS").suspend(); 348 409 } 349 410 … … 356 417 void cxios_set_domain_zoom_jbegin_loc(domain_Ptr domain_hdl, int zoom_jbegin_loc) 357 418 { 419 CTimer::get("XIOS").resume(); 358 420 domain_hdl->zoom_jbegin_loc.setValue(zoom_jbegin_loc); 359 421 domain_hdl->sendAttributToServer(domain_hdl->zoom_jbegin_loc); 422 CTimer::get("XIOS").suspend(); 360 423 } 361 424 … … 368 431 void cxios_set_domain_zoom_ni(domain_Ptr domain_hdl, int zoom_ni) 369 432 { 433 CTimer::get("XIOS").resume(); 370 434 domain_hdl->zoom_ni.setValue(zoom_ni); 371 435 domain_hdl->sendAttributToServer(domain_hdl->zoom_ni); 436 CTimer::get("XIOS").suspend(); 372 437 } 373 438 … … 380 445 void cxios_set_domain_zoom_ni_loc(domain_Ptr domain_hdl, int zoom_ni_loc) 381 446 { 447 CTimer::get("XIOS").resume(); 382 448 domain_hdl->zoom_ni_loc.setValue(zoom_ni_loc); 383 449 domain_hdl->sendAttributToServer(domain_hdl->zoom_ni_loc); 450 CTimer::get("XIOS").suspend(); 384 451 } 385 452 … … 392 459 void cxios_set_domain_zoom_nj(domain_Ptr domain_hdl, int zoom_nj) 393 460 { 461 CTimer::get("XIOS").resume(); 394 462 domain_hdl->zoom_nj.setValue(zoom_nj); 395 463 domain_hdl->sendAttributToServer(domain_hdl->zoom_nj); 464 CTimer::get("XIOS").suspend(); 396 465 } 397 466 … … 404 473 void cxios_set_domain_zoom_nj_loc(domain_Ptr domain_hdl, int zoom_nj_loc) 405 474 { 475 CTimer::get("XIOS").resume(); 406 476 domain_hdl->zoom_nj_loc.setValue(zoom_nj_loc); 407 477 domain_hdl->sendAttributToServer(domain_hdl->zoom_nj_loc); 478 CTimer::get("XIOS").suspend(); 408 479 } 409 480 -
XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 17 18 void cxios_set_domaingroup_data_dim(domaingroup_Ptr domaingroup_hdl, int data_dim) 18 19 { 20 CTimer::get("XIOS").resume(); 19 21 domaingroup_hdl->data_dim.setValue(data_dim); 20 22 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_dim); 23 CTimer::get("XIOS").suspend(); 21 24 } 22 25 … … 29 32 void cxios_set_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int extent1) 30 33 { 34 CTimer::get("XIOS").resume(); 31 35 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 32 36 std::copy(data_i_index, &(data_i_index[array_tmp->num_elements()]), array_tmp->data()); … … 39 43 if (!array_copy(domaingroup_hdl->data_i_index.getValue(), data_i_index, extent1)) 40 44 ERROR("void cxios_set_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int extent1)",<<"Output array size is not conform to array size attribute") ; 45 CTimer::get("XIOS").suspend(); 41 46 } 42 47 … … 44 49 void cxios_set_domaingroup_data_ibegin(domaingroup_Ptr domaingroup_hdl, int data_ibegin) 45 50 { 51 CTimer::get("XIOS").resume(); 46 52 domaingroup_hdl->data_ibegin.setValue(data_ibegin); 47 53 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_ibegin); 54 CTimer::get("XIOS").suspend(); 48 55 } 49 56 … … 56 63 void cxios_set_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int extent1) 57 64 { 65 CTimer::get("XIOS").resume(); 58 66 ARRAY(int,1) array_tmp(new CArray<int,1>(boost::extents[extent1])); 59 67 std::copy(data_j_index, &(data_j_index[array_tmp->num_elements()]), array_tmp->data()); … … 66 74 if (!array_copy(domaingroup_hdl->data_j_index.getValue(), data_j_index, extent1)) 67 75 ERROR("void cxios_set_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int extent1)",<<"Output array size is not conform to array size attribute") ; 76 CTimer::get("XIOS").suspend(); 68 77 } 69 78 … … 71 80 void cxios_set_domaingroup_data_jbegin(domaingroup_Ptr domaingroup_hdl, int data_jbegin) 72 81 { 82 CTimer::get("XIOS").resume(); 73 83 domaingroup_hdl->data_jbegin.setValue(data_jbegin); 74 84 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_jbegin); 85 CTimer::get("XIOS").suspend(); 75 86 } 76 87 … … 83 94 void cxios_set_domaingroup_data_n_index(domaingroup_Ptr domaingroup_hdl, int data_n_index) 84 95 { 96 CTimer::get("XIOS").resume(); 85 97 domaingroup_hdl->data_n_index.setValue(data_n_index); 86 98 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_n_index); 99 CTimer::get("XIOS").suspend(); 87 100 } 88 101 … … 95 108 void cxios_set_domaingroup_data_ni(domaingroup_Ptr domaingroup_hdl, int data_ni) 96 109 { 110 CTimer::get("XIOS").resume(); 97 111 domaingroup_hdl->data_ni.setValue(data_ni); 98 112 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_ni); 113 CTimer::get("XIOS").suspend(); 99 114 } 100 115 … … 107 122 void cxios_set_domaingroup_data_nj(domaingroup_Ptr domaingroup_hdl, int data_nj) 108 123 { 124 CTimer::get("XIOS").resume(); 109 125 domaingroup_hdl->data_nj.setValue(data_nj); 110 126 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->data_nj); 127 CTimer::get("XIOS").suspend(); 111 128 } 112 129 … … 121 138 std::string domain_group_ref_str; 122 139 if(!cstr2string(domain_group_ref, domain_group_ref_size, domain_group_ref_str)) return; 140 CTimer::get("XIOS").resume(); 123 141 domaingroup_hdl->domain_group_ref.setValue(domain_group_ref_str); 124 142 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->domain_group_ref); 143 CTimer::get("XIOS").suspend(); 125 144 } 126 145 127 146 void cxios_get_domaingroup_domain_group_ref(domaingroup_Ptr domaingroup_hdl, char * domain_group_ref, int domain_group_ref_size) 128 147 { 148 CTimer::get("XIOS").resume(); 129 149 if(!string_copy(domaingroup_hdl->domain_group_ref.getValue(),domain_group_ref , domain_group_ref_size)) 130 150 ERROR("void cxios_get_domaingroup_domain_group_ref(domaingroup_Ptr domaingroup_hdl, char * domain_group_ref, int domain_group_ref_size)", <<"Input string is to short"); 151 CTimer::get("XIOS").suspend(); 131 152 } 132 153 … … 136 157 std::string group_ref_str; 137 158 if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return; 159 CTimer::get("XIOS").resume(); 138 160 domaingroup_hdl->group_ref.setValue(group_ref_str); 139 161 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->group_ref); 162 CTimer::get("XIOS").suspend(); 140 163 } 141 164 142 165 void cxios_get_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl, char * group_ref, int group_ref_size) 143 166 { 167 CTimer::get("XIOS").resume(); 144 168 if(!string_copy(domaingroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 145 169 ERROR("void cxios_get_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 170 CTimer::get("XIOS").suspend(); 146 171 } 147 172 … … 149 174 void cxios_set_domaingroup_ibegin(domaingroup_Ptr domaingroup_hdl, int ibegin) 150 175 { 176 CTimer::get("XIOS").resume(); 151 177 domaingroup_hdl->ibegin.setValue(ibegin); 152 178 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->ibegin); 179 CTimer::get("XIOS").suspend(); 153 180 } 154 181 … … 161 188 void cxios_set_domaingroup_iend(domaingroup_Ptr domaingroup_hdl, int iend) 162 189 { 190 CTimer::get("XIOS").resume(); 163 191 domaingroup_hdl->iend.setValue(iend); 164 192 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->iend); 193 CTimer::get("XIOS").suspend(); 165 194 } 166 195 … … 173 202 void cxios_set_domaingroup_jbegin(domaingroup_Ptr domaingroup_hdl, int jbegin) 174 203 { 204 CTimer::get("XIOS").resume(); 175 205 domaingroup_hdl->jbegin.setValue(jbegin); 176 206 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->jbegin); 207 CTimer::get("XIOS").suspend(); 177 208 } 178 209 … … 185 216 void cxios_set_domaingroup_jend(domaingroup_Ptr domaingroup_hdl, int jend) 186 217 { 218 CTimer::get("XIOS").resume(); 187 219 domaingroup_hdl->jend.setValue(jend); 188 220 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->jend); 221 CTimer::get("XIOS").suspend(); 189 222 } 190 223 … … 197 230 void cxios_set_domaingroup_latvalue(domaingroup_Ptr domaingroup_hdl, double* latvalue, int extent1) 198 231 { 232 CTimer::get("XIOS").resume(); 199 233 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 200 234 std::copy(latvalue, &(latvalue[array_tmp->num_elements()]), array_tmp->data()); … … 207 241 if (!array_copy(domaingroup_hdl->latvalue.getValue(), latvalue, extent1)) 208 242 ERROR("void cxios_set_domaingroup_latvalue(domaingroup_Ptr domaingroup_hdl, double* latvalue, int extent1)",<<"Output array size is not conform to array size attribute") ; 243 CTimer::get("XIOS").suspend(); 209 244 } 210 245 … … 214 249 std::string long_name_str; 215 250 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 251 CTimer::get("XIOS").resume(); 216 252 domaingroup_hdl->long_name.setValue(long_name_str); 217 253 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->long_name); 254 CTimer::get("XIOS").suspend(); 218 255 } 219 256 220 257 void cxios_get_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl, char * long_name, int long_name_size) 221 258 { 259 CTimer::get("XIOS").resume(); 222 260 if(!string_copy(domaingroup_hdl->long_name.getValue(),long_name , long_name_size)) 223 261 ERROR("void cxios_get_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 262 CTimer::get("XIOS").suspend(); 224 263 } 225 264 … … 227 266 void cxios_set_domaingroup_lonvalue(domaingroup_Ptr domaingroup_hdl, double* lonvalue, int extent1) 228 267 { 268 CTimer::get("XIOS").resume(); 229 269 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 230 270 std::copy(lonvalue, &(lonvalue[array_tmp->num_elements()]), array_tmp->data()); … … 237 277 if (!array_copy(domaingroup_hdl->lonvalue.getValue(), lonvalue, extent1)) 238 278 ERROR("void cxios_set_domaingroup_lonvalue(domaingroup_Ptr domaingroup_hdl, double* lonvalue, int extent1)",<<"Output array size is not conform to array size attribute") ; 279 CTimer::get("XIOS").suspend(); 239 280 } 240 281 … … 242 283 void cxios_set_domaingroup_mask(domaingroup_Ptr domaingroup_hdl, bool* mask, int extent1, int extent2) 243 284 { 285 CTimer::get("XIOS").resume(); 244 286 ARRAY(bool,2) array_tmp(new CArray<bool,2>(boost::extents[extent1][extent2])); 245 287 std::copy(mask, &(mask[array_tmp->num_elements()]), array_tmp->data()); … … 252 294 if (!array_copy(domaingroup_hdl->mask.getValue(), mask, extent1, extent2)) 253 295 ERROR("void cxios_set_domaingroup_mask(domaingroup_Ptr domaingroup_hdl, bool* mask, int extent1, int extent2)",<<"Output array size is not conform to array size attribute") ; 296 CTimer::get("XIOS").suspend(); 254 297 } 255 298 … … 259 302 std::string name_str; 260 303 if(!cstr2string(name, name_size, name_str)) return; 304 CTimer::get("XIOS").resume(); 261 305 domaingroup_hdl->name.setValue(name_str); 262 306 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->name); 307 CTimer::get("XIOS").suspend(); 263 308 } 264 309 265 310 void cxios_get_domaingroup_name(domaingroup_Ptr domaingroup_hdl, char * name, int name_size) 266 311 { 312 CTimer::get("XIOS").resume(); 267 313 if(!string_copy(domaingroup_hdl->name.getValue(),name , name_size)) 268 314 ERROR("void cxios_get_domaingroup_name(domaingroup_Ptr domaingroup_hdl, char * name, int name_size)", <<"Input string is to short"); 315 CTimer::get("XIOS").suspend(); 269 316 } 270 317 … … 272 319 void cxios_set_domaingroup_ni(domaingroup_Ptr domaingroup_hdl, int ni) 273 320 { 321 CTimer::get("XIOS").resume(); 274 322 domaingroup_hdl->ni.setValue(ni); 275 323 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->ni); 324 CTimer::get("XIOS").suspend(); 276 325 } 277 326 … … 284 333 void cxios_set_domaingroup_ni_glo(domaingroup_Ptr domaingroup_hdl, int ni_glo) 285 334 { 335 CTimer::get("XIOS").resume(); 286 336 domaingroup_hdl->ni_glo.setValue(ni_glo); 287 337 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->ni_glo); 338 CTimer::get("XIOS").suspend(); 288 339 } 289 340 … … 296 347 void cxios_set_domaingroup_nj(domaingroup_Ptr domaingroup_hdl, int nj) 297 348 { 349 CTimer::get("XIOS").resume(); 298 350 domaingroup_hdl->nj.setValue(nj); 299 351 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->nj); 352 CTimer::get("XIOS").suspend(); 300 353 } 301 354 … … 308 361 void cxios_set_domaingroup_nj_glo(domaingroup_Ptr domaingroup_hdl, int nj_glo) 309 362 { 363 CTimer::get("XIOS").resume(); 310 364 domaingroup_hdl->nj_glo.setValue(nj_glo); 311 365 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->nj_glo); 366 CTimer::get("XIOS").suspend(); 312 367 } 313 368 … … 322 377 std::string standard_name_str; 323 378 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 379 CTimer::get("XIOS").resume(); 324 380 domaingroup_hdl->standard_name.setValue(standard_name_str); 325 381 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->standard_name); 382 CTimer::get("XIOS").suspend(); 326 383 } 327 384 328 385 void cxios_get_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, char * standard_name, int standard_name_size) 329 386 { 387 CTimer::get("XIOS").resume(); 330 388 if(!string_copy(domaingroup_hdl->standard_name.getValue(),standard_name , standard_name_size)) 331 389 ERROR("void cxios_get_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 390 CTimer::get("XIOS").suspend(); 332 391 } 333 392 … … 335 394 void cxios_set_domaingroup_zoom_ibegin(domaingroup_Ptr domaingroup_hdl, int zoom_ibegin) 336 395 { 396 CTimer::get("XIOS").resume(); 337 397 domaingroup_hdl->zoom_ibegin.setValue(zoom_ibegin); 338 398 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_ibegin); 399 CTimer::get("XIOS").suspend(); 339 400 } 340 401 … … 347 408 void cxios_set_domaingroup_zoom_ibegin_loc(domaingroup_Ptr domaingroup_hdl, int zoom_ibegin_loc) 348 409 { 410 CTimer::get("XIOS").resume(); 349 411 domaingroup_hdl->zoom_ibegin_loc.setValue(zoom_ibegin_loc); 350 412 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_ibegin_loc); 413 CTimer::get("XIOS").suspend(); 351 414 } 352 415 … … 359 422 void cxios_set_domaingroup_zoom_jbegin(domaingroup_Ptr domaingroup_hdl, int zoom_jbegin) 360 423 { 424 CTimer::get("XIOS").resume(); 361 425 domaingroup_hdl->zoom_jbegin.setValue(zoom_jbegin); 362 426 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_jbegin); 427 CTimer::get("XIOS").suspend(); 363 428 } 364 429 … … 371 436 void cxios_set_domaingroup_zoom_jbegin_loc(domaingroup_Ptr domaingroup_hdl, int zoom_jbegin_loc) 372 437 { 438 CTimer::get("XIOS").resume(); 373 439 domaingroup_hdl->zoom_jbegin_loc.setValue(zoom_jbegin_loc); 374 440 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_jbegin_loc); 441 CTimer::get("XIOS").suspend(); 375 442 } 376 443 … … 383 450 void cxios_set_domaingroup_zoom_ni(domaingroup_Ptr domaingroup_hdl, int zoom_ni) 384 451 { 452 CTimer::get("XIOS").resume(); 385 453 domaingroup_hdl->zoom_ni.setValue(zoom_ni); 386 454 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_ni); 455 CTimer::get("XIOS").suspend(); 387 456 } 388 457 … … 395 464 void cxios_set_domaingroup_zoom_ni_loc(domaingroup_Ptr domaingroup_hdl, int zoom_ni_loc) 396 465 { 466 CTimer::get("XIOS").resume(); 397 467 domaingroup_hdl->zoom_ni_loc.setValue(zoom_ni_loc); 398 468 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_ni_loc); 469 CTimer::get("XIOS").suspend(); 399 470 } 400 471 … … 407 478 void cxios_set_domaingroup_zoom_nj(domaingroup_Ptr domaingroup_hdl, int zoom_nj) 408 479 { 480 CTimer::get("XIOS").resume(); 409 481 domaingroup_hdl->zoom_nj.setValue(zoom_nj); 410 482 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_nj); 483 CTimer::get("XIOS").suspend(); 411 484 } 412 485 … … 419 492 void cxios_set_domaingroup_zoom_nj_loc(domaingroup_Ptr domaingroup_hdl, int zoom_nj_loc) 420 493 { 494 CTimer::get("XIOS").resume(); 421 495 domaingroup_hdl->zoom_nj_loc.setValue(zoom_nj_loc); 422 496 domaingroup_hdl->sendAttributToServer(domaingroup_hdl->zoom_nj_loc); 497 CTimer::get("XIOS").suspend(); 423 498 } 424 499 -
XIOS/trunk/src/interface/c_attr/icfield_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string axis_ref_str; 20 21 if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 field_hdl->axis_ref.setValue(axis_ref_str); 22 24 field_hdl->sendAttributToServer(field_hdl->axis_ref); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(field_hdl->axis_ref.getValue(),axis_ref , axis_ref_size)) 28 32 ERROR("void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 32 37 void cxios_set_field_default_value(field_Ptr field_hdl, double default_value) 33 38 { 39 CTimer::get("XIOS").resume(); 34 40 field_hdl->default_value.setValue(default_value); 35 41 field_hdl->sendAttributToServer(field_hdl->default_value); 42 CTimer::get("XIOS").suspend(); 36 43 } 37 44 … … 46 53 std::string domain_ref_str; 47 54 if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 55 CTimer::get("XIOS").resume(); 48 56 field_hdl->domain_ref.setValue(domain_ref_str); 49 57 field_hdl->sendAttributToServer(field_hdl->domain_ref); 58 CTimer::get("XIOS").suspend(); 50 59 } 51 60 52 61 void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size) 53 62 { 63 CTimer::get("XIOS").resume(); 54 64 if(!string_copy(field_hdl->domain_ref.getValue(),domain_ref , domain_ref_size)) 55 65 ERROR("void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); 66 CTimer::get("XIOS").suspend(); 56 67 } 57 68 … … 59 70 void cxios_set_field_enabled(field_Ptr field_hdl, bool enabled) 60 71 { 72 CTimer::get("XIOS").resume(); 61 73 field_hdl->enabled.setValue(enabled); 62 74 field_hdl->sendAttributToServer(field_hdl->enabled); 75 CTimer::get("XIOS").suspend(); 63 76 } 64 77 … … 73 86 std::string field_ref_str; 74 87 if(!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 88 CTimer::get("XIOS").resume(); 75 89 field_hdl->field_ref.setValue(field_ref_str); 76 90 field_hdl->sendAttributToServer(field_hdl->field_ref); 91 CTimer::get("XIOS").suspend(); 77 92 } 78 93 79 94 void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size) 80 95 { 96 CTimer::get("XIOS").resume(); 81 97 if(!string_copy(field_hdl->field_ref.getValue(),field_ref , field_ref_size)) 82 98 ERROR("void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size)", <<"Input string is to short"); 99 CTimer::get("XIOS").suspend(); 83 100 } 84 101 … … 88 105 std::string freq_offset_str; 89 106 if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return; 107 CTimer::get("XIOS").resume(); 90 108 field_hdl->freq_offset.setValue(freq_offset_str); 91 109 field_hdl->sendAttributToServer(field_hdl->freq_offset); 110 CTimer::get("XIOS").suspend(); 92 111 } 93 112 94 113 void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size) 95 114 { 115 CTimer::get("XIOS").resume(); 96 116 if(!string_copy(field_hdl->freq_offset.getValue(),freq_offset , freq_offset_size)) 97 117 ERROR("void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short"); 118 CTimer::get("XIOS").suspend(); 98 119 } 99 120 … … 103 124 std::string freq_op_str; 104 125 if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 126 CTimer::get("XIOS").resume(); 105 127 field_hdl->freq_op.setValue(freq_op_str); 106 128 field_hdl->sendAttributToServer(field_hdl->freq_op); 129 CTimer::get("XIOS").suspend(); 107 130 } 108 131 109 132 void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size) 110 133 { 134 CTimer::get("XIOS").resume(); 111 135 if(!string_copy(field_hdl->freq_op.getValue(),freq_op , freq_op_size)) 112 136 ERROR("void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short"); 137 CTimer::get("XIOS").suspend(); 113 138 } 114 139 … … 118 143 std::string grid_ref_str; 119 144 if(!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 145 CTimer::get("XIOS").resume(); 120 146 field_hdl->grid_ref.setValue(grid_ref_str); 121 147 field_hdl->sendAttributToServer(field_hdl->grid_ref); 148 CTimer::get("XIOS").suspend(); 122 149 } 123 150 124 151 void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size) 125 152 { 153 CTimer::get("XIOS").resume(); 126 154 if(!string_copy(field_hdl->grid_ref.getValue(),grid_ref , grid_ref_size)) 127 155 ERROR("void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size)", <<"Input string is to short"); 156 CTimer::get("XIOS").suspend(); 128 157 } 129 158 … … 131 160 void cxios_set_field_level(field_Ptr field_hdl, int level) 132 161 { 162 CTimer::get("XIOS").resume(); 133 163 field_hdl->level.setValue(level); 134 164 field_hdl->sendAttributToServer(field_hdl->level); 165 CTimer::get("XIOS").suspend(); 135 166 } 136 167 … … 145 176 std::string long_name_str; 146 177 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 178 CTimer::get("XIOS").resume(); 147 179 field_hdl->long_name.setValue(long_name_str); 148 180 field_hdl->sendAttributToServer(field_hdl->long_name); 181 CTimer::get("XIOS").suspend(); 149 182 } 150 183 151 184 void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size) 152 185 { 186 CTimer::get("XIOS").resume(); 153 187 if(!string_copy(field_hdl->long_name.getValue(),long_name , long_name_size)) 154 188 ERROR("void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 189 CTimer::get("XIOS").suspend(); 155 190 } 156 191 … … 160 195 std::string name_str; 161 196 if(!cstr2string(name, name_size, name_str)) return; 197 CTimer::get("XIOS").resume(); 162 198 field_hdl->name.setValue(name_str); 163 199 field_hdl->sendAttributToServer(field_hdl->name); 200 CTimer::get("XIOS").suspend(); 164 201 } 165 202 166 203 void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size) 167 204 { 205 CTimer::get("XIOS").resume(); 168 206 if(!string_copy(field_hdl->name.getValue(),name , name_size)) 169 207 ERROR("void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size)", <<"Input string is to short"); 208 CTimer::get("XIOS").suspend(); 170 209 } 171 210 … … 175 214 std::string operation_str; 176 215 if(!cstr2string(operation, operation_size, operation_str)) return; 216 CTimer::get("XIOS").resume(); 177 217 field_hdl->operation.setValue(operation_str); 178 218 field_hdl->sendAttributToServer(field_hdl->operation); 219 CTimer::get("XIOS").suspend(); 179 220 } 180 221 181 222 void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size) 182 223 { 224 CTimer::get("XIOS").resume(); 183 225 if(!string_copy(field_hdl->operation.getValue(),operation , operation_size)) 184 226 ERROR("void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size)", <<"Input string is to short"); 227 CTimer::get("XIOS").suspend(); 185 228 } 186 229 … … 188 231 void cxios_set_field_prec(field_Ptr field_hdl, int prec) 189 232 { 233 CTimer::get("XIOS").resume(); 190 234 field_hdl->prec.setValue(prec); 191 235 field_hdl->sendAttributToServer(field_hdl->prec); 236 CTimer::get("XIOS").suspend(); 192 237 } 193 238 … … 202 247 std::string standard_name_str; 203 248 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 249 CTimer::get("XIOS").resume(); 204 250 field_hdl->standard_name.setValue(standard_name_str); 205 251 field_hdl->sendAttributToServer(field_hdl->standard_name); 252 CTimer::get("XIOS").suspend(); 206 253 } 207 254 208 255 void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size) 209 256 { 257 CTimer::get("XIOS").resume(); 210 258 if(!string_copy(field_hdl->standard_name.getValue(),standard_name , standard_name_size)) 211 259 ERROR("void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 260 CTimer::get("XIOS").suspend(); 212 261 } 213 262 … … 217 266 std::string unit_str; 218 267 if(!cstr2string(unit, unit_size, unit_str)) return; 268 CTimer::get("XIOS").resume(); 219 269 field_hdl->unit.setValue(unit_str); 220 270 field_hdl->sendAttributToServer(field_hdl->unit); 271 CTimer::get("XIOS").suspend(); 221 272 } 222 273 223 274 void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size) 224 275 { 276 CTimer::get("XIOS").resume(); 225 277 if(!string_copy(field_hdl->unit.getValue(),unit , unit_size)) 226 278 ERROR("void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size)", <<"Input string is to short"); 279 CTimer::get("XIOS").suspend(); 227 280 } 228 281 -
XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string axis_ref_str; 20 21 if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 fieldgroup_hdl->axis_ref.setValue(axis_ref_str); 22 24 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->axis_ref); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(fieldgroup_hdl->axis_ref.getValue(),axis_ref , axis_ref_size)) 28 32 ERROR("void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 32 37 void cxios_set_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double default_value) 33 38 { 39 CTimer::get("XIOS").resume(); 34 40 fieldgroup_hdl->default_value.setValue(default_value); 35 41 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->default_value); 42 CTimer::get("XIOS").suspend(); 36 43 } 37 44 … … 46 53 std::string domain_ref_str; 47 54 if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 55 CTimer::get("XIOS").resume(); 48 56 fieldgroup_hdl->domain_ref.setValue(domain_ref_str); 49 57 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->domain_ref); 58 CTimer::get("XIOS").suspend(); 50 59 } 51 60 52 61 void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size) 53 62 { 63 CTimer::get("XIOS").resume(); 54 64 if(!string_copy(fieldgroup_hdl->domain_ref.getValue(),domain_ref , domain_ref_size)) 55 65 ERROR("void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); 66 CTimer::get("XIOS").suspend(); 56 67 } 57 68 … … 59 70 void cxios_set_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool enabled) 60 71 { 72 CTimer::get("XIOS").resume(); 61 73 fieldgroup_hdl->enabled.setValue(enabled); 62 74 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->enabled); 75 CTimer::get("XIOS").suspend(); 63 76 } 64 77 … … 73 86 std::string field_ref_str; 74 87 if(!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 88 CTimer::get("XIOS").resume(); 75 89 fieldgroup_hdl->field_ref.setValue(field_ref_str); 76 90 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->field_ref); 91 CTimer::get("XIOS").suspend(); 77 92 } 78 93 79 94 void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size) 80 95 { 96 CTimer::get("XIOS").resume(); 81 97 if(!string_copy(fieldgroup_hdl->field_ref.getValue(),field_ref , field_ref_size)) 82 98 ERROR("void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)", <<"Input string is to short"); 99 CTimer::get("XIOS").suspend(); 83 100 } 84 101 … … 88 105 std::string freq_offset_str; 89 106 if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return; 107 CTimer::get("XIOS").resume(); 90 108 fieldgroup_hdl->freq_offset.setValue(freq_offset_str); 91 109 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->freq_offset); 110 CTimer::get("XIOS").suspend(); 92 111 } 93 112 94 113 void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size) 95 114 { 115 CTimer::get("XIOS").resume(); 96 116 if(!string_copy(fieldgroup_hdl->freq_offset.getValue(),freq_offset , freq_offset_size)) 97 117 ERROR("void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short"); 118 CTimer::get("XIOS").suspend(); 98 119 } 99 120 … … 103 124 std::string freq_op_str; 104 125 if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 126 CTimer::get("XIOS").resume(); 105 127 fieldgroup_hdl->freq_op.setValue(freq_op_str); 106 128 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->freq_op); 129 CTimer::get("XIOS").suspend(); 107 130 } 108 131 109 132 void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size) 110 133 { 134 CTimer::get("XIOS").resume(); 111 135 if(!string_copy(fieldgroup_hdl->freq_op.getValue(),freq_op , freq_op_size)) 112 136 ERROR("void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short"); 137 CTimer::get("XIOS").suspend(); 113 138 } 114 139 … … 118 143 std::string grid_ref_str; 119 144 if(!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 145 CTimer::get("XIOS").resume(); 120 146 fieldgroup_hdl->grid_ref.setValue(grid_ref_str); 121 147 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->grid_ref); 148 CTimer::get("XIOS").suspend(); 122 149 } 123 150 124 151 void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size) 125 152 { 153 CTimer::get("XIOS").resume(); 126 154 if(!string_copy(fieldgroup_hdl->grid_ref.getValue(),grid_ref , grid_ref_size)) 127 155 ERROR("void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)", <<"Input string is to short"); 156 CTimer::get("XIOS").suspend(); 128 157 } 129 158 … … 133 162 std::string group_ref_str; 134 163 if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return; 164 CTimer::get("XIOS").resume(); 135 165 fieldgroup_hdl->group_ref.setValue(group_ref_str); 136 166 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->group_ref); 167 CTimer::get("XIOS").suspend(); 137 168 } 138 169 139 170 void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size) 140 171 { 172 CTimer::get("XIOS").resume(); 141 173 if(!string_copy(fieldgroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 142 174 ERROR("void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 175 CTimer::get("XIOS").suspend(); 143 176 } 144 177 … … 146 179 void cxios_set_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int level) 147 180 { 181 CTimer::get("XIOS").resume(); 148 182 fieldgroup_hdl->level.setValue(level); 149 183 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->level); 184 CTimer::get("XIOS").suspend(); 150 185 } 151 186 … … 160 195 std::string long_name_str; 161 196 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 197 CTimer::get("XIOS").resume(); 162 198 fieldgroup_hdl->long_name.setValue(long_name_str); 163 199 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->long_name); 200 CTimer::get("XIOS").suspend(); 164 201 } 165 202 166 203 void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size) 167 204 { 205 CTimer::get("XIOS").resume(); 168 206 if(!string_copy(fieldgroup_hdl->long_name.getValue(),long_name , long_name_size)) 169 207 ERROR("void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 208 CTimer::get("XIOS").suspend(); 170 209 } 171 210 … … 175 214 std::string name_str; 176 215 if(!cstr2string(name, name_size, name_str)) return; 216 CTimer::get("XIOS").resume(); 177 217 fieldgroup_hdl->name.setValue(name_str); 178 218 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->name); 219 CTimer::get("XIOS").suspend(); 179 220 } 180 221 181 222 void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size) 182 223 { 224 CTimer::get("XIOS").resume(); 183 225 if(!string_copy(fieldgroup_hdl->name.getValue(),name , name_size)) 184 226 ERROR("void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)", <<"Input string is to short"); 227 CTimer::get("XIOS").suspend(); 185 228 } 186 229 … … 190 233 std::string operation_str; 191 234 if(!cstr2string(operation, operation_size, operation_str)) return; 235 CTimer::get("XIOS").resume(); 192 236 fieldgroup_hdl->operation.setValue(operation_str); 193 237 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->operation); 238 CTimer::get("XIOS").suspend(); 194 239 } 195 240 196 241 void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size) 197 242 { 243 CTimer::get("XIOS").resume(); 198 244 if(!string_copy(fieldgroup_hdl->operation.getValue(),operation , operation_size)) 199 245 ERROR("void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)", <<"Input string is to short"); 246 CTimer::get("XIOS").suspend(); 200 247 } 201 248 … … 203 250 void cxios_set_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int prec) 204 251 { 252 CTimer::get("XIOS").resume(); 205 253 fieldgroup_hdl->prec.setValue(prec); 206 254 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->prec); 255 CTimer::get("XIOS").suspend(); 207 256 } 208 257 … … 217 266 std::string standard_name_str; 218 267 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 268 CTimer::get("XIOS").resume(); 219 269 fieldgroup_hdl->standard_name.setValue(standard_name_str); 220 270 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->standard_name); 271 CTimer::get("XIOS").suspend(); 221 272 } 222 273 223 274 void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size) 224 275 { 276 CTimer::get("XIOS").resume(); 225 277 if(!string_copy(fieldgroup_hdl->standard_name.getValue(),standard_name , standard_name_size)) 226 278 ERROR("void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 279 CTimer::get("XIOS").suspend(); 227 280 } 228 281 … … 232 285 std::string unit_str; 233 286 if(!cstr2string(unit, unit_size, unit_str)) return; 287 CTimer::get("XIOS").resume(); 234 288 fieldgroup_hdl->unit.setValue(unit_str); 235 289 fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->unit); 290 CTimer::get("XIOS").suspend(); 236 291 } 237 292 238 293 void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size) 239 294 { 295 CTimer::get("XIOS").resume(); 240 296 if(!string_copy(fieldgroup_hdl->unit.getValue(),unit , unit_size)) 241 297 ERROR("void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)", <<"Input string is to short"); 298 CTimer::get("XIOS").suspend(); 242 299 } 243 300 -
XIOS/trunk/src/interface/c_attr/icfile_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string description_str; 20 21 if(!cstr2string(description, description_size, description_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 file_hdl->description.setValue(description_str); 22 24 file_hdl->sendAttributToServer(file_hdl->description); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(file_hdl->description.getValue(),description , description_size)) 28 32 ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 32 37 void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled) 33 38 { 39 CTimer::get("XIOS").resume(); 34 40 file_hdl->enabled.setValue(enabled); 35 41 file_hdl->sendAttributToServer(file_hdl->enabled); 42 CTimer::get("XIOS").suspend(); 36 43 } 37 44 … … 46 53 std::string name_str; 47 54 if(!cstr2string(name, name_size, name_str)) return; 55 CTimer::get("XIOS").resume(); 48 56 file_hdl->name.setValue(name_str); 49 57 file_hdl->sendAttributToServer(file_hdl->name); 58 CTimer::get("XIOS").suspend(); 50 59 } 51 60 52 61 void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size) 53 62 { 63 CTimer::get("XIOS").resume(); 54 64 if(!string_copy(file_hdl->name.getValue(),name , name_size)) 55 65 ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short"); 66 CTimer::get("XIOS").suspend(); 56 67 } 57 68 … … 61 72 std::string name_suffix_str; 62 73 if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return; 74 CTimer::get("XIOS").resume(); 63 75 file_hdl->name_suffix.setValue(name_suffix_str); 64 76 file_hdl->sendAttributToServer(file_hdl->name_suffix); 77 CTimer::get("XIOS").suspend(); 65 78 } 66 79 67 80 void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size) 68 81 { 82 CTimer::get("XIOS").resume(); 69 83 if(!string_copy(file_hdl->name_suffix.getValue(),name_suffix , name_suffix_size)) 70 84 ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short"); 85 CTimer::get("XIOS").suspend(); 71 86 } 72 87 … … 76 91 std::string output_freq_str; 77 92 if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return; 93 CTimer::get("XIOS").resume(); 78 94 file_hdl->output_freq.setValue(output_freq_str); 79 95 file_hdl->sendAttributToServer(file_hdl->output_freq); 96 CTimer::get("XIOS").suspend(); 80 97 } 81 98 82 99 void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size) 83 100 { 101 CTimer::get("XIOS").resume(); 84 102 if(!string_copy(file_hdl->output_freq.getValue(),output_freq , output_freq_size)) 85 103 ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short"); 104 CTimer::get("XIOS").suspend(); 86 105 } 87 106 … … 89 108 void cxios_set_file_output_level(file_Ptr file_hdl, int output_level) 90 109 { 110 CTimer::get("XIOS").resume(); 91 111 file_hdl->output_level.setValue(output_level); 92 112 file_hdl->sendAttributToServer(file_hdl->output_level); 113 CTimer::get("XIOS").suspend(); 93 114 } 94 115 … … 103 124 std::string par_access_str; 104 125 if(!cstr2string(par_access, par_access_size, par_access_str)) return; 126 CTimer::get("XIOS").resume(); 105 127 file_hdl->par_access.setValue(par_access_str); 106 128 file_hdl->sendAttributToServer(file_hdl->par_access); 129 CTimer::get("XIOS").suspend(); 107 130 } 108 131 109 132 void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size) 110 133 { 134 CTimer::get("XIOS").resume(); 111 135 if(!string_copy(file_hdl->par_access.getValue(),par_access , par_access_size)) 112 136 ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 137 CTimer::get("XIOS").suspend(); 113 138 } 114 139 … … 118 143 std::string split_freq_str; 119 144 if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return; 145 CTimer::get("XIOS").resume(); 120 146 file_hdl->split_freq.setValue(split_freq_str); 121 147 file_hdl->sendAttributToServer(file_hdl->split_freq); 148 CTimer::get("XIOS").suspend(); 122 149 } 123 150 124 151 void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size) 125 152 { 153 CTimer::get("XIOS").resume(); 126 154 if(!string_copy(file_hdl->split_freq.getValue(),split_freq , split_freq_size)) 127 155 ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short"); 156 CTimer::get("XIOS").suspend(); 128 157 } 129 158 … … 133 162 std::string sync_freq_str; 134 163 if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return; 164 CTimer::get("XIOS").resume(); 135 165 file_hdl->sync_freq.setValue(sync_freq_str); 136 166 file_hdl->sendAttributToServer(file_hdl->sync_freq); 167 CTimer::get("XIOS").suspend(); 137 168 } 138 169 139 170 void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size) 140 171 { 172 CTimer::get("XIOS").resume(); 141 173 if(!string_copy(file_hdl->sync_freq.getValue(),sync_freq , sync_freq_size)) 142 174 ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short"); 175 CTimer::get("XIOS").suspend(); 143 176 } 144 177 … … 148 181 std::string type_str; 149 182 if(!cstr2string(type, type_size, type_str)) return; 183 CTimer::get("XIOS").resume(); 150 184 file_hdl->type.setValue(type_str); 151 185 file_hdl->sendAttributToServer(file_hdl->type); 186 CTimer::get("XIOS").suspend(); 152 187 } 153 188 154 189 void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size) 155 190 { 191 CTimer::get("XIOS").resume(); 156 192 if(!string_copy(file_hdl->type.getValue(),type , type_size)) 157 193 ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short"); 194 CTimer::get("XIOS").suspend(); 158 195 } 159 196 -
XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string description_str; 20 21 if(!cstr2string(description, description_size, description_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 filegroup_hdl->description.setValue(description_str); 22 24 filegroup_hdl->sendAttributToServer(filegroup_hdl->description); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(filegroup_hdl->description.getValue(),description , description_size)) 28 32 ERROR("void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 32 37 void cxios_set_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool enabled) 33 38 { 39 CTimer::get("XIOS").resume(); 34 40 filegroup_hdl->enabled.setValue(enabled); 35 41 filegroup_hdl->sendAttributToServer(filegroup_hdl->enabled); 42 CTimer::get("XIOS").suspend(); 36 43 } 37 44 … … 46 53 std::string group_ref_str; 47 54 if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return; 55 CTimer::get("XIOS").resume(); 48 56 filegroup_hdl->group_ref.setValue(group_ref_str); 49 57 filegroup_hdl->sendAttributToServer(filegroup_hdl->group_ref); 58 CTimer::get("XIOS").suspend(); 50 59 } 51 60 52 61 void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size) 53 62 { 63 CTimer::get("XIOS").resume(); 54 64 if(!string_copy(filegroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 55 65 ERROR("void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 66 CTimer::get("XIOS").suspend(); 56 67 } 57 68 … … 61 72 std::string name_str; 62 73 if(!cstr2string(name, name_size, name_str)) return; 74 CTimer::get("XIOS").resume(); 63 75 filegroup_hdl->name.setValue(name_str); 64 76 filegroup_hdl->sendAttributToServer(filegroup_hdl->name); 77 CTimer::get("XIOS").suspend(); 65 78 } 66 79 67 80 void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size) 68 81 { 82 CTimer::get("XIOS").resume(); 69 83 if(!string_copy(filegroup_hdl->name.getValue(),name , name_size)) 70 84 ERROR("void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)", <<"Input string is to short"); 85 CTimer::get("XIOS").suspend(); 71 86 } 72 87 … … 76 91 std::string name_suffix_str; 77 92 if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return; 93 CTimer::get("XIOS").resume(); 78 94 filegroup_hdl->name_suffix.setValue(name_suffix_str); 79 95 filegroup_hdl->sendAttributToServer(filegroup_hdl->name_suffix); 96 CTimer::get("XIOS").suspend(); 80 97 } 81 98 82 99 void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size) 83 100 { 101 CTimer::get("XIOS").resume(); 84 102 if(!string_copy(filegroup_hdl->name_suffix.getValue(),name_suffix , name_suffix_size)) 85 103 ERROR("void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short"); 104 CTimer::get("XIOS").suspend(); 86 105 } 87 106 … … 91 110 std::string output_freq_str; 92 111 if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return; 112 CTimer::get("XIOS").resume(); 93 113 filegroup_hdl->output_freq.setValue(output_freq_str); 94 114 filegroup_hdl->sendAttributToServer(filegroup_hdl->output_freq); 115 CTimer::get("XIOS").suspend(); 95 116 } 96 117 97 118 void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size) 98 119 { 120 CTimer::get("XIOS").resume(); 99 121 if(!string_copy(filegroup_hdl->output_freq.getValue(),output_freq , output_freq_size)) 100 122 ERROR("void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short"); 123 CTimer::get("XIOS").suspend(); 101 124 } 102 125 … … 104 127 void cxios_set_filegroup_output_level(filegroup_Ptr filegroup_hdl, int output_level) 105 128 { 129 CTimer::get("XIOS").resume(); 106 130 filegroup_hdl->output_level.setValue(output_level); 107 131 filegroup_hdl->sendAttributToServer(filegroup_hdl->output_level); 132 CTimer::get("XIOS").suspend(); 108 133 } 109 134 … … 118 143 std::string par_access_str; 119 144 if(!cstr2string(par_access, par_access_size, par_access_str)) return; 145 CTimer::get("XIOS").resume(); 120 146 filegroup_hdl->par_access.setValue(par_access_str); 121 147 filegroup_hdl->sendAttributToServer(filegroup_hdl->par_access); 148 CTimer::get("XIOS").suspend(); 122 149 } 123 150 124 151 void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size) 125 152 { 153 CTimer::get("XIOS").resume(); 126 154 if(!string_copy(filegroup_hdl->par_access.getValue(),par_access , par_access_size)) 127 155 ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", <<"Input string is to short"); 156 CTimer::get("XIOS").suspend(); 128 157 } 129 158 … … 133 162 std::string split_freq_str; 134 163 if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return; 164 CTimer::get("XIOS").resume(); 135 165 filegroup_hdl->split_freq.setValue(split_freq_str); 136 166 filegroup_hdl->sendAttributToServer(filegroup_hdl->split_freq); 167 CTimer::get("XIOS").suspend(); 137 168 } 138 169 139 170 void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size) 140 171 { 172 CTimer::get("XIOS").resume(); 141 173 if(!string_copy(filegroup_hdl->split_freq.getValue(),split_freq , split_freq_size)) 142 174 ERROR("void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short"); 175 CTimer::get("XIOS").suspend(); 143 176 } 144 177 … … 148 181 std::string sync_freq_str; 149 182 if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return; 183 CTimer::get("XIOS").resume(); 150 184 filegroup_hdl->sync_freq.setValue(sync_freq_str); 151 185 filegroup_hdl->sendAttributToServer(filegroup_hdl->sync_freq); 186 CTimer::get("XIOS").suspend(); 152 187 } 153 188 154 189 void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size) 155 190 { 191 CTimer::get("XIOS").resume(); 156 192 if(!string_copy(filegroup_hdl->sync_freq.getValue(),sync_freq , sync_freq_size)) 157 193 ERROR("void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short"); 194 CTimer::get("XIOS").suspend(); 158 195 } 159 196 … … 163 200 std::string type_str; 164 201 if(!cstr2string(type, type_size, type_str)) return; 202 CTimer::get("XIOS").resume(); 165 203 filegroup_hdl->type.setValue(type_str); 166 204 filegroup_hdl->sendAttributToServer(filegroup_hdl->type); 205 CTimer::get("XIOS").suspend(); 167 206 } 168 207 169 208 void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size) 170 209 { 210 CTimer::get("XIOS").resume(); 171 211 if(!string_copy(filegroup_hdl->type.getValue(),type , type_size)) 172 212 ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", <<"Input string is to short"); 213 CTimer::get("XIOS").suspend(); 173 214 } 174 215 -
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string axis_ref_str; 20 21 if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 grid_hdl->axis_ref.setValue(axis_ref_str); 22 24 grid_hdl->sendAttributToServer(grid_hdl->axis_ref); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(grid_hdl->axis_ref.getValue(),axis_ref , axis_ref_size)) 28 32 ERROR("void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 34 39 std::string description_str; 35 40 if(!cstr2string(description, description_size, description_str)) return; 41 CTimer::get("XIOS").resume(); 36 42 grid_hdl->description.setValue(description_str); 37 43 grid_hdl->sendAttributToServer(grid_hdl->description); 44 CTimer::get("XIOS").suspend(); 38 45 } 39 46 40 47 void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size) 41 48 { 49 CTimer::get("XIOS").resume(); 42 50 if(!string_copy(grid_hdl->description.getValue(),description , description_size)) 43 51 ERROR("void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)", <<"Input string is to short"); 52 CTimer::get("XIOS").suspend(); 44 53 } 45 54 … … 49 58 std::string domain_ref_str; 50 59 if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 60 CTimer::get("XIOS").resume(); 51 61 grid_hdl->domain_ref.setValue(domain_ref_str); 52 62 grid_hdl->sendAttributToServer(grid_hdl->domain_ref); 63 CTimer::get("XIOS").suspend(); 53 64 } 54 65 55 66 void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size) 56 67 { 68 CTimer::get("XIOS").resume(); 57 69 if(!string_copy(grid_hdl->domain_ref.getValue(),domain_ref , domain_ref_size)) 58 70 ERROR("void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); 71 CTimer::get("XIOS").suspend(); 59 72 } 60 73 … … 64 77 std::string name_str; 65 78 if(!cstr2string(name, name_size, name_str)) return; 79 CTimer::get("XIOS").resume(); 66 80 grid_hdl->name.setValue(name_str); 67 81 grid_hdl->sendAttributToServer(grid_hdl->name); 82 CTimer::get("XIOS").suspend(); 68 83 } 69 84 70 85 void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size) 71 86 { 87 CTimer::get("XIOS").resume(); 72 88 if(!string_copy(grid_hdl->name.getValue(),name , name_size)) 73 89 ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", <<"Input string is to short"); 90 CTimer::get("XIOS").suspend(); 74 91 } 75 92 -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string axis_ref_str; 20 21 if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 gridgroup_hdl->axis_ref.setValue(axis_ref_str); 22 24 gridgroup_hdl->sendAttributToServer(gridgroup_hdl->axis_ref); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(gridgroup_hdl->axis_ref.getValue(),axis_ref , axis_ref_size)) 28 32 ERROR("void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 34 39 std::string description_str; 35 40 if(!cstr2string(description, description_size, description_str)) return; 41 CTimer::get("XIOS").resume(); 36 42 gridgroup_hdl->description.setValue(description_str); 37 43 gridgroup_hdl->sendAttributToServer(gridgroup_hdl->description); 44 CTimer::get("XIOS").suspend(); 38 45 } 39 46 40 47 void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size) 41 48 { 49 CTimer::get("XIOS").resume(); 42 50 if(!string_copy(gridgroup_hdl->description.getValue(),description , description_size)) 43 51 ERROR("void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)", <<"Input string is to short"); 52 CTimer::get("XIOS").suspend(); 44 53 } 45 54 … … 49 58 std::string domain_ref_str; 50 59 if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 60 CTimer::get("XIOS").resume(); 51 61 gridgroup_hdl->domain_ref.setValue(domain_ref_str); 52 62 gridgroup_hdl->sendAttributToServer(gridgroup_hdl->domain_ref); 63 CTimer::get("XIOS").suspend(); 53 64 } 54 65 55 66 void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size) 56 67 { 68 CTimer::get("XIOS").resume(); 57 69 if(!string_copy(gridgroup_hdl->domain_ref.getValue(),domain_ref , domain_ref_size)) 58 70 ERROR("void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); 71 CTimer::get("XIOS").suspend(); 59 72 } 60 73 … … 64 77 std::string group_ref_str; 65 78 if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return; 79 CTimer::get("XIOS").resume(); 66 80 gridgroup_hdl->group_ref.setValue(group_ref_str); 67 81 gridgroup_hdl->sendAttributToServer(gridgroup_hdl->group_ref); 82 CTimer::get("XIOS").suspend(); 68 83 } 69 84 70 85 void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size) 71 86 { 87 CTimer::get("XIOS").resume(); 72 88 if(!string_copy(gridgroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) 73 89 ERROR("void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); 90 CTimer::get("XIOS").suspend(); 74 91 } 75 92 … … 79 96 std::string name_str; 80 97 if(!cstr2string(name, name_size, name_str)) return; 98 CTimer::get("XIOS").resume(); 81 99 gridgroup_hdl->name.setValue(name_str); 82 100 gridgroup_hdl->sendAttributToServer(gridgroup_hdl->name); 101 CTimer::get("XIOS").suspend(); 83 102 } 84 103 85 104 void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size) 86 105 { 106 CTimer::get("XIOS").resume(); 87 107 if(!string_copy(gridgroup_hdl->name.getValue(),name , name_size)) 88 108 ERROR("void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)", <<"Input string is to short"); 109 CTimer::get("XIOS").suspend(); 89 110 } 90 111 -
XIOS/trunk/src/log.cpp
r335 r347 3 3 namespace xios 4 4 { 5 CLog info ; 5 CLog info("info") ; 6 CLog report("report") ; 6 7 } -
XIOS/trunk/src/log.hpp
r335 r347 10 10 { 11 11 public : 12 CLog( void) : ostream(cout.rdbuf()),level(0) {}12 CLog(const string& name_) : ostream(cout.rdbuf()),level(0),name(name_) {} 13 13 CLog& operator()(int l) 14 14 { … … 16 16 { 17 17 rdbuf(cout.rdbuf()) ; 18 *this<<"-> info: " ;18 *this<<"-> "<<name<<" : " ; 19 19 } 20 20 else rdbuf(NULL) ; … … 28 28 private : 29 29 int level ; 30 string name ; 30 31 }; 31 32 32 33 extern CLog info; 34 extern CLog report; 33 35 } 34 36 #endif -
XIOS/trunk/src/node/context.cpp
r346 r347 1 1 #include "context.hpp" 2 #include "tree_manager.hpp"3 4 2 #include "attribute_template_impl.hpp" 5 3 #include "object_template_impl.hpp" … … 44 42 //---------------------------------------------------------------- 45 43 46 boost::shared_ptr<CContextGroup>CContext::getRoot(void)44 CContextGroup* CContext::getRoot(void) 47 45 { 48 46 if (root.get()==NULL) root=shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())) ; 49 return root ;47 return root.get(); 50 48 } 51 49 … … 155 153 { 156 154 StdString currentContextId = CContext::getCurrent() -> getId() ; 157 std::vector< boost::shared_ptr<CContext>> def_vector =155 std::vector<CContext*> def_vector = 158 156 CContext::getRoot()->getChildList(); 159 std::vector< boost::shared_ptr<CContext>>::iterator157 std::vector<CContext*>::iterator 160 158 it = def_vector.begin(), end = def_vector.end(); 161 159 … … 165 163 for (; it != end; it++) 166 164 { 167 boost::shared_ptr<CContext>context = *it;165 CContext* context = *it; 168 166 CContext::setCurrent(context->getId()); 169 167 out << *context << std::endl; … … 270 268 { 271 269 if (!this->hasId()) return; 272 std::vector<boost::shared_ptr<CField> >& allField273 274 std::vector< boost::shared_ptr<CField>>::iterator270 vector<CField*> allField = CField::getAll() ; 271 // = CObjectTemplate<CField>::GetAllVectobject(this->getId()); 272 std::vector<CField*>::iterator 275 273 it = allField.begin(), end = allField.end(); 276 274 277 275 for (; it != end; it++) 278 276 { 279 boost::shared_ptr<CField>field = *it;277 CField* field = *it; 280 278 field->solveRefInheritance(); 281 279 } … … 376 374 377 375 // Résolution des héritages par référence au niveau des fichiers. 378 const std::vector<boost::shared_ptr<CFile> > &allFiles=CFile::getAll() ;376 const vector<CFile*> allFiles=CFile::getAll() ; 379 377 380 378 for (unsigned int i = 0; i < allFiles.size(); i++) … … 384 382 void CContext::findEnabledFiles(void) 385 383 { 386 const std::vector< boost::shared_ptr<CFile> > &allFiles = CFile::getAll();384 const std::vector<CFile*> allFiles = CFile::getAll(); 387 385 388 386 for (unsigned int i = 0; i < allFiles.size(); i++) … … 398 396 void CContext::closeAllFile(void) 399 397 { 400 std::vector< boost::shared_ptr<CFile>>::const_iterator398 std::vector<CFile*>::const_iterator 401 399 it = this->enabledFiles.begin(), end = this->enabledFiles.end(); 402 400 … … 528 526 void CContext::createFileHeader(void ) 529 527 { 530 vector< shared_ptr<CFile>>::const_iterator it ;528 vector<CFile*>::const_iterator it ; 531 529 532 530 for (it=enabledFiles.begin(); it != enabledFiles.end(); it++) … … 536 534 } 537 535 538 shared_ptr<CContext>CContext::getCurrent(void)539 { 540 return CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()) ;536 CContext* CContext::getCurrent(void) 537 { 538 return CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()).get() ; 541 539 } 542 540 … … 547 545 } 548 546 549 boost::shared_ptr<CContext>CContext::create(const StdString& id)547 CContext* CContext::create(const StdString& id) 550 548 { 551 549 CContext::setCurrent(id) ; 552 550 553 551 bool hasctxt = CContext::has(id); 554 boost::shared_ptr<CContext> context = CObjectFactory::CreateObject<CContext>(id); 555 if (!hasctxt) CGroupFactory::AddChild(getRoot(), context); 552 CContext* context = CObjectFactory::CreateObject<CContext>(id).get(); 553 getRoot() ; 554 if (!hasctxt) CGroupFactory::AddChild(root, context->getShared()); 556 555 557 556 #define DECLARE_NODE(Name_, name_) \ -
XIOS/trunk/src/node/context.hpp
r346 r347 82 82 static ENodeType GetType(void); 83 83 84 static boost::shared_ptr<CContextGroup>GetContextGroup(void);84 static CContextGroup* GetContextGroup(void); 85 85 86 86 public : … … 127 127 static void recvCreateFileHeader(CEventServer& event) ; 128 128 void recvCreateFileHeader(CBufferIn& buffer) ; 129 static shared_ptr<CContext>getCurrent(void) ;130 static shared_ptr<CContextGroup>getRoot(void) ;129 static CContext* getCurrent(void) ; 130 static CContextGroup* getRoot(void) ; 131 131 static void setCurrent(const string& id) ; 132 static shared_ptr<CContext>create(const string& id = "") ;132 static CContext* create(const string& id = "") ; 133 133 134 134 public : … … 145 145 boost::shared_ptr<CCalendar> calendar; 146 146 147 std::vector< boost::shared_ptr<CFile>> enabledFiles;147 std::vector<CFile*> enabledFiles; 148 148 static shared_ptr<CContextGroup> root ; 149 149 -
XIOS/trunk/src/node/domain.cpp
r346 r347 5 5 #include "group_template_impl.hpp" 6 6 7 #include "tree_manager.hpp"8 7 #include "xmlioserver_spl.hpp" 9 8 #include "event_client.hpp" … … 635 634 { 636 635 if (this->isChecked) return; 637 shared_ptr<CContext>context=CContext::getCurrent() ;636 CContext* context=CContext::getCurrent() ; 638 637 639 638 this->checkGlobalDomain(); … … 696 695 int jend_srv ; 697 696 698 shared_ptr<CContext>context=CContext::getCurrent() ;697 CContext* context=CContext::getCurrent() ; 699 698 CContextClient* client=context->client ; 700 699 int nbServer=client->serverSize ; … … 738 737 jbegin_client=jbegin.getValue() ; jend_client=jend.getValue() ; nj_client=nj.getValue() ; 739 738 740 shared_ptr<CContext>context = CContext::getCurrent() ;739 CContext* context = CContext::getCurrent() ; 741 740 CContextClient* client=context->client ; 742 741 int nbServer=client->serverSize ; … … 847 846 void CDomain::sendLonLat(void) 848 847 { 849 shared_ptr<CContext>context = CContext::getCurrent() ;848 CContext* context = CContext::getCurrent() ; 850 849 CContextClient* client=context->client ; 851 850 // send lon lat for each connected server -
XIOS/trunk/src/node/field.cpp
r346 r347 36 36 CField::~CField(void) 37 37 { 38 this->grid.reset() ;39 this->file.reset() ;38 // this->grid.reset() ; 39 // this->file.reset() ; 40 40 this->foperation.reset() ; 41 41 this->data.reset() ; … … 94 94 void CField::sendUpdateData(void) 95 95 { 96 shared_ptr<CContext>context = CContext::getCurrent() ;96 CContext* context = CContext::getCurrent() ; 97 97 CContextClient* client=context->client ; 98 98 … … 150 150 } 151 151 152 shared_ptr<CContext>context = CContext::getCurrent() ;152 CContext* context = CContext::getCurrent() ; 153 153 const CDate & currDate = context->getCalendar()->getCurrentDate(); 154 154 const CDate opeDate = *last_operation_srv + freq_operation_srv; … … 192 192 //---------------------------------------------------------------- 193 193 194 void CField::setRelFile( const boost::shared_ptr<CFile>_file)194 void CField::setRelFile(CFile* _file) 195 195 { 196 196 this->file = _file; … … 205 205 //---------------------------------------------------------------- 206 206 207 boost::shared_ptr<CGrid>CField::getRelGrid(void) const207 CGrid* CField::getRelGrid(void) const 208 208 { 209 209 return (this->grid); … … 212 212 //---------------------------------------------------------------- 213 213 214 boost::shared_ptr<CFile>CField::getRelFile(void) const214 CFile* CField::getRelFile(void) const 215 215 { 216 216 return (this->file); … … 234 234 //---------------------------------------------------------------- 235 235 236 boost::shared_ptr<CField>CField::getDirectFieldReference(void) const236 CField* CField::getDirectFieldReference(void) const 237 237 { 238 238 if (this->field_ref.isEmpty()) … … 249 249 //---------------------------------------------------------------- 250 250 251 const boost::shared_ptr<CField>CField::getBaseFieldReference(void) const251 CField* CField::getBaseFieldReference(void) const 252 252 { 253 253 return (baseRefObject); … … 256 256 //---------------------------------------------------------------- 257 257 258 const std::vector< boost::shared_ptr<CField> >& CField::getAllReference(void) const258 const std::vector<CField*>& CField::getAllReference(void) const 259 259 { 260 260 return (refObject); … … 325 325 { 326 326 std::set<CField *> sset; 327 boost::shared_ptr<CField>refer_sptr;327 CField* refer_sptr; 328 328 CField * refer_ptr = this; 329 329 … … 333 333 { 334 334 refer_sptr = refer_ptr->getDirectFieldReference(); 335 refer_ptr = refer_sptr .get();335 refer_ptr = refer_sptr; 336 336 337 337 if(sset.end() != sset.find(refer_ptr)) … … 356 356 357 357 StdString id = this->getBaseFieldReference()->getId(); 358 boost::shared_ptr<CContext>context = CContext::getCurrent();358 CContext* context = CContext::getCurrent(); 359 359 360 360 if (operation.isEmpty() || freq_op.isEmpty() || this->file->output_freq.isEmpty()) … … 442 442 void CField::solveGridReference(void) 443 443 { 444 boost::shared_ptr<CDomain>domain;445 boost::shared_ptr<CAxis>axis;444 CDomain* domain; 445 CAxis* axis; 446 446 447 447 if (!domain_ref.isEmpty()) … … 486 486 if (!axis_ref.isEmpty()) 487 487 { 488 this->grid = CGrid:: CreateGrid(domain, axis) ;488 this->grid = CGrid::createGrid(domain, axis) ; 489 489 this->grid_ref.setValue(this->grid->getId()); 490 490 } 491 491 else 492 492 { 493 this->grid = CGrid:: CreateGrid(domain) ;493 this->grid = CGrid::createGrid(domain) ; 494 494 this->grid_ref.setValue(this->grid->getId()); 495 495 } … … 518 518 << " invalid group name !"); 519 519 520 boost::shared_ptr<CFieldGroup>group = CFieldGroup::get(gref);521 boost::shared_ptr<CFieldGroup>owner = CFieldGroup::get(boost::polymorphic_downcast<CFieldGroup*>(this));522 523 std::vector< boost::shared_ptr<CField>> allChildren = group->getAllChildren();524 std::vector< boost::shared_ptr<CField>>::iterator520 CFieldGroup* group = CFieldGroup::get(gref); 521 CFieldGroup* owner = CFieldGroup::get(boost::polymorphic_downcast<CFieldGroup*>(this)); 522 523 std::vector<CField*> allChildren = group->getAllChildren(); 524 std::vector<CField*>::iterator 525 525 it = allChildren.begin(), end = allChildren.end(); 526 526 527 527 for (; it != end; it++) 528 528 { 529 boost::shared_ptr<CField>child = *it;529 CField* child = *it; 530 530 if (child->hasId()) owner->createChild()->field_ref.setValue(child->getId()) ; 531 531 -
XIOS/trunk/src/node/field.hpp
r345 r347 61 61 62 62 /// Accesseurs /// 63 boost::shared_ptr<CField>getDirectFieldReference(void) const;64 const boost::shared_ptr<CField>getBaseFieldReference(void) const;65 const std::vector< boost::shared_ptr<CField>> & getAllReference(void) const;63 CField* getDirectFieldReference(void) const; 64 CField* getBaseFieldReference(void) const; 65 const std::vector<CField*> & getAllReference(void) const; 66 66 67 boost::shared_ptr<CGrid>getRelGrid(void) const ;68 boost::shared_ptr<CFile>getRelFile(void) const ;67 CGrid* getRelGrid(void) const ; 68 CFile* getRelFile(void) const ; 69 69 70 70 public : … … 85 85 86 86 /// Mutateur /// 87 void setRelFile( const boost::shared_ptr<CFile>_file);87 void setRelFile(CFile* _file); 88 88 void incrementNStep(void); 89 89 void resetNStep() ; … … 130 130 /// Propriétés privées /// 131 131 132 std::vector< boost::shared_ptr<CField>> refObject;133 boost::shared_ptr<CField>baseRefObject;134 boost::shared_ptr<CGrid>grid ;135 boost::shared_ptr<CFile>file;132 std::vector<CField*> refObject; 133 CField* baseRefObject; 134 CGrid* grid ; 135 CFile* file; 136 136 137 137 CDuration freq_operation, freq_write; -
XIOS/trunk/src/node/file.cpp
r346 r347 45 45 } 46 46 47 boost::shared_ptr<CFieldGroup>CFile::getVirtualFieldGroup(void) const47 CFieldGroup* CFile::getVirtualFieldGroup(void) const 48 48 { 49 49 return (this->vFieldGroup); 50 50 } 51 51 52 std::vector< boost::shared_ptr<CField>> CFile::getAllFields(void) const52 std::vector<CField*> CFile::getAllFields(void) const 53 53 { 54 54 return (this->vFieldGroup->getAllChildren()); … … 57 57 //---------------------------------------------------------------- 58 58 59 std::vector<boost::shared_ptr<CField> > CFile::getEnabledFields 60 (int default_outputlevel, int default_level, bool default_enabled) 59 std::vector<CField*> CFile::getEnabledFields(int default_outputlevel, 60 int default_level, 61 bool default_enabled) 61 62 { 62 63 if (!this->enabledFields.empty()) … … 65 66 const int _outputlevel = 66 67 (!output_level.isEmpty()) ? output_level.getValue() : default_outputlevel; 67 std::vector< boost::shared_ptr<CField>>::iterator it;68 std::vector<CField*>::iterator it; 68 69 this->enabledFields = this->getAllFields(); 69 70 70 std::vector< boost::shared_ptr<CField>> newEnabledFields;71 std::vector<CField*> newEnabledFields; 71 72 72 73 for ( it = this->enabledFields.begin() ; it != this->enabledFields.end(); it++ ) … … 112 113 //---------------------------------------------------------------- 113 114 114 void CFile::setVirtualFieldGroup( boost::shared_ptr<CFieldGroup>newVFieldGroup)115 void CFile::setVirtualFieldGroup(CFieldGroup* newVFieldGroup) 115 116 { 116 117 this->vFieldGroup = newVFieldGroup; … … 127 128 bool CFile::isSyncTime(void) 128 129 { 129 shared_ptr<CContext>context = CContext::getCurrent() ;130 CContext* context = CContext::getCurrent() ; 130 131 CDate& currentDate=context->calendar->getCurrentDate() ; 131 132 if (! sync_freq.isEmpty()) … … 142 143 void CFile::initFile(void) 143 144 { 144 shared_ptr<CContext>context = CContext::getCurrent() ;145 CContext* context = CContext::getCurrent() ; 145 146 CDate& currentDate=context->calendar->getCurrentDate() ; 146 147 … … 163 164 bool CFile::checkSync(void) 164 165 { 165 shared_ptr<CContext>context = CContext::getCurrent() ;166 CContext* context = CContext::getCurrent() ; 166 167 CDate& currentDate=context->calendar->getCurrentDate() ; 167 168 if (! sync_freq.isEmpty()) … … 180 181 bool CFile::checkSplit(void) 181 182 { 182 shared_ptr<CContext>context = CContext::getCurrent() ;183 CContext* context = CContext::getCurrent() ; 183 184 CDate& currentDate=context->calendar->getCurrentDate() ; 184 185 if (! split_freq.isEmpty()) … … 188 189 *lastSplit=currentDate-outputFreq ; 189 190 190 std::vector< boost::shared_ptr<CField>>::iterator it, end = this->enabledFields.end();191 std::vector<CField*>::iterator it, end = this->enabledFields.end(); 191 192 for (it = this->enabledFields.begin() ;it != end; it++) (*it)->resetNStep() ; 192 193 createHeader() ; … … 199 200 void CFile::createHeader(void) 200 201 { 201 shared_ptr<CContext>context = CContext::getCurrent() ;202 CContext* context = CContext::getCurrent() ; 202 203 CDate& currentDate=context->calendar->getCurrentDate() ; 203 204 204 std::vector< boost::shared_ptr<CField>>::iterator it, end = this->enabledFields.end();205 std::vector<CField*>::iterator it, end = this->enabledFields.end(); 205 206 206 207 AllDomainEmpty=true ; … … 208 209 for (it = this->enabledFields.begin() ;it != end; it++) 209 210 { 210 boost::shared_ptr<CField>field = *it;211 CField* field = *it; 211 212 AllDomainEmpty&=field->grid->domain->isEmpty() ; 212 setDomain.insert(field->grid->domain .get()) ;213 setDomain.insert(field->grid->domain) ; 213 214 } 214 215 nbDomain=setDomain.size() ; … … 260 261 for (it = this->enabledFields.begin() ;it != end; it++) 261 262 { 262 boost::shared_ptr<CField>field = *it;263 CField* field = *it; 263 264 this->data_out->writeFieldGrid(field); 264 265 } … … 266 267 for (it = this->enabledFields.begin() ;it != end; it++) 267 268 { 268 boost::shared_ptr<CField>field = *it;269 CField* field = *it; 269 270 this->data_out->writeField(field); 270 271 } … … 306 307 oss << " id=\"" << this->getId() << "\" "; 307 308 oss << SuperClassAttribute::toString() << ">" << std::endl; 308 if (this->getVirtualFieldGroup() .get()!= NULL)309 if (this->getVirtualFieldGroup() != NULL) 309 310 oss << *this->getVirtualFieldGroup() << std::endl; 310 311 oss << "</" << CFile::GetName() << " >"; … … 325 326 { 326 327 // Résolution des héritages par référence de chacun des champs contenus dans le fichier. 327 std::vector< boost::shared_ptr<CField>> allF = this->getAllFields();328 std::vector<CField*> allF = this->getAllFields(); 328 329 for (unsigned int i = 0; i < allF.size(); i++) 329 330 allF[i]->solveRefInheritance(); … … 351 352 { 352 353 ENodeType genum = CFileGroup::GetType(); 353 bool hasVFG = (this->getVirtualFieldGroup() .get()!= NULL);354 bool hasVFG = (this->getVirtualFieldGroup() != NULL); 354 355 SuperClass::toBinary(os); 355 356 … … 381 382 } 382 383 383 shared_ptr<CField>CFile::addField(const string& id)384 CField* CFile::addField(const string& id) 384 385 { 385 386 return vFieldGroup->createChild(id) ; 386 387 } 387 388 388 shared_ptr<CFieldGroup>CFile::addFieldGroup(const string& id)389 CFieldGroup* CFile::addFieldGroup(const string& id) 389 390 { 390 391 return vFieldGroup->createChildGroup(id) ; … … 394 395 void CFile::sendAddField(const string& id) 395 396 { 396 shared_ptr<CContext>context=CContext::getCurrent() ;397 CContext* context=CContext::getCurrent() ; 397 398 398 399 if (! context->hasServer ) … … 416 417 void CFile::sendAddFieldGroup(const string& id) 417 418 { 418 shared_ptr<CContext>context=CContext::getCurrent() ;419 CContext* context=CContext::getCurrent() ; 419 420 if (! context->hasServer ) 420 421 { -
XIOS/trunk/src/node/file.hpp
r345 r347 53 53 /// Accesseurs /// 54 54 boost::shared_ptr<CDataOutput> getDataOutput(void) const; 55 boost::shared_ptr<CFieldGroup>getVirtualFieldGroup(void) const;56 std::vector< boost::shared_ptr<CField>> getAllFields(void) const;55 CFieldGroup* getVirtualFieldGroup(void) const; 56 std::vector<CField*> getAllFields(void) const; 57 57 58 std::vector<boost::shared_ptr<CField> > 59 getEnabledFields(int default_outputlevel = 5, 60 int default_level = 1, 61 bool default_enabled = true); 58 std::vector<CField* > getEnabledFields(int default_outputlevel = 5, 59 int default_level = 1, 60 bool default_enabled = true); 62 61 63 62 public : 64 63 65 64 /// Mutateurs /// 66 void setVirtualFieldGroup( boost::shared_ptr<CFieldGroup>newVFieldGroup);65 void setVirtualFieldGroup(CFieldGroup* newVFieldGroup); 67 66 void setVirtualFieldGroup(void); 68 67 … … 93 92 94 93 bool AllDomainEmpty ; 95 shared_ptr<CField>addField(const string& id="") ;96 shared_ptr<CFieldGroup>addFieldGroup(const string& id="") ;94 CField* addField(const string& id="") ; 95 CFieldGroup* addFieldGroup(const string& id="") ; 97 96 void sendAddField(const string& id="") ; 98 97 void sendAddFieldGroup(const string& id="") ; … … 117 116 118 117 /// Propriétés privées /// 119 boost::shared_ptr<CFieldGroup>vFieldGroup;118 CFieldGroup* vFieldGroup; 120 119 boost::shared_ptr<CDataOutput> data_out; 121 std::vector< boost::shared_ptr<CField>> enabledFields;120 std::vector<CField*> enabledFields; 122 121 123 122 }; // class CFile -
XIOS/trunk/src/node/grid.cpp
r346 r347 25 25 CGrid::~CGrid(void) 26 26 { 27 this->axis.reset() ;28 this->domain.reset() ;27 // this->axis.reset() ; 28 // this->domain.reset() ; 29 29 30 30 for (StdSize i = 0; i < this->storeIndex.size(); i++) … … 73 73 //--------------------------------------------------------------- 74 74 75 const boost::shared_ptr<CAxis>CGrid::getRelAxis (void) const75 const CAxis* CGrid::getRelAxis (void) const 76 76 { 77 77 return (this->axis ); … … 80 80 //--------------------------------------------------------------- 81 81 82 const boost::shared_ptr<CDomain>CGrid::getRelDomain(void) const82 const CDomain* CGrid::getRelDomain(void) const 83 83 { 84 84 return (this->domain ); … … 158 158 { 159 159 if (this->isChecked) return; 160 shared_ptr<CContext>context = CContext::getCurrent() ;160 CContext* context = CContext::getCurrent() ; 161 161 CContextClient* client=context->client ; 162 162 … … 306 306 //---------------------------------------------------------------- 307 307 308 boost::shared_ptr<CGrid> 309 CGrid::CreateGrid(boost::shared_ptr<CDomain> domain) 308 CGrid* CGrid::createGrid(CDomain* domain) 310 309 { 311 310 StdString new_id = StdString("__") + domain->getId() + StdString("__") ; 312 boost::shared_ptr<CGrid>grid = CGridGroup::get("grid_definition")->createChild(new_id) ;311 CGrid* grid = CGridGroup::get("grid_definition")->createChild(new_id) ; 313 312 grid->domain_ref.setValue(domain->getId()); 314 313 return (grid); 315 314 } 316 315 317 boost::shared_ptr<CGrid> 318 CGrid::CreateGrid(boost::shared_ptr<CDomain> domain, boost::shared_ptr<CAxis> axis) 316 CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis) 319 317 { 320 318 StdString new_id = StdString("__") + domain->getId() + 321 319 StdString("_") + axis->getId() + StdString("__") ; 322 boost::shared_ptr<CGrid>grid = CGridGroup::get("grid_definition")->createChild(new_id) ;320 CGrid* grid = CGridGroup::get("grid_definition")->createChild(new_id) ; 323 321 grid->domain_ref.setValue(domain->getId()); 324 322 grid->axis_ref.setValue(axis->getId()); … … 416 414 void CGrid::sendIndex(void) 417 415 { 418 shared_ptr<CContext>context = CContext::getCurrent() ;416 CContext* context = CContext::getCurrent() ; 419 417 CContextClient* client=context->client ; 420 418 -
XIOS/trunk/src/node/grid.hpp
r345 r347 68 68 const std::deque<ARRAY(int, 1)> & getOutLIndex(void) const; 69 69 70 const boost::shared_ptr<CAxis>getRelAxis (void) const;71 const boost::shared_ptr<CDomain>getRelDomain(void) const;70 const CAxis* getRelAxis (void) const; 71 const CDomain* getRelDomain(void) const; 72 72 73 73 StdSize getDimension(void) const; … … 105 105 106 106 /// Instanciateurs Statiques /// 107 static boost::shared_ptr<CGrid> 108 CreateGrid(boost::shared_ptr<CDomain> domain); 109 static boost::shared_ptr<CGrid> 110 CreateGrid(boost::shared_ptr<CDomain> domain, boost::shared_ptr<CAxis> axis); 107 static CGrid* createGrid(CDomain* domain); 108 static CGrid* createGrid(CDomain* domain, CAxis* axis); 111 109 112 110 public : … … 133 131 bool isChecked; 134 132 135 boost::shared_ptr<CAxis>axis ;136 boost::shared_ptr<CDomain>domain ;133 CAxis* axis ; 134 CDomain* domain ; 137 135 138 136 std::deque<ARRAY(int, 1)> storeIndex ; -
XIOS/trunk/src/node/variable.cpp
r346 r347 82 82 void CVariableGroup::parse(xml::CXMLNode & node, bool withAttr) 83 83 { 84 boost::shared_ptr<CVariableGroup>group_ptr = (this->hasId())84 CVariableGroup* group_ptr = (this->hasId()) 85 85 ? CVariableGroup::get(this->getId()) : CVariableGroup::get(this); 86 86 -
XIOS/trunk/src/object_template.hpp
r346 r347 68 68 static bool has(const string& id) ; 69 69 static bool has(const string& contextId, const string& id) ; 70 static boost::shared_ptr<T> get(const string& id) ; 71 static boost::shared_ptr<T> get(const T* ptr) ; 72 static boost::shared_ptr<T> get(const string& contextId, const string& id) ; 73 boost::shared_ptr<T> get(void) ; 74 static boost::shared_ptr<T> create(const string& id=string("")) ; 75 static const vector< boost::shared_ptr<T> >& getAll() ; 76 static const vector< boost::shared_ptr<T> >& getAll(const string& contextId) ; 70 static T* get(const string& id) ; 71 static T* get(const T* ptr) ; 72 static T* get(const string& contextId, const string& id) ; 73 T* get(void) ; 74 shared_ptr<T> getShared(void) ; 75 static shared_ptr<T> getShared(const T* ptr) ; 76 77 static T* create(const string& id=string("")) ; 78 static const vector<T*> getAll() ; 79 static const vector<T*> getAll(const string& contextId) ; 77 80 78 81 void generateCInterface(ostream& oss) ; -
XIOS/trunk/src/object_template_impl.hpp
r346 r347 145 145 void CObjectTemplate<T>::ClearAllAttributes(void) 146 146 { 147 std::vector<boost::shared_ptr<T> > & avect = 148 CObjectTemplate<T>::GetAllVectobject(CContext::getCurrent()->getId()); 149 typename std::vector<boost::shared_ptr<T> >::iterator 147 vector<T*> avect = CObjectTemplate<T>::getAll() ; 148 typename vector<T*>::iterator 150 149 it = avect.begin(), end = avect.end(); 151 150 … … 165 164 } 166 165 167 168 169 170 shared_ptr<CContext>context=CContext::getCurrent() ;171 166 template <class T> 167 void CObjectTemplate<T>::sendAttributToServer(CAttribute& attr) 168 { 169 CContext* context=CContext::getCurrent() ; 170 172 171 if (!context->hasServer) 173 172 { … … 187 186 } 188 187 189 190 191 192 193 188 } 189 190 template <class T> 191 void CObjectTemplate<T>::recvAttributFromClient(CEventServer& event) 192 { 194 193 195 196 197 198 199 200 201 202 203 204 205 206 207 194 CBufferIn* buffer=event.subEvents.begin()->buffer; 195 string id,attrId; 196 *buffer>>id ; 197 CAttributeMap & attrMap = *get(id); 198 *buffer>>attrId ; 199 CAttribute* attr=attrMap[attrId] ; 200 info(50)<<"attribut recu "<<attrId<<" " ; 201 if (attr->isEmpty()) info(50)<<"--> empty"<<endl ; 202 else info(50) /*<attr->getValue()*/<<endl ; 203 *buffer>>*attr ; 204 info(50)<<"attribut recu "<<attrId<<" " ; 205 if (attr->isEmpty()) info(50)<<"--> empty"<<endl ; 206 else info(50) /*attr->getValue()*/<<endl ; 208 207 } 209 208 … … 238 237 239 238 template <typename T> 240 boost::shared_ptr<T> CObjectTemplate<T>::get(const string & id) 241 { 242 return CObjectFactory::GetObject<T>(id) ; 243 } 244 245 template <typename T> 246 boost::shared_ptr<T> CObjectTemplate<T>::get(const T* ptr) 239 T* CObjectTemplate<T>::get(const string & id) 240 { 241 return CObjectFactory::GetObject<T>(id).get() ; 242 } 243 244 template <typename T> 245 T* CObjectTemplate<T>::get(const T* ptr) 246 { 247 return CObjectFactory::GetObject<T>(ptr).get() ; 248 } 249 250 template <typename T> 251 shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 247 252 { 248 253 return CObjectFactory::GetObject<T>(ptr) ; 249 254 } 250 251 252 template <typename T> 253 const vector<boost::shared_ptr<T> >& CObjectTemplate<T>::getAll() 254 { 255 return CObjectFactory::GetObjectVector<T>() ; 256 } 257 258 template <typename T> 259 const vector<boost::shared_ptr<T> >& CObjectTemplate<T>::getAll(const string & id) 260 { 261 return CObjectFactory::GetObjectVector<T>(id) ; 262 } 263 264 template <typename T> 265 boost::shared_ptr<T> CObjectTemplate<T>::get(const string& contextId, const string & id) 266 { 267 return CObjectFactory::GetObject<T>(contextId,id) ; 268 } 269 270 template <typename T> 271 boost::shared_ptr<T> CObjectTemplate<T>::create(const string & id) 272 { 273 return CObjectFactory::CreateObject<T>(id) ; 255 256 template <typename T> 257 shared_ptr<T> CObjectTemplate<T>::getShared(void) 258 { 259 return CObjectFactory::GetObject<T>((T*)this) ; 260 } 261 262 template <typename T> 263 const vector<T*> CObjectTemplate<T>::getAll() 264 { 265 const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 266 vector<T*> vect ; 267 268 typename vector<shared_ptr<T> >::const_iterator it; 269 for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()) ; 270 return vect ; 271 } 272 273 template <typename T> 274 const vector<T*> CObjectTemplate<T>::getAll(const string & id) 275 { 276 const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 277 vector<T*> vect ; 278 279 typename vector<shared_ptr<T> >::const_iterator it; 280 for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()) ; 281 return vect ; 282 } 283 284 template <typename T> 285 T* CObjectTemplate<T>::get(const string& contextId, const string & id) 286 { 287 return CObjectFactory::GetObject<T>(contextId,id).get() ; 288 } 289 290 template <typename T> 291 T* CObjectTemplate<T>::create(const string & id) 292 { 293 return CObjectFactory::CreateObject<T>(id).get() ; 274 294 } ///-------------------------------------------------------------- 275 295 276 296 template <typename T> 277 boost::shared_ptr<T>CObjectTemplate<T>::get(void)297 T* CObjectTemplate<T>::get(void) 278 298 { 279 return CObjectFactory::GetObject<T>((T*)this) ; 280 // return shared_ptr<T>((T*)this) ; 299 return CObjectFactory::GetObject<T>((T*)this).get() ; 281 300 } 282 301 … … 299 318 oss<<"#include \"group_template_impl.hpp\""<<iendl ; 300 319 oss<<"#include \"icutil.hpp\""<<iendl ; 320 oss<<"#include \"timer.hpp\""<<iendl ; 301 321 oss<<iendl ; 302 322 oss<<"extern \"C\""<<iendl ; -
XIOS/trunk/src/output/nc4_data_output.cpp
r346 r347 55 55 //--------------------------------------------------------------- 56 56 57 void CNc4DataOutput::writeDomain_( const boost::shared_ptr<CDomain>domain)58 { 59 shared_ptr<CContext>context = CContext::getCurrent() ;57 void CNc4DataOutput::writeDomain_(CDomain* domain) 58 { 59 CContext* context = CContext::getCurrent() ; 60 60 CContextServer* server=context->server ; 61 61 … … 221 221 //-------------------------------------------------------------- 222 222 223 void CNc4DataOutput::writeAxis_( const boost::shared_ptr<CAxis>axis)223 void CNc4DataOutput::writeAxis_(CAxis* axis) 224 224 { 225 225 if (axis->IsWritten(this->filename)) return; … … 269 269 //-------------------------------------------------------------- 270 270 271 void CNc4DataOutput::writeField_( const boost::shared_ptr<CField>field)272 { 273 shared_ptr<CContext>context = CContext::getCurrent() ;271 void CNc4DataOutput::writeField_(CField* field) 272 { 273 CContext* context = CContext::getCurrent() ; 274 274 CContextServer* server=context->server ; 275 275 276 276 std::vector<StdString> dims, coodinates; 277 boost::shared_ptr<CGrid>grid = field->grid;278 boost::shared_ptr<CDomain>domain = grid->domain;277 CGrid* grid = field->grid; 278 CDomain* domain = grid->domain; 279 279 280 280 if (domain->isEmpty()) … … 319 319 if (!grid->axis_ref.isEmpty()) 320 320 { 321 boost::shared_ptr<CAxis>axis = grid->axis ;321 CAxis* axis = grid->axis ; 322 322 StdString axisid = (!axis->name.isEmpty()) ? axis->name.getValue() : axis->getId(); 323 323 dims.push_back(axisid); … … 418 418 //-------------------------------------------------------------- 419 419 420 void CNc4DataOutput::writeFile_ ( const boost::shared_ptr<CFile>file)420 void CNc4DataOutput::writeFile_ (CFile* file) 421 421 { 422 422 StdString filename = (!file->name.isEmpty()) … … 461 461 //--------------------------------------------------------------- 462 462 463 void CNc4DataOutput::writeFieldData_ ( const boost::shared_ptr<CField>field)464 { 465 shared_ptr<CContext>context = CContext::getCurrent() ;463 void CNc4DataOutput::writeFieldData_ (CField* field) 464 { 465 CContext* context = CContext::getCurrent() ; 466 466 // if (field->getRelFile()->isSyncTime()) SuperClassWriter::sync() ; 467 467 468 boost::shared_ptr<CGrid>grid = field->grid ;469 boost::shared_ptr<CDomain>domain = grid->domain ;468 CGrid* grid = field->grid ; 469 CDomain* domain = grid->domain ; 470 470 471 471 if(SuperClass::type==MULTI_FILE || !isCollective) if (domain->isEmpty()) return; … … 489 489 if (grid->hasAxis()) // 3D 490 490 { 491 boost::shared_ptr<CAxis>axis = grid->axis ;491 CAxis* axis = grid->axis ; 492 492 ARRAY_CREATE(field_data3D,double,3,[domain->zoom_ni_srv][domain->zoom_nj_srv][axis->size.getValue()]) ; 493 493 field->outputField(field_data3D); … … 561 561 562 562 void CNc4DataOutput::writeTimeAxis_ 563 ( const boost::shared_ptr<CField>field,563 (CField* field, 564 564 const boost::shared_ptr<CCalendar> cal) 565 565 { -
XIOS/trunk/src/output/nc4_data_output.hpp
r345 r347 40 40 41 41 /// Ecriture /// 42 virtual void writeDomain_ ( const boost::shared_ptr<CDomain>domain);43 virtual void writeAxis_ ( const boost::shared_ptr<CAxis>axis);44 virtual void writeField_ ( const boost::shared_ptr<CField>field);45 virtual void writeFieldData_ ( const boost::shared_ptr<CField>field);46 virtual void writeFile_ ( const boost::shared_ptr<CFile>file);42 virtual void writeDomain_ (CDomain* domain); 43 virtual void writeAxis_ (CAxis* axis); 44 virtual void writeField_ (CField* field); 45 virtual void writeFieldData_ (CField* field); 46 virtual void writeFile_ (CFile* file); 47 47 virtual void closeFile_ (void); 48 48 virtual void syncFile_ (void); 49 virtual void writeTimeAxis_ ( const boost::shared_ptr<CField>field,49 virtual void writeTimeAxis_ (CField* field, 50 50 const boost::shared_ptr<CCalendar> cal); 51 51 -
XIOS/trunk/src/output/onetcdf4.hpp
r345 r347 83 83 84 84 /// Ecriture /// 85 virtual void writeField_ ( const boost::shared_ptr<CField>field) = 0;86 virtual void writeDomain_( const boost::shared_ptr<CDomain>domain) = 0;87 virtual void writeAxis_ ( const boost::shared_ptr<CAxis>axis) = 0;85 virtual void writeField_ (CField* field) = 0; 86 virtual void writeDomain_(CDomain* domain) = 0; 87 virtual void writeAxis_ (CAxis* axis) = 0; 88 88 89 89 /// Accesseurs /// -
XIOS/trunk/src/server.cpp
r346 r347 5 5 #include "context.hpp" 6 6 #include "object_template_impl.hpp" 7 #include "tree_manager.hpp"8 7 #include "oasis_cinterface.hpp" 9 8 #include <boost/functional/hash.hpp> 10 9 #include <boost/algorithm/string.hpp> 11 10 #include <mpi.h> 11 #include "tracer.hpp" 12 #include "timer.hpp" 12 13 13 14 namespace xios … … 132 133 else MPI_Finalize() ; 133 134 } 135 report(0)<<"Performance report : Time spent for XIOS : "<<CTimer::get("XIOS server").getCumulatedTime()<<endl ; 136 report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl ; 137 report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl ; 134 138 } 135 139 … … 138 142 bool stop=false ; 139 143 144 CTimer::get("XIOS server").resume() ; 140 145 while(!stop) 141 146 { … … 154 159 if (finished && contextList.empty()) stop=true ; 155 160 } 156 161 CTimer::get("XIOS server").suspend() ; 157 162 } 158 163 … … 166 171 { 167 172 MPI_Status status ; 173 traceOff() ; 168 174 MPI_Iprobe(0,0,*it,&flag,&status) ; 175 traceOn() ; 169 176 if (flag==true) 170 177 { … … 199 206 int msg ; 200 207 208 traceOff() ; 201 209 MPI_Iprobe(0,4,intraComm, &flag, &status) ; 210 traceOn() ; 202 211 if (flag==true) 203 212 { … … 220 229 if (recept==false) 221 230 { 231 traceOff() ; 222 232 MPI_Iprobe(MPI_ANY_SOURCE,1,CXios::globalComm, &flag, &status) ; 233 traceOn() ; 223 234 if (flag==true) 224 235 { … … 232 243 else 233 244 { 245 traceOff() ; 234 246 MPI_Test(&request,&flag,&status) ; 247 traceOn() ; 235 248 if (flag==true) 236 249 { … … 304 317 if (recept==false) 305 318 { 319 traceOff() ; 306 320 MPI_Iprobe(root,2,intraComm, &flag, &status) ; 321 traceOn() ; 307 322 if (flag==true) 308 323 { … … 346 361 <<"Context has already been registred") ; 347 362 348 shared_ptr<CContext>context=CContext::create(contextId) ;349 contextList[contextId]=context .get();363 CContext* context=CContext::create(contextId) ; 364 contextList[contextId]=context ; 350 365 context->initServer(intraComm,contextIntercomm) ; 351 366 -
XIOS/trunk/src/test/test_cs.f90
r327 r347 31 31 TYPE(xios_time) :: dtime 32 32 TYPE(xios_context) :: ctx_hdl 33 INTEGER,PARAMETER :: ni_glo=10 34 INTEGER,PARAMETER :: nj_glo=10 33 INTEGER,PARAMETER :: ni_glo=100 34 INTEGER,PARAMETER :: nj_glo=100 35 35 TYPE(xios_field) :: field_hdl 36 36 TYPE(xios_fieldgroup) :: fieldgroup_hdl … … 80 80 CALL xios_set_context_attr("test",calendar_type="Gregorian") 81 81 CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj) 82 CALL xios_set_domain_attr("domain_A",zoom_ni=3,zoom_ibegin=3,zoom_nj=3,zoom_jbegin=6)82 !CALL xios_set_domain_attr("domain_A",zoom_ni=3,zoom_ibegin=3,zoom_nj=3,zoom_jbegin=6) 83 83 CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 84 84 CALL xios_set_domain_attr("domain_A",lonvalue=RESHAPE(lon,(/ni*nj/)),latvalue=RESHAPE(lat,(/ni*nj/))) … … 106 106 107 107 PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 108 DO ts=1,96 108 DO ts=1,96*200 109 109 CALL xios_update_calendar(ts) 110 110 CALL xios_send_field("field_A",field_A) -
XIOS/trunk/src/xml_parser.cpp
r346 r347 52 52 do 53 53 { 54 boost::shared_ptr<CContextGroup>group_context = CContext::getRoot() ;54 CContextGroup* group_context = CContext::getRoot() ; 55 55 56 56 attributes = node.getAttributes(); … … 73 73 } 74 74 75 boost::shared_ptr<CContext>context = CContext::create(attributes["id"]);75 CContext* context = CContext::create(attributes["id"]); 76 76 // if (!hasctxt) group_context->addChild(context); 77 77 context->parse(node); -
XIOS/trunk/src/xmlioserver.hpp
r345 r347 5 5 6 6 /// xios headers /// 7 #include "tree_manager.hpp"8 7 #include "nc4_data_output.hpp" 9 8
Note: See TracChangeset
for help on using the changeset viewer.