Ignore:
Timestamp:
06/13/18 16:48:53 (6 years ago)
Author:
oabramkina
Message:

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File:
1 edited

Legend:

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

    r591 r1542  
    11#ifndef __XIOS_CGroupFactory__ 
    22#define __XIOS_CGroupFactory__ 
    3  
    4 /// boost headers /// 
    5 #include <boost/shared_ptr.hpp> 
    63 
    74/// XIOS headers /// 
     
    2320 
    2421         template <typename U> 
    25             static void AddGroup(boost::shared_ptr<U> pgroup, 
    26                                         boost::shared_ptr<U> cgroup); 
     22            static void AddGroup(std::shared_ptr<U> pgroup, 
     23                                        std::shared_ptr<U> cgroup); 
    2724 
    2825         template <typename U> 
    29             static void AddChild(boost::shared_ptr<U> group, 
    30                                         boost::shared_ptr<typename U::RelChild> child); 
     26            static void AddChild(std::shared_ptr<U> group, 
     27                                        std::shared_ptr<typename U::RelChild> child); 
    3128 
    3229         /// Accesseurs /// 
     
    3431 
    3532         template <typename U> 
    36             static boost::shared_ptr<U> 
    37                GetGroup(boost::shared_ptr<U> group, const StdString & id); 
     33            static std::shared_ptr<U> 
     34               GetGroup(std::shared_ptr<U> group, const StdString & id); 
    3835 
    3936         template <typename U> 
    40             static boost::shared_ptr<typename U::RelChild> 
    41                GetChild(boost::shared_ptr<U> group, const StdString & id); 
     37            static std::shared_ptr<typename U::RelChild> 
     38               GetChild(std::shared_ptr<U> group, const StdString & id); 
    4239 
    4340         template <typename U> 
    44             static int GetGroupNum(boost::shared_ptr<U> group); 
     41            static int GetGroupNum(std::shared_ptr<U> group); 
    4542         template <typename U> 
    46             static int GetGroupIdNum(boost::shared_ptr<U> group); 
     43            static int GetGroupIdNum(std::shared_ptr<U> group); 
    4744         template <typename U> 
    48             static int GetChildNum(boost::shared_ptr<U> group); 
     45            static int GetChildNum(std::shared_ptr<U> group); 
    4946         template <typename U> 
    50             static int GetChildIdNum(boost::shared_ptr<U> group); 
     47            static int GetChildIdNum(std::shared_ptr<U> group); 
    5148 
    5249         /// Tests /// 
    5350         template <typename U> 
    54             static bool HasGroup(boost::shared_ptr<U> group, const StdString & id); 
     51            static bool HasGroup(std::shared_ptr<U> group, const StdString & id); 
    5552 
    5653         template <typename U> 
    57             static bool HasChild(boost::shared_ptr<U> group, const StdString & id); 
     54            static bool HasChild(std::shared_ptr<U> group, const StdString & id); 
    5855 
    5956         /// Instanciateur /// 
    6057         template <typename U> 
    61             static boost::shared_ptr<U> 
    62                CreateGroup(boost::shared_ptr<U> group, const StdString & id = StdString("")); 
     58            static std::shared_ptr<U> 
     59               CreateGroup(std::shared_ptr<U> group, const StdString & id = StdString("")); 
    6360 
    6461         template <typename U> 
    65             static boost::shared_ptr<typename U::RelChild> 
    66                CreateChild(boost::shared_ptr<U> group, const StdString & id = StdString("")); 
     62            static std::shared_ptr<typename U::RelChild> 
     63               CreateChild(std::shared_ptr<U> group, const StdString & id = StdString("")); 
    6764 
    6865      private : 
Note: See TracChangeset for help on using the changeset viewer.