Changeset 352
- Timestamp:
- 07/09/12 11:33:05 (12 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 19 added
- 2 deleted
- 60 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/array.hpp
r335 r352 16 16 { 17 17 template<size_t numDims> 18 detail::multi_array::extent_gen<numDims> getExtentNull(void) { return getExtentNull<numDims-1>()[0];}18 inline detail::multi_array::extent_gen<numDims> getExtentNull(void) { return getExtentNull<numDims-1>()[0];} 19 19 20 20 template<> 21 detail::multi_array::extent_gen<1> getExtentNull<1>(void) { return extents[0]; }21 inline detail::multi_array::extent_gen<1> getExtentNull<1>(void) { return extents[0]; } 22 22 23 23 /// ////////////////////// Déclarations ////////////////////// /// 24 template <typename ValueType, StdSize NumDims, 25 typename Allocator = std::allocator<ValueType> > 26 class CArray 27 : public boost::multi_array<ValueType, NumDims, Allocator> 24 25 template <typename ValueType, StdSize NumDims, typename Allocator = std::allocator<ValueType> > 26 class CArray : public boost::multi_array<ValueType, NumDims, Allocator> 28 27 { 29 28 /// Définition de type /// … … 35 34 36 35 /// Constructeurs /// 37 template <typename ExtentList> 38 explicit CArray(const ExtentList & sizes); 36 // template <typename ExtentList> 37 // explicit CArray(const ExtentList & sizes); 38 template <typename ExtentList> CArray(const ExtentList & sizes) 39 : boost::multi_array<ValueType, NumDims, Allocator> 40 (sizes, boost::fortran_storage_order()) 41 { /* Ne rien faire de plus */ } 42 39 43 40 44 explicit CArray(); 41 45 42 template <typename ExtentList> 43 CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store); 46 // template <typename ExtentList> 47 // CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store); 48 template <typename ExtentList> CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store) 49 : boost::multi_array<ValueType, NumDims, Allocator> (sizes, store) 50 { /* Ne rien faire de plus */ } 44 51 45 52 CArray(const CArray & array); // NEVER IMPLEMENTED. … … 71 78 72 79 }; // class CArray 73 74 80 75 81 ///--------------------------------------------------------------- … … 77 83 } // namespace xios 78 84 79 #include "array_impl.hpp"85 //#include "array_impl.hpp" 80 86 #include "array_mac.hpp" 81 87 namespace xios 88 { 89 template <typename ValueType> void FromBinary(StdIStream & is, ARRAY(ValueType, 1) & array) ; 90 template <typename ValueType> void FromBinary(StdIStream & is, ARRAY(ValueType, 2) & array) ; 91 template <typename ValueType> void FromBinary(StdIStream & is, ARRAY(ValueType, 3) & array) ; 92 } 82 93 #endif // __XMLIO_CArray__ -
XIOS/trunk/src/attribute.hpp
r345 r352 40 40 /// Test /// 41 41 bool isEmpty(void) const; 42 template <typename T> inline bool isType(void) ;42 template <typename T> inline bool isType(void) const; 43 43 44 44 /// Destructeur /// … … 92 92 93 93 template<typename T> 94 bool CAttribute::isType(void) 94 bool CAttribute::isType(void) const 95 95 { 96 96 return (this->value.type() == typeid(T)); -
XIOS/trunk/src/attribute_template_impl.hpp
r345 r352 6 6 #include "buffer_in.hpp" 7 7 #include "buffer_out.hpp" 8 #include "generate_interface _impl.hpp"9 8 #include "generate_interface.hpp" 9 #include "attribute_template.hpp" 10 10 11 11 -
XIOS/trunk/src/buffer.hpp
r342 r352 73 73 } 74 74 75 #include "buffer_impl.hpp"75 //#include "buffer_impl.hpp" 76 76 77 77 -
XIOS/trunk/src/buffer_in.hpp
r335 r352 59 59 } 60 60 61 #include "buffer_in_impl.hpp"61 //#include "buffer_in_impl.hpp" 62 62 63 63 -
XIOS/trunk/src/buffer_out.hpp
r335 r352 61 61 } 62 62 63 #include "buffer_out_impl.hpp"63 //#include "buffer_out_impl.hpp" 64 64 65 65 -
XIOS/trunk/src/context_server.cpp
r347 r352 3 3 #include "type.hpp" 4 4 #include "context.hpp" 5 #include "object_template _impl.hpp"6 #include "group_template _impl.hpp"7 #include "attribute_template _impl.hpp"5 #include "object_template.hpp" 6 #include "group_template.hpp" 7 #include "attribute_template.hpp" 8 8 #include "domain.hpp" 9 9 #include "field.hpp" 10 #include "file.hpp" 11 #include "grid.hpp" 10 12 #include <mpi.h> 11 13 #include "tracer.hpp" -
XIOS/trunk/src/cxios.hpp
r346 r352 41 41 42 42 } ; 43 43 44 } 44 45 45 #include "cxios_impl.hpp"46 //#include "cxios_impl.hpp" 46 47 47 48 -
XIOS/trunk/src/cxios_impl.hpp
r346 r352 4 4 #include "xmlioserver_spl.hpp" 5 5 #include "variable.hpp" 6 #include "object_template_impl.hpp" 6 #include "object_template.hpp" 7 #include "cxios.hpp" 7 8 8 9 namespace xios -
XIOS/trunk/src/data_output.cpp
r347 r352 1 1 #include "data_output.hpp" 2 2 3 #include "attribute_template _impl.hpp"4 #include "group_template _impl.hpp"3 #include "attribute_template.hpp" 4 #include "group_template.hpp" 5 5 #include "context.hpp" 6 6 -
XIOS/trunk/src/functor.hpp
r335 r352 58 58 } // namespace xios 59 59 60 #include "functor_type.hpp"60 //#include "functor_type.hpp" 61 61 62 62 #endif // __XMLIO_CFunctor__ -
XIOS/trunk/src/generate_fortran_interface.cpp
r347 r352 1 1 #include "xmlioserver.hpp" 2 #include "generate_interface _impl.hpp"2 #include "generate_interface.hpp" 3 3 #include "indent.hpp" 4 #include "attribute_template _impl.hpp"5 #include "object_template _impl.hpp"6 #include "group_template _impl.hpp"4 #include "attribute_template.hpp" 5 #include "object_template.hpp" 6 #include "group_template.hpp" 7 7 8 8 int main (int argc, char ** argv, char ** UNUSED (env)) -
XIOS/trunk/src/generate_interface.hpp
r335 r352 42 42 43 43 }; 44 44 /* 45 45 template<> string CInterface::getStrFortranType<int>(void) {return string("INTEGER") ;} 46 46 template<> string CInterface::getStrFortranType<bool>(void) {return string("LOGICAL") ;} … … 62 62 template<> bool CInterface::matchingTypeCFortran<double>(void) { return true; } 63 63 template<> bool CInterface::matchingTypeCFortran<float>(void) { return true; } 64 64 */ 65 65 } 66 66 #endif -
XIOS/trunk/src/generate_interface_impl.hpp
r347 r352 6 6 #include "type_util.hpp" 7 7 #include "indent.hpp" 8 #include "array.hpp" 8 9 9 10 namespace xios 10 11 { 11 12 template<> string CInterface::getStrFortranType<int>(void) {return string("INTEGER") ;} 13 template<> string CInterface::getStrFortranType<bool>(void) {return string("LOGICAL") ;} 14 template<> string CInterface::getStrFortranType<double>(void) {return string("REAL") ;} 15 template<> string CInterface::getStrFortranType<float>(void) {return string("REAL") ;} 16 17 template<> string CInterface::getStrFortranKind<int>(void) {return string("") ;} 18 template<> string CInterface::getStrFortranKind<bool>(void) {return string("") ;} 19 template<> string CInterface::getStrFortranKind<double>(void) {return string("(KIND=8)") ;} 20 template<> string CInterface::getStrFortranKind<float>(void) {return string("(KIND=4)") ;} 21 22 template<> string CInterface::getStrFortranKindC<int>(void) {return string("(KIND=C_INT)") ;} 23 template<> string CInterface::getStrFortranKindC<bool>(void) {return string("(KIND=C_BOOL)") ;} 24 template<> string CInterface::getStrFortranKindC<double>(void) {return string("(KIND=C_DOUBLE)") ;} 25 template<> string CInterface::getStrFortranKindC<float>(void) {return string("(KIND=C_FLOAT)") ;} 26 27 template<> bool CInterface::matchingTypeCFortran<int>(void) { return true ; } 28 template<> bool CInterface::matchingTypeCFortran<bool>(void) { return false ;} 29 template<> bool CInterface::matchingTypeCFortran<double>(void) { return true; } 30 template<> bool CInterface::matchingTypeCFortran<float>(void) { return true; } 31 12 32 13 33 // ///////////////////////////////////////////////// … … 15 35 // ///////////////////////////////////////////////// 16 36 37 17 38 template <class T> 18 39 void CInterface::AttributeCInterface(ostream& oss, const string& className,const string& name) -
XIOS/trunk/src/group_factory.hpp
r335 r352 74 74 } // namespace xios 75 75 76 #include "group_factory_impl.hpp"77 #include "group_parser.hpp"76 //#include "group_factory_impl.hpp" 77 //#include "group_parser.hpp" 78 78 79 79 #endif // __XMLIO_CGroupFactory__ -
XIOS/trunk/src/group_factory_impl.hpp
r347 r352 1 1 #ifndef __XMLIO_CGroupFactory_impl__ 2 2 #define __XMLIO_CGroupFactory_impl__ 3 4 #include "group_factory.hpp" 3 5 4 6 namespace xios … … 14 16 << " pgroup or cgroup NULL !"); 15 17 if (!cgroup->hasId()) 16 pgroup->groupList.insert(pgroup->groupList.end(), cgroup );18 pgroup->groupList.insert(pgroup->groupList.end(), cgroup.get()); 17 19 else 18 20 { 19 pgroup->groupList.insert(pgroup->groupList.end(), cgroup );20 pgroup->groupMap.insert(std::make_pair(cgroup->getId(), cgroup ));21 pgroup->groupList.insert(pgroup->groupList.end(), cgroup.get()); 22 pgroup->groupMap.insert(std::make_pair(cgroup->getId(), cgroup.get())); 21 23 } 22 24 } -
XIOS/trunk/src/group_template_impl.hpp
r347 r352 4 4 #include "xmlioserver_spl.hpp" 5 5 #include "event_server.hpp" 6 #include "object_template _impl.hpp"6 #include "object_template.hpp" 7 7 #include "group_template.hpp" 8 8 #include "context.hpp" 9 9 #include "event_client.hpp" 10 10 #include "context_client.hpp" 11 #include "message.hpp" 12 #include "type.hpp" 13 #include "type_util.hpp" 11 14 12 15 … … 238 241 CGroupTemplate<U, V, W>::getGroupMap(void) const 239 242 { 240 return (this->group List);243 return (this->groupMap); 241 244 } 242 245 … … 351 354 void CGroupTemplate<U, V, W>::addChild(U* child) 352 355 { 353 return CGroupFactory::AddChild<V>(this->getShared ,child->getShared()) ;356 return CGroupFactory::AddChild<V>(this->getShared(),child->getShared()) ; 354 357 } 355 358 … … 475 478 } 476 479 480 template <class U, class V, class W> 481 void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr) 482 { 483 484 StdString name = node.getElementName(); 485 xml::THashAttributes attributes = node.getAttributes(); 486 if (withAttr) 487 { 488 CGroupTemplate<U, V, W>::SuperClass::parse(node); 489 if (attributes.end() != attributes.find("src")) 490 { 491 StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in ); 492 if (!ifs.good()) 493 ERROR("CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)", 494 << "[ filename = " << attributes["src"] << " ] Bad xml stream !"); 495 xml::CXMLParser::ParseInclude(ifs, *this); 496 } 497 } 498 499 // PARSING POUR GESTION DES ENFANTS 500 V* group_ptr = (this->hasId()) 501 ? V::get(this->getId()) 502 : boost::polymorphic_downcast<V*>(this); 503 504 if (!(node.goToChildElement())) 505 { 506 if (this->hasId()) 507 { 508 DEBUG(<< "L'objet de type \'" << V::GetName() 509 << "\' nommé \'" << this->getId() 510 << "\' ne contient pas d\'enfant !"); 511 } 512 } 513 else 514 { 515 do { // Parcours pour traitement. 516 517 StdString name = node.getElementName(); 518 attributes.clear(); 519 attributes = node.getAttributes(); 520 521 if (name.compare(V::GetName()) == 0) 522 { 523 if (attributes.end() == attributes.find("id")) 524 CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node); 525 else 526 CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node); 527 continue; 528 } 529 530 if (name.compare(U::GetName()) == 0) 531 { 532 if (attributes.end() == attributes.find("id")) 533 CGroupFactory::CreateChild(group_ptr->getShared())->parse(node); 534 else 535 CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node); 536 continue; 537 } 538 539 DEBUG(<< "Dans le contexte \'" << CContext::getCurrent()->getId() 540 << "\', un objet de type \'" << V::GetName() 541 << "\' ne peut contenir qu'un objet de type \'" << V::GetName() 542 << "\' ou de type \'" << U::GetName() 543 << "\' (reçu : " << name << ") !"); 544 545 } while (node.goToNextElement()); 546 node.goToParentElement(); // Retour au parent 547 } 548 } 477 549 } // namespace xios 478 550 -
XIOS/trunk/src/interface/c/icaxis.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "object_template _impl.hpp"11 #include "group_template _impl.hpp"12 #include "attribute_template _impl.hpp"10 #include "object_template.hpp" 11 #include "group_template.hpp" 12 #include "attribute_template.hpp" 13 13 14 14 #include "icutil.hpp" 15 15 #include "timer.hpp" 16 #include "axis.hpp" 16 17 17 18 extern "C" -
XIOS/trunk/src/interface/c/iccontext.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "calendar_type.hpp" … … 16 16 #include "icutil.hpp" 17 17 #include "timer.hpp" 18 #include "context.hpp" 18 19 19 20 extern "C" -
XIOS/trunk/src/interface/c/icdata.cpp
r347 r352 12 12 #include "oasis_cinterface.hpp" 13 13 14 #include "attribute_template _impl.hpp"15 #include "object_template _impl.hpp"16 #include "group_template _impl.hpp"14 #include "attribute_template.hpp" 15 #include "object_template.hpp" 16 #include "group_template.hpp" 17 17 18 18 #include "icutil.hpp" … … 20 20 #include "client.hpp" 21 21 #include "field.hpp" 22 #include " field_impl.hpp"22 #include "context.hpp" 23 23 #include <mpi.h> 24 24 #include "timer.hpp" -
XIOS/trunk/src/interface/c/icdate.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "calendar_type.hpp" … … 16 16 #include "icutil.hpp" 17 17 #include "timer.hpp" 18 #include "context.hpp" 18 19 19 20 extern "C" -
XIOS/trunk/src/interface/c/icdomain.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "icutil.hpp" 15 15 #include "timer.hpp" 16 #include "domain.hpp" 16 17 17 18 extern "C" -
XIOS/trunk/src/interface/c/icfield.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "icutil.hpp" 15 15 #include "timer.hpp" 16 #include "field.hpp" 16 17 17 18 extern "C" -
XIOS/trunk/src/interface/c/icfile.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "icutil.hpp" 15 15 #include "timer.hpp" 16 #include "file.hpp" 16 17 17 18 extern "C" -
XIOS/trunk/src/interface/c/icgrid.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "icutil.hpp" 15 15 #include "timer.hpp" 16 #include "grid.hpp" 16 17 17 18 extern "C" -
XIOS/trunk/src/interface/c/icxml_tree.cpp
r347 r352 8 8 #include "xmlioserver.hpp" 9 9 10 #include "attribute_template _impl.hpp"11 #include "object_template _impl.hpp"12 #include "group_template _impl.hpp"10 #include "attribute_template.hpp" 11 #include "object_template.hpp" 12 #include "group_template.hpp" 13 13 14 14 #include "icutil.hpp" 15 15 #include "timer.hpp" 16 #include "context.hpp" 17 #include "grid.hpp" 18 #include "file.hpp" 19 #include "field.hpp" 20 #include "axis.hpp" 21 #include "domain.hpp" 16 22 17 23 extern "C" -
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "axis.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "axis.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "context.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "domain.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "domain.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icfield_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "field.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "field.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icfile_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "file.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "file.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "grid.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r347 r352 6 6 #include <boost/shared_ptr.hpp> 7 7 #include "xmlioserver.hpp" 8 #include "attribute_template _impl.hpp"9 #include "object_template _impl.hpp"10 #include "group_template _impl.hpp"8 #include "attribute_template.hpp" 9 #include "object_template.hpp" 10 #include "group_template.hpp" 11 11 #include "icutil.hpp" 12 12 #include "timer.hpp" 13 #include "grid.hpp" 13 14 14 15 extern "C" -
XIOS/trunk/src/node/axis.cpp
r351 r352 1 1 #include "axis.hpp" 2 2 3 #include "attribute_template_impl.hpp" 4 #include "object_template_impl.hpp" 5 #include "group_template_impl.hpp" 3 #include "attribute_template.hpp" 4 #include "object_template.hpp" 5 #include "group_template.hpp" 6 #include "message.hpp" 7 #include "type.hpp" 8 #include "xmlioserver_spl.hpp" 6 9 7 10 namespace xios { -
XIOS/trunk/src/node/context.cpp
r347 r352 1 1 #include "context.hpp" 2 #include "attribute_template _impl.hpp"3 #include "object_template _impl.hpp"4 #include "group_template _impl.hpp"2 #include "attribute_template.hpp" 3 #include "object_template.hpp" 4 #include "group_template.hpp" 5 5 6 6 #include "calendar_type.hpp" … … 11 11 #include "nc4_data_output.hpp" 12 12 #include "node_type.hpp" 13 #include "message.hpp" 14 #include "type.hpp" 15 #include "xmlioserver_spl.hpp" 13 16 14 17 namespace xios { -
XIOS/trunk/src/node/context.hpp
r347 r352 4 4 /// xios headers /// 5 5 #include "xmlioserver_spl.hpp" 6 #include "node_type.hpp"6 //#include "node_type.hpp" 7 7 #include "calendar.hpp" 8 8 … … 24 24 class CContextAttributes; 25 25 class CContext; 26 26 class CFile; 27 27 ///-------------------------------------------------------------- 28 28 -
XIOS/trunk/src/node/domain.cpp
r347 r352 1 1 #include "domain.hpp" 2 2 3 #include "attribute_template _impl.hpp"4 #include "object_template _impl.hpp"5 #include "group_template _impl.hpp"3 #include "attribute_template.hpp" 4 #include "object_template.hpp" 5 #include "group_template.hpp" 6 6 7 7 #include "xmlioserver_spl.hpp" … … 9 9 #include "event_server.hpp" 10 10 #include "buffer_in.hpp" 11 #include "message.hpp" 12 #include "type.hpp" 13 #include "context.hpp" 14 #include "context_client.hpp" 11 15 12 16 namespace xios { -
XIOS/trunk/src/node/field.cpp
r347 r352 1 1 #include "field.hpp" 2 2 3 #include "attribute_template _impl.hpp"4 #include "object_template _impl.hpp"5 #include "group_template _impl.hpp"3 #include "attribute_template.hpp" 4 #include "object_template.hpp" 5 #include "group_template.hpp" 6 6 7 7 #include "node_type.hpp" 8 8 #include "calendar_util.hpp" 9 #include "message.hpp" 10 #include "xmlioserver_spl.hpp" 11 #include "type.hpp" 12 #include "context_client.hpp" 9 13 10 14 namespace xios{ -
XIOS/trunk/src/node/file.cpp
r347 r352 1 1 #include "file.hpp" 2 2 3 #include "attribute_template_impl.hpp" 4 #include "object_template_impl.hpp" 5 #include "group_template_impl.hpp" 6 3 #include "attribute_template.hpp" 4 #include "object_template.hpp" 5 #include "group_template.hpp" 7 6 #include "object_factory.hpp" 8 #include "object_factory_impl.hpp"9 7 #include "data_output.hpp" 10 8 #include "context.hpp" … … 13 11 #include "calendar_util.hpp" 14 12 #include "date.hpp" 15 13 #include "message.hpp" 14 #include "type.hpp" 15 #include "xmlioserver_spl.hpp" 16 #include "context_client.hpp" 16 17 17 18 namespace xios { -
XIOS/trunk/src/node/grid.cpp
r351 r352 2 2 #include "grid.hpp" 3 3 4 #include "attribute_template_impl.hpp" 5 #include "object_template_impl.hpp" 6 #include "group_template_impl.hpp" 4 #include "attribute_template.hpp" 5 #include "object_template.hpp" 6 #include "group_template.hpp" 7 #include "message.hpp" 7 8 #include <iostream> 9 #include "xmlioserver_spl.hpp" 10 #include "type.hpp" 11 #include "context.hpp" 12 #include "context_client.hpp" 8 13 9 14 namespace xios { -
XIOS/trunk/src/node/variable.cpp
r347 r352 1 1 #include "variable.hpp" 2 2 3 #include "attribute_template_impl.hpp" 4 #include "object_template_impl.hpp" 5 #include "group_template_impl.hpp" 6 3 #include "attribute_template.hpp" 4 #include "object_template.hpp" 5 #include "group_template.hpp" 7 6 #include "object_factory.hpp" 8 #include "object_factory_impl.hpp" 7 #include "xmlioserver_spl.hpp" 8 #include "type.hpp" 9 9 10 10 namespace xios { -
XIOS/trunk/src/node/variable.hpp
r345 r352 64 64 template <typename T> inline T getData(void) const; 65 65 // bool inline getData<bool>(void) const ; 66 // template <> getData<bool>(void) const ; 66 67 67 68 template <typename T, StdSize N> … … 81 82 }; // class CVar 82 83 83 84 template<> 85 inline bool CVariable::getData(void) const 86 { 87 if (content.compare("true")==0 || content.compare(".true.")==0 || content.compare(".TRUE.")==0) return true ; 88 else if (content.compare("false")==0 || content.compare(".false.")==0 || content.compare(".FALSE.")==0) return false ; 89 else ERROR("CVariable::getdata()", 90 << "Cannot convert string <" << content << "> into type required" ); 91 return false ; 92 } 93 84 94 template <typename T> 85 T CVariable::getData(void) const95 inline T CVariable::getData(void) const 86 96 { 87 97 T retval ; … … 94 104 } 95 105 96 template<> 97 bool CVariable::getData<bool>(void) const 98 { 99 if (content.compare("true")==0 || content.compare(".true.")==0 || content.compare(".TRUE.")==0) return true ; 100 else if (content.compare("false")==0 || content.compare(".false.")==0 || content.compare(".FALSE.")==0) return false ; 101 else ERROR("CVariable::getdata()", 102 << "Cannot convert string <" << content << "> into type required" ); 103 return false ; 104 } 106 105 107 ///-------------------------------------------------------------- 106 108 -
XIOS/trunk/src/object_factory.hpp
r335 r352 24 24 25 25 template <typename U> 26 static inlineboost::shared_ptr<U> GetObject(const StdString & id);26 static boost::shared_ptr<U> GetObject(const StdString & id); 27 27 28 28 template <typename U> 29 static inlineboost::shared_ptr<U> GetObject(const StdString& context,const StdString & id);29 static boost::shared_ptr<U> GetObject(const StdString& context,const StdString & id); 30 30 31 31 template <typename U> 32 static inlineboost::shared_ptr<U> GetObject(const U * const object);32 static boost::shared_ptr<U> GetObject(const U * const object); 33 33 34 34 template <typename U> 35 static inlineint GetObjectNum(void);35 static int GetObjectNum(void); 36 36 template <typename U> 37 static inlineint GetObjectIdNum(void);37 static int GetObjectIdNum(void); 38 38 39 39 template <typename U> 40 static inlineconst std::vector<boost::shared_ptr<U> > &40 static const std::vector<boost::shared_ptr<U> > & 41 41 GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); 42 42 43 43 /// Tests /// 44 44 template <typename U> 45 static inlinebool HasObject(const StdString & id);45 static bool HasObject(const StdString & id); 46 46 47 47 template <typename U> 48 static inlinebool HasObject(const StdString& context,const StdString & id);48 static bool HasObject(const StdString& context,const StdString & id); 49 49 50 50 /// Instanciateur /// 51 51 template <typename U> 52 static inlineboost::shared_ptr<U> CreateObject(const StdString & id = StdString(""));52 static boost::shared_ptr<U> CreateObject(const StdString & id = StdString("")); 53 53 54 template <typename U> static inlineStdString GenUId(void) ;54 template <typename U> static StdString GenUId(void) ; 55 55 56 56 private : … … 62 62 } // namespace xios 63 63 64 #include "object_factory_impl.hpp"64 //#include "object_factory_impl.hpp" 65 65 66 66 #endif // __XMLIO_CObjectFactory__ -
XIOS/trunk/src/object_factory_impl.hpp
r335 r352 1 1 #ifndef __XMLIO_CObjectFactory_impl__ 2 2 #define __XMLIO_CObjectFactory_impl__ 3 4 #include "object_factory.hpp" 3 5 4 6 namespace xios -
XIOS/trunk/src/object_template_impl.hpp
r347 r352 15 15 #include "message.hpp" 16 16 #include "type.hpp" 17 #include "type_util.hpp" 18 #include "group_template.hpp" 17 19 18 20 namespace xios … … 314 316 oss<<"#include <boost/shared_ptr.hpp>"<<iendl ; 315 317 oss<<"#include \"xmlioserver.hpp\""<<iendl; 316 oss<<"#include \"attribute_template _impl.hpp\""<<iendl ;317 oss<<"#include \"object_template _impl.hpp\""<<iendl;318 oss<<"#include \"group_template _impl.hpp\""<<iendl ;318 oss<<"#include \"attribute_template.hpp\""<<iendl ; 319 oss<<"#include \"object_template.hpp\""<<iendl; 320 oss<<"#include \"group_template.hpp\""<<iendl ; 319 321 oss<<"#include \"icutil.hpp\""<<iendl ; 320 322 oss<<"#include \"timer.hpp\""<<iendl ; -
XIOS/trunk/src/output/nc4_data_output.cpp
r351 r352 3 3 4 4 #include <boost/lexical_cast.hpp> 5 #include "attribute_template _impl.hpp"6 #include "group_template _impl.hpp"5 #include "attribute_template.hpp" 6 #include "group_template.hpp" 7 7 8 8 #include "file.hpp" -
XIOS/trunk/src/output/nc4_data_output.hpp
r347 r352 81 81 const StdString & units, 82 82 const StdString & nav_model); 83 /* 83 84 template <class T> 84 85 void writeAxisData(const StdString & axis_name, … … 87 88 const std::vector<StdSize> * start = NULL, 88 89 const std::vector<StdSize> * count = NULL); 89 90 */ 90 91 private : 91 92 -
XIOS/trunk/src/output/onetcdf4.cpp
r350 r352 1 1 #include "onetcdf4.hpp" 2 #include "group_template _impl.hpp"2 #include "group_template.hpp" 3 3 4 4 namespace xios -
XIOS/trunk/src/output/onetcdf4.hpp
r347 r352 126 126 ///--------------------------------------------------------------- 127 127 128 template <class T, StdSize ndim>129 void CONetCDF4::writeData(const ARRAY(T, ndim) data, const StdString & name,130 bool collective, StdSize record,131 const std::vector<StdSize> * start,132 const std::vector<StdSize> * count)133 {134 int grpid = this->getCurrentGroup();135 int varid = this->getVariable(name);136 StdSize array_size = 1;137 std::vector<StdSize> sstart, scount;138 128 139 if (this->wmpi && collective)140 CheckError(nc_var_par_access(grpid, varid, NC_COLLECTIVE));141 if (this->wmpi && !collective)142 CheckError(nc_var_par_access(grpid, varid, NC_INDEPENDENT));143 144 this->getWriteDataInfos145 (name, record, array_size, sstart, scount, start, count);146 if (data->num_elements() != array_size)147 {148 ERROR("CONetCDF4::writeData(...)",149 << "[ input array size = " << data->num_elements()150 << ", intern array size = " << array_size151 << " ] Invalid input data !" );152 }153 154 this->writeData_(grpid, varid, sstart, scount, data->data());155 }156 157 //----------------------------------------------------------------158 159 template <class T>160 void CONetCDF4::setDefaultValue(const StdString & varname, const T * value)161 {162 int grpid = this->getCurrentGroup();163 int varid = this->getVariable(varname);164 165 if (value != NULL)166 {167 CheckError(nc_def_var_fill(grpid, varid, 0, value));168 this->addAttribute(StdString("missing_value"), *value, &varname);169 }170 else171 CheckError(nc_def_var_fill(grpid, varid, 1, NULL));172 }173 174 ///---------------------------------------------------------------175 129 176 130 } // namespace xios -
XIOS/trunk/src/server.cpp
r347 r352 4 4 #include "type.hpp" 5 5 #include "context.hpp" 6 #include "object_template _impl.hpp"6 #include "object_template.hpp" 7 7 #include "oasis_cinterface.hpp" 8 8 #include <boost/functional/hash.hpp> -
XIOS/trunk/src/test/test_xios.cpp
r346 r352 1 1 #include "xmlioserver.hpp" 2 #include "attribute_template _impl.hpp"2 #include "attribute_template.hpp" 3 3 #include "buffer_out.hpp" 4 4 #include "buffer_in.hpp" … … 10 10 #include "context_client.hpp" 11 11 #include "context_server.hpp" 12 #include "object_template _impl.hpp"12 #include "object_template.hpp" 13 13 #include <mpi.h> 14 14 -
XIOS/trunk/src/type/type.hpp
r335 r352 41 41 } ; 42 42 43 class CMessage ; 44 45 template <typename T> 46 CBufferOut& operator<<(CBufferOut& buffer, const CType<T>& type) ; 47 48 49 template <typename T> 50 CBufferOut& operator<<(CBufferOut& buffer, T& type) ; 51 52 template <typename T> 53 CBufferOut& operator<<(CBufferOut& buffer, const T& type) ; 54 55 template <typename T> 56 CBufferIn& operator>>(CBufferIn& buffer, const CType<T>& type) ; 57 58 template <typename T> 59 CBufferIn& operator>>(CBufferIn& buffer, T& type) ; 60 61 62 63 template <typename T> 64 CMessage& operator<<(CMessage& msg, const CType<T>& type) ; 65 66 template <typename T> 67 CMessage& operator<<(CMessage& msg,CType<T>& type) ; 68 69 template <typename T> 70 CMessage& operator<<(CMessage& msg, const T& type) ; 71 72 template <typename T> 73 CMessage& operator<<(CMessage& msg, T& type) ; 74 43 75 } 44 76 45 #include "type_impl.hpp" 46 #include "type_specialisation.hpp" 77 78 //#include "type_impl.hpp" 79 //#include "type_specialisation.hpp" 47 80 48 81 #endif -
XIOS/trunk/src/type/type_impl.hpp
r335 r352 7 7 #include "buffer_out.hpp" 8 8 #include "message.hpp" 9 #include "type.hpp" 9 10 10 11 -
XIOS/trunk/src/type/type_util.hpp
r345 r352 16 16 class CFileGroup; 17 17 class CContext; 18 18 class CContextGroup; 19 class CVariable ; 20 class CVariableGroup ; 19 21 20 template <typename T> 21 inline string getStrType(void) ; 22 template <typename T> inline string getStrType(void) ; 22 23 23 24 #define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T) ; } … … 50 51 macro(CFileGroup) 51 52 macro(CContext) 53 macro(CContextGroup) 54 macro(CVariable) 55 macro(CVariableGroup) 52 56 57 53 58 #undef macro 54 59 -
XIOS/trunk/src/xml_parser.cpp
r347 r352 3 3 #include "context.hpp" 4 4 5 #include "attribute_template _impl.hpp"6 #include "object_template _impl.hpp"7 #include "group_template _impl.hpp"5 #include "attribute_template.hpp" 6 #include "object_template.hpp" 7 #include "group_template.hpp" 8 8 9 9 namespace xios -
XIOS/trunk/src/xml_parser.hpp
r335 r352 21 21 static void ParseStream(StdIStream & stream); 22 22 template <class T> 23 static inlinevoid ParseInclude(StdIStream & stream, T & object);23 static void ParseInclude(StdIStream & stream, T & object); 24 24 25 25 }; //class CXMLParser 26 26 /* 27 27 template <class T> 28 28 void CXMLParser::ParseInclude(StdIStream & stream, T& object) … … 45 45 } 46 46 } 47 47 */ 48 48 }// namespace xml 49 49 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.