Changeset 352


Ignore:
Timestamp:
07/09/12 11:33:05 (9 years ago)
Author:
ymipsl
Message:
 
Location:
XIOS/trunk/src
Files:
19 added
2 deleted
60 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/array.hpp

    r335 r352  
    1616{ 
    1717   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];} 
    1919    
    2020   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]; } 
    2222 
    2323   /// ////////////////////// 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> 
    2827   { 
    2928         /// Définition de type /// 
     
    3534 
    3635         /// 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 
    3943 
    4044         explicit CArray(); 
    4145 
    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 */ } 
    4451 
    4552         CArray(const CArray & array);       // NEVER IMPLEMENTED. 
     
    7178 
    7279   }; // class CArray 
    73     
    7480 
    7581   ///--------------------------------------------------------------- 
     
    7783} // namespace xios 
    7884 
    79 #include "array_impl.hpp" 
     85//#include "array_impl.hpp" 
    8086#include "array_mac.hpp" 
    81  
     87namespace 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} 
    8293#endif // __XMLIO_CArray__ 
  • XIOS/trunk/src/attribute.hpp

    r345 r352  
    4040            /// Test /// 
    4141            bool isEmpty(void) const; 
    42             template <typename T> inline bool isType(void); 
     42            template <typename T> inline bool isType(void) const; 
    4343 
    4444            /// Destructeur /// 
     
    9292 
    9393      template<typename T> 
    94          bool CAttribute::isType(void) 
     94         bool CAttribute::isType(void) const 
    9595      {  
    9696         return (this->value.type() == typeid(T));  
  • XIOS/trunk/src/attribute_template_impl.hpp

    r345 r352  
    66#include "buffer_in.hpp" 
    77#include "buffer_out.hpp" 
    8 #include "generate_interface_impl.hpp" 
    9  
     8#include "generate_interface.hpp" 
     9#include "attribute_template.hpp" 
    1010 
    1111   
  • XIOS/trunk/src/buffer.hpp

    r342 r352  
    7373} 
    7474 
    75 #include "buffer_impl.hpp"  
     75//#include "buffer_impl.hpp"  
    7676 
    7777 
  • XIOS/trunk/src/buffer_in.hpp

    r335 r352  
    5959} 
    6060 
    61 #include "buffer_in_impl.hpp"  
     61//#include "buffer_in_impl.hpp"  
    6262 
    6363 
  • XIOS/trunk/src/buffer_out.hpp

    r335 r352  
    6161} 
    6262 
    63 #include "buffer_out_impl.hpp"  
     63//#include "buffer_out_impl.hpp"  
    6464 
    6565 
  • XIOS/trunk/src/context_server.cpp

    r347 r352  
    33#include "type.hpp" 
    44#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" 
    88#include "domain.hpp" 
    9  
     9#include "field.hpp" 
     10#include "file.hpp" 
     11#include "grid.hpp" 
    1012#include <mpi.h> 
    1113#include "tracer.hpp" 
  • XIOS/trunk/src/cxios.hpp

    r346 r352  
    4141         
    4242  } ; 
     43 
    4344} 
    4445 
    45 #include "cxios_impl.hpp" 
     46//#include "cxios_impl.hpp" 
    4647 
    4748 
  • XIOS/trunk/src/cxios_impl.hpp

    r346 r352  
    44#include "xmlioserver_spl.hpp" 
    55#include "variable.hpp" 
    6 #include "object_template_impl.hpp" 
     6#include "object_template.hpp" 
     7#include "cxios.hpp" 
    78 
    89namespace xios 
  • XIOS/trunk/src/data_output.cpp

    r347 r352  
    11#include "data_output.hpp" 
    22 
    3 #include "attribute_template_impl.hpp" 
    4 #include "group_template_impl.hpp" 
     3#include "attribute_template.hpp" 
     4#include "group_template.hpp" 
    55#include "context.hpp" 
    66 
  • XIOS/trunk/src/functor.hpp

    r335 r352  
    5858} // namespace xios 
    5959 
    60 #include "functor_type.hpp" 
     60//#include "functor_type.hpp" 
    6161 
    6262#endif // __XMLIO_CFunctor__ 
  • XIOS/trunk/src/generate_fortran_interface.cpp

    r347 r352  
    11#include "xmlioserver.hpp" 
    2 #include "generate_interface_impl.hpp" 
     2#include "generate_interface.hpp" 
    33#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" 
    77 
    88int main (int argc, char ** argv, char ** UNUSED (env)) 
  • XIOS/trunk/src/generate_interface.hpp

    r335 r352  
    4242 
    4343  }; 
    44    
     44/*   
    4545  template<> string CInterface::getStrFortranType<int>(void) {return string("INTEGER") ;} 
    4646  template<> string CInterface::getStrFortranType<bool>(void) {return string("LOGICAL") ;} 
     
    6262  template<> bool CInterface::matchingTypeCFortran<double>(void) { return true; } 
    6363  template<> bool CInterface::matchingTypeCFortran<float>(void) { return true; } 
    64    
     64*/ 
    6565} 
    6666#endif 
  • XIOS/trunk/src/generate_interface_impl.hpp

    r347 r352  
    66#include "type_util.hpp" 
    77#include "indent.hpp" 
     8#include "array.hpp" 
    89 
    910namespace xios 
    1011{  
    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   
    1232 
    1333// ///////////////////////////////////////////////// 
     
    1535// ///////////////////////////////////////////////// 
    1636 
     37   
    1738  template <class T> 
    1839  void CInterface::AttributeCInterface(ostream& oss, const string& className,const string& name) 
  • XIOS/trunk/src/group_factory.hpp

    r335 r352  
    7474} // namespace xios 
    7575 
    76 #include "group_factory_impl.hpp" 
    77 #include "group_parser.hpp" 
     76//#include "group_factory_impl.hpp" 
     77//#include "group_parser.hpp" 
    7878 
    7979#endif // __XMLIO_CGroupFactory__ 
  • XIOS/trunk/src/group_factory_impl.hpp

    r347 r352  
    11#ifndef __XMLIO_CGroupFactory_impl__ 
    22#define __XMLIO_CGroupFactory_impl__ 
     3 
     4#include "group_factory.hpp" 
    35 
    46namespace xios 
     
    1416               << " pgroup or cgroup NULL !"); 
    1517      if (!cgroup->hasId()) 
    16          pgroup->groupList.insert(pgroup->groupList.end(), cgroup); 
     18         pgroup->groupList.insert(pgroup->groupList.end(), cgroup.get()); 
    1719      else 
    1820      { 
    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())); 
    2123      } 
    2224   } 
  • XIOS/trunk/src/group_template_impl.hpp

    r347 r352  
    44#include "xmlioserver_spl.hpp" 
    55#include "event_server.hpp" 
    6 #include "object_template_impl.hpp" 
     6#include "object_template.hpp" 
    77#include "group_template.hpp" 
    88#include "context.hpp" 
    99#include "event_client.hpp" 
    1010#include "context_client.hpp" 
     11#include "message.hpp" 
     12#include "type.hpp" 
     13#include "type_util.hpp" 
    1114 
    1215 
     
    238241         CGroupTemplate<U, V, W>::getGroupMap(void) const 
    239242   {  
    240       return (this->groupList); 
     243      return (this->groupMap); 
    241244   } 
    242245 
     
    351354   void CGroupTemplate<U, V, W>::addChild(U* child)  
    352355  { 
    353     return CGroupFactory::AddChild<V>(this->getShared,child->getShared()) ; 
     356    return CGroupFactory::AddChild<V>(this->getShared(),child->getShared()) ; 
    354357  } 
    355358   
     
    475478   } 
    476479 
     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   } 
    477549} // namespace xios 
    478550 
  • XIOS/trunk/src/interface/c/icaxis.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "icutil.hpp" 
    1515#include "timer.hpp" 
     16#include "axis.hpp" 
    1617 
    1718extern "C" 
  • XIOS/trunk/src/interface/c/iccontext.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "calendar_type.hpp" 
     
    1616#include "icutil.hpp" 
    1717#include "timer.hpp" 
     18#include "context.hpp" 
    1819 
    1920extern "C" 
  • XIOS/trunk/src/interface/c/icdata.cpp

    r347 r352  
    1212#include "oasis_cinterface.hpp" 
    1313 
    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" 
    1717 
    1818#include "icutil.hpp" 
     
    2020#include "client.hpp" 
    2121#include "field.hpp" 
    22 #include "field_impl.hpp" 
     22#include "context.hpp" 
    2323#include <mpi.h> 
    2424#include "timer.hpp" 
  • XIOS/trunk/src/interface/c/icdate.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "calendar_type.hpp" 
     
    1616#include "icutil.hpp" 
    1717#include "timer.hpp" 
     18#include "context.hpp" 
    1819 
    1920extern "C" 
  • XIOS/trunk/src/interface/c/icdomain.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "icutil.hpp" 
    1515#include "timer.hpp" 
     16#include "domain.hpp" 
    1617 
    1718extern "C" 
  • XIOS/trunk/src/interface/c/icfield.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "icutil.hpp" 
    1515#include "timer.hpp" 
     16#include "field.hpp" 
    1617 
    1718extern "C" 
  • XIOS/trunk/src/interface/c/icfile.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "icutil.hpp" 
    1515#include "timer.hpp" 
     16#include "file.hpp" 
    1617 
    1718extern "C" 
  • XIOS/trunk/src/interface/c/icgrid.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "icutil.hpp" 
    1515#include "timer.hpp" 
     16#include "grid.hpp" 
    1617 
    1718extern "C" 
  • XIOS/trunk/src/interface/c/icxml_tree.cpp

    r347 r352  
    88#include "xmlioserver.hpp" 
    99 
    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" 
    1313 
    1414#include "icutil.hpp" 
    1515#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" 
    1622 
    1723extern "C" 
  • XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "axis.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "axis.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "context.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "domain.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "domain.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icfield_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "field.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "field.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "file.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "file.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "grid.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp

    r347 r352  
    66#include <boost/shared_ptr.hpp> 
    77#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" 
    1111#include "icutil.hpp" 
    1212#include "timer.hpp" 
     13#include "grid.hpp" 
    1314 
    1415extern "C" 
  • XIOS/trunk/src/node/axis.cpp

    r351 r352  
    11#include "axis.hpp" 
    22 
    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" 
    69 
    710namespace xios { 
  • XIOS/trunk/src/node/context.cpp

    r347 r352  
    11#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" 
    55 
    66#include "calendar_type.hpp" 
     
    1111#include "nc4_data_output.hpp" 
    1212#include "node_type.hpp" 
     13#include "message.hpp" 
     14#include "type.hpp" 
     15#include "xmlioserver_spl.hpp" 
    1316 
    1417namespace xios { 
  • XIOS/trunk/src/node/context.hpp

    r347 r352  
    44/// xios headers /// 
    55#include "xmlioserver_spl.hpp" 
    6 #include "node_type.hpp" 
     6//#include "node_type.hpp" 
    77#include "calendar.hpp" 
    88 
     
    2424   class CContextAttributes; 
    2525   class CContext; 
    26    
     26   class CFile; 
    2727   ///-------------------------------------------------------------- 
    2828 
  • XIOS/trunk/src/node/domain.cpp

    r347 r352  
    11#include "domain.hpp" 
    22 
    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" 
    66 
    77#include "xmlioserver_spl.hpp" 
     
    99#include "event_server.hpp" 
    1010#include "buffer_in.hpp" 
     11#include "message.hpp" 
     12#include "type.hpp" 
     13#include "context.hpp" 
     14#include "context_client.hpp" 
    1115 
    1216namespace xios { 
  • XIOS/trunk/src/node/field.cpp

    r347 r352  
    11#include "field.hpp" 
    22 
    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" 
    66 
    77#include "node_type.hpp" 
    88#include "calendar_util.hpp" 
     9#include "message.hpp" 
     10#include "xmlioserver_spl.hpp" 
     11#include "type.hpp" 
     12#include "context_client.hpp" 
    913 
    1014namespace xios{ 
  • XIOS/trunk/src/node/file.cpp

    r347 r352  
    11#include "file.hpp" 
    22 
    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" 
    76#include "object_factory.hpp" 
    8 #include "object_factory_impl.hpp" 
    97#include "data_output.hpp" 
    108#include "context.hpp" 
     
    1311#include "calendar_util.hpp" 
    1412#include "date.hpp" 
    15  
     13#include "message.hpp" 
     14#include "type.hpp" 
     15#include "xmlioserver_spl.hpp" 
     16#include "context_client.hpp" 
    1617 
    1718namespace xios { 
  • XIOS/trunk/src/node/grid.cpp

    r351 r352  
    22#include "grid.hpp" 
    33 
    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" 
    78#include <iostream> 
     9#include "xmlioserver_spl.hpp" 
     10#include "type.hpp" 
     11#include "context.hpp" 
     12#include "context_client.hpp" 
    813 
    914namespace xios { 
  • XIOS/trunk/src/node/variable.cpp

    r347 r352  
    11#include "variable.hpp" 
    22 
    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" 
    76#include "object_factory.hpp" 
    8 #include "object_factory_impl.hpp" 
     7#include "xmlioserver_spl.hpp" 
     8#include "type.hpp" 
    99 
    1010namespace xios { 
  • XIOS/trunk/src/node/variable.hpp

    r345 r352  
    6464            template <typename T> inline T getData(void) const; 
    6565//            bool inline getData<bool>(void) const ; 
     66//            template <> getData<bool>(void) const ; 
    6667             
    6768            template <typename T, StdSize N> 
     
    8182      }; // class CVar 
    8283 
    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       
    8494      template <typename T> 
    85       T CVariable::getData(void) const 
     95      inline T CVariable::getData(void) const 
    8696      { 
    8797         T retval ; 
     
    94104      }  
    95105 
    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 
    105107      ///-------------------------------------------------------------- 
    106108 
  • XIOS/trunk/src/object_factory.hpp

    r335 r352  
    2424 
    2525         template <typename U> 
    26             static inline boost::shared_ptr<U> GetObject(const StdString & id); 
     26            static boost::shared_ptr<U> GetObject(const StdString & id); 
    2727 
    2828         template <typename U> 
    29             static inline boost::shared_ptr<U> GetObject(const StdString& context,const StdString & id); 
     29            static boost::shared_ptr<U> GetObject(const StdString& context,const StdString & id); 
    3030 
    3131         template <typename U> 
    32             static inline boost::shared_ptr<U> GetObject(const U * const object); 
     32            static boost::shared_ptr<U> GetObject(const U * const object); 
    3333 
    3434         template <typename U> 
    35             static inline int GetObjectNum(void); 
     35            static int GetObjectNum(void); 
    3636         template <typename U> 
    37             static inline int GetObjectIdNum(void); 
     37            static int GetObjectIdNum(void); 
    3838 
    3939         template <typename U> 
    40             static inline const std::vector<boost::shared_ptr<U> > & 
     40            static const std::vector<boost::shared_ptr<U> > & 
    4141               GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); 
    4242 
    4343         /// Tests /// 
    4444         template <typename U> 
    45             static inline bool HasObject(const StdString & id); 
     45            static bool HasObject(const StdString & id); 
    4646 
    4747         template <typename U> 
    48             static inline bool HasObject(const StdString& context,const StdString & id); 
     48            static bool HasObject(const StdString& context,const StdString & id); 
    4949 
    5050         /// Instanciateur /// 
    5151         template <typename U> 
    52             static inline boost::shared_ptr<U> CreateObject(const StdString & id = StdString("")); 
     52            static boost::shared_ptr<U> CreateObject(const StdString & id = StdString("")); 
    5353 
    54          template <typename U> static inline StdString GenUId(void) ;  
     54         template <typename U> static StdString GenUId(void) ;  
    5555 
    5656      private : 
     
    6262} // namespace xios 
    6363 
    64 #include "object_factory_impl.hpp" 
     64//#include "object_factory_impl.hpp" 
    6565 
    6666#endif // __XMLIO_CObjectFactory__ 
  • XIOS/trunk/src/object_factory_impl.hpp

    r335 r352  
    11#ifndef __XMLIO_CObjectFactory_impl__ 
    22#define __XMLIO_CObjectFactory_impl__ 
     3 
     4#include "object_factory.hpp" 
    35 
    46namespace xios 
  • XIOS/trunk/src/object_template_impl.hpp

    r347 r352  
    1515#include "message.hpp" 
    1616#include "type.hpp" 
     17#include "type_util.hpp" 
     18#include "group_template.hpp" 
    1719 
    1820namespace xios 
     
    314316     oss<<"#include <boost/shared_ptr.hpp>"<<iendl ; 
    315317     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 ; 
    319321     oss<<"#include \"icutil.hpp\""<<iendl ; 
    320322     oss<<"#include \"timer.hpp\""<<iendl ; 
  • XIOS/trunk/src/output/nc4_data_output.cpp

    r351 r352  
    33 
    44#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" 
    77 
    88#include "file.hpp" 
  • XIOS/trunk/src/output/nc4_data_output.hpp

    r347 r352  
    8181                                     const StdString & units, 
    8282                                     const StdString & nav_model); 
     83/* 
    8384            template <class T> 
    8485               void writeAxisData(const StdString & axis_name, 
     
    8788                                  const std::vector<StdSize> * start = NULL, 
    8889                                  const std::vector<StdSize> * count = NULL); 
    89  
     90*/ 
    9091         private : 
    9192 
  • XIOS/trunk/src/output/onetcdf4.cpp

    r350 r352  
    11#include "onetcdf4.hpp" 
    2 #include "group_template_impl.hpp" 
     2#include "group_template.hpp" 
    33 
    44namespace xios 
  • XIOS/trunk/src/output/onetcdf4.hpp

    r347 r352  
    126126      ///--------------------------------------------------------------- 
    127127            
    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; 
    138128 
    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->getWriteDataInfos 
    145          (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_size 
    151                   << " ] 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          else 
    171             CheckError(nc_def_var_fill(grpid, varid, 1, NULL));          
    172       } 
    173       
    174       ///--------------------------------------------------------------- 
    175129 
    176130} // namespace xios 
  • XIOS/trunk/src/server.cpp

    r347 r352  
    44#include "type.hpp" 
    55#include "context.hpp" 
    6 #include "object_template_impl.hpp" 
     6#include "object_template.hpp" 
    77#include "oasis_cinterface.hpp" 
    88#include <boost/functional/hash.hpp> 
  • XIOS/trunk/src/test/test_xios.cpp

    r346 r352  
    11#include "xmlioserver.hpp" 
    2 #include "attribute_template_impl.hpp" 
     2#include "attribute_template.hpp" 
    33#include "buffer_out.hpp" 
    44#include "buffer_in.hpp" 
     
    1010#include "context_client.hpp" 
    1111#include "context_server.hpp" 
    12 #include "object_template_impl.hpp" 
     12#include "object_template.hpp" 
    1313#include <mpi.h> 
    1414 
  • XIOS/trunk/src/type/type.hpp

    r335 r352  
    4141  } ; 
    4242 
     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   
    4375} 
    4476 
    45 #include "type_impl.hpp" 
    46 #include "type_specialisation.hpp" 
     77 
     78//#include "type_impl.hpp" 
     79//#include "type_specialisation.hpp" 
    4780 
    4881#endif 
  • XIOS/trunk/src/type/type_impl.hpp

    r335 r352  
    77#include "buffer_out.hpp" 
    88#include "message.hpp" 
     9#include "type.hpp" 
    910 
    1011 
  • XIOS/trunk/src/type/type_util.hpp

    r345 r352  
    1616    class CFileGroup; 
    1717    class CContext; 
    18  
     18    class CContextGroup; 
     19    class CVariable ; 
     20    class CVariableGroup ; 
    1921         
    20   template <typename T> 
    21   inline string getStrType(void) ; 
     22  template <typename T> inline string getStrType(void) ; 
    2223     
    2324#define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T) ; } 
     
    5051  macro(CFileGroup) 
    5152  macro(CContext) 
     53  macro(CContextGroup) 
     54  macro(CVariable) 
     55  macro(CVariableGroup) 
    5256   
     57  
    5358#undef macro 
    5459 
  • XIOS/trunk/src/xml_parser.cpp

    r347 r352  
    33#include "context.hpp" 
    44 
    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" 
    88 
    99namespace xios 
  • XIOS/trunk/src/xml_parser.hpp

    r335 r352  
    2121            static void ParseStream(StdIStream & stream); 
    2222            template <class T> 
    23                static inline void ParseInclude(StdIStream & stream, T & object); 
     23               static void ParseInclude(StdIStream & stream, T & object); 
    2424 
    2525      }; //class CXMLParser 
    26  
     26/* 
    2727      template <class T> 
    2828         void CXMLParser::ParseInclude(StdIStream & stream, T& object) 
     
    4545         } 
    4646      } 
    47  
     47*/ 
    4848   }// namespace xml 
    4949} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.