ViennaGrid - The Vienna Grid Library  2.1.0
viennagrid/config/config.hpp
Go to the documentation of this file.
00001 #ifndef VIENNAGRID_CONFIG_HPP
00002 #define VIENNAGRID_CONFIG_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 #include "viennagrid/storage/forwards.hpp"
00018 #include "../meta/utils.hpp"
00019 
00024 namespace viennagrid
00025 {
00026   namespace config
00027   {
00029     struct element_id_tag;
00031     struct element_container_tag;
00033     struct element_boundary_storage_layout_tag;
00035     struct element_appendix_type_tag;
00036 
00038     struct id_generator_tag;
00040     struct continuous_id_generator_tag;
00041 
00043     struct coboundary_container_tag;
00045     struct coboundary_view_container_tag;
00046 
00048     struct neighbor_container_tag;
00050     struct neighbor_view_container_tag;
00051 
00053     struct boundary_information_container_tag;
00054 
00056     struct interface_information_container_tag;
00057 
00059     struct vector_type_tag;
00060 
00062     struct mesh_change_counter_tag;
00063 
00064 
00065     namespace result_of
00066     {
00074       template<typename WrappedConfigT, typename DefaultT,
00075                 typename SearchTag0T = viennagrid::null_type, typename SearchTag1T = viennagrid::null_type, typename SearchTag2T = viennagrid::null_type,
00076                 typename SearchTag3T = viennagrid::null_type, typename SearchTag4T = viennagrid::null_type, typename SearchTag5T = viennagrid::null_type,
00077                 typename SearchTag6T = viennagrid::null_type, typename SearchTag7T = viennagrid::null_type, typename SearchTag8T = viennagrid::null_type,
00078                 typename SearchTag9T = viennagrid::null_type>
00079       struct query
00080       {
00081         typedef typename query<typename WrappedConfigT::type, DefaultT,
00082                 SearchTag0T, SearchTag1T, SearchTag2T, SearchTag3T, SearchTag4T, SearchTag5T, SearchTag6T, SearchTag7T, SearchTag8T, SearchTag9T>::type type;
00083       };
00084 
00085       template<typename DefaultT, typename SearchTag0T, typename SearchTag1T, typename SearchTag2T, typename SearchTag3T, typename SearchTag4T,
00086                               typename SearchTag5T, typename SearchTag6T, typename SearchTag7T, typename SearchTag8T, typename SearchTag9T>
00087       struct query<viennagrid::not_found, DefaultT, SearchTag0T, SearchTag1T, SearchTag2T, SearchTag3T, SearchTag4T,
00088                                                                               SearchTag5T, SearchTag6T, SearchTag7T, SearchTag8T, SearchTag9T>
00089       {
00090         typedef DefaultT type;
00091       };
00092 
00093 
00094 
00095       template<typename HeadT, typename TailT, typename DefaultT, typename SearchTag0T, typename SearchTag2T, typename SearchTag3T, typename SearchTag4T,
00096                               typename SearchTag5T, typename SearchTag6T, typename SearchTag7T, typename SearchTag8T, typename SearchTag9T>
00097       struct query<viennagrid::typelist<HeadT, TailT>, DefaultT, SearchTag0T, viennagrid::null_type, SearchTag2T, SearchTag3T, SearchTag4T,
00098                                                           SearchTag5T, SearchTag6T, SearchTag7T, SearchTag8T, SearchTag9T>
00099       {
00100         typedef viennagrid::typelist<HeadT, TailT> ConfigType;
00101         typedef typename viennagrid::detail::result_of::lookup<ConfigType, SearchTag0T>::type EntryType;
00102         typedef typename viennagrid::detail::IF<
00103             viennagrid::detail::EQUAL<EntryType, viennagrid::not_found>::value,
00104             DefaultT,
00105             EntryType>::type type;
00106       };
00107 
00108 
00109       template<typename HeadT, typename TailT, typename DefaultT>
00110       struct query<viennagrid::typelist<HeadT, TailT>, DefaultT,
00111           viennagrid::null_type, viennagrid::null_type, viennagrid::null_type, viennagrid::null_type, viennagrid::null_type,
00112           viennagrid::null_type, viennagrid::null_type, viennagrid::null_type, viennagrid::null_type, viennagrid::null_type>
00113       {
00114         typedef DefaultT type;
00115       };
00116 
00117 
00118       template<typename HeadT, typename TailT, typename DefaultT,
00119                 typename SearchTag0T, typename SearchTag1T, typename SearchTag2T,
00120                 typename SearchTag3T, typename SearchTag4T, typename SearchTag5T,
00121                 typename SearchTag6T, typename SearchTag7T, typename SearchTag8T,
00122                 typename SearchTag9T>
00123       struct query<viennagrid::typelist<HeadT, TailT>, DefaultT,
00124                    SearchTag0T, SearchTag1T, SearchTag2T, SearchTag3T, SearchTag4T, SearchTag5T, SearchTag6T, SearchTag7T, SearchTag8T, SearchTag9T>
00125       {
00126         typedef viennagrid::typelist<HeadT, TailT> ConfigT;
00127         typedef typename viennagrid::detail::result_of::lookup<ConfigT, SearchTag0T>::type EntryType;
00128         typedef typename query<
00129               EntryType, DefaultT,
00130               SearchTag1T, SearchTag2T, SearchTag3T, SearchTag4T, SearchTag5T, SearchTag6T, SearchTag7T, SearchTag8T, SearchTag9T
00131             >::type type;
00132       };
00133 
00135     }
00136   }
00137 
00138 }
00139 
00140 
00141 #endif