ViennaGrid - The Vienna Grid Library  2.1.0
viennagrid/storage/forwards.hpp
Go to the documentation of this file.
00001 #ifndef VIENNAGRID_STORAGE_FORWARDS_HPP
00002 #define VIENNAGRID_STORAGE_FORWARDS_HPP
00003 
00004 /* =======================================================================
00005    Copyright (c) 2011-2014, Institute for Microelectronics,
00006                             Institute for Analysis and Scientific Computing,
00007                             TU Wien.
00008 
00009                             -----------------
00010                      ViennaGrid - The Vienna Grid Library
00011                             -----------------
00012 
00013    License:      MIT (X11), see file LICENSE in the base directory
00014 ======================================================================= */
00015 
00016 #include "viennagrid/meta/typemap.hpp"
00017 
00022 namespace viennagrid
00023 {
00030   template<typename BaseT>
00031   struct smart_id_tag;
00032 
00038   template<typename BaseT, typename BaseIDT>
00039   class smart_id;
00040 
00041 
00042   // handles
00043 
00045   struct no_handle_tag {};
00047   struct pointer_handle_tag {};
00049   struct id_handle_tag {};
00051   struct iterator_handle_tag {};
00052 
00053 
00054   // container
00056   struct default_tag;
00057 
00059   struct std_vector_tag;
00061   struct std_deque_tag;
00063   struct std_list_tag;
00064 
00065   struct id_compare_tag;
00066 
00068   template<typename compare_tag = default_tag>
00069   struct std_set_tag;
00070 //     /** @brief A tag indicating that std::set with ID compare is used as a container */
00071 //     struct std_id_set_tag;
00073   struct std_map_tag;
00074 
00079   template<int SizeV>
00080   struct static_array_tag
00081   {
00082     static const int size = SizeV;
00083   };
00084 
00085 
00086 
00088   typedef viennagrid::make_typemap<
00089       default_tag,
00090       std_deque_tag
00091   >::type default_container_config;
00092 
00094   typedef viennagrid::make_typemap<
00095       default_tag,
00096       std_set_tag<id_compare_tag>
00097   >::type default_view_container_config;
00098 
00099 
00105   template<typename ContainerTagT, typename HandleTagT>
00106   struct handled_container_tag
00107   {
00108     typedef ContainerTagT   container_tag;
00109     typedef HandleTagT      handle_tag;
00110   };
00111 
00112   namespace result_of
00113   {
00115     template <typename ContainerTag, typename HandleTag>
00116     struct handled_container
00117     {
00118         typedef handled_container_tag<ContainerTag, HandleTag>   tag;
00119     };
00121   }
00122 }
00123 
00124 #endif