ivl 679
|
00001 /* This file is part of the ivl C++ library <http://image.ntua.gr/ivl>. 00002 A C++ template library extending syntax towards mathematical notation. 00003 00004 Copyright (C) 2012 Yannis Avrithis <iavr@image.ntua.gr> 00005 Copyright (C) 2012 Kimon Kontosis <kimonas@image.ntua.gr> 00006 00007 ivl is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU Lesser General Public License 00009 version 3 as published by the Free Software Foundation. 00010 00011 Alternatively, you can redistribute it and/or modify it under the terms 00012 of the GNU General Public License version 2 as published by the Free 00013 Software Foundation. 00014 00015 ivl is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 See the GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 and a copy of the GNU Lesser General Public License along 00022 with ivl. If not, see <http://www.gnu.org/licenses/>. */ 00023 00024 #ifndef IVL_ARRAY_DETAILS_COMMON_CONVERSIONS_ARRAY_COMMON_HPP 00025 #define IVL_ARRAY_DETAILS_COMMON_CONVERSIONS_ARRAY_COMMON_HPP 00026 00027 namespace ivl { 00028 00029 namespace array_details { 00030 00031 00032 template <class T, class OPTS, class BASE_ARRAY> 00033 class conversions_array_common 00034 : public BASE_ARRAY 00035 { 00036 private: 00037 typedef BASE_ARRAY base_array; 00038 00039 typedef typename base_array::data_type prv_data_type; 00040 00041 typedef typename base_array::derived_type prv_derived_type; 00042 00043 typedef typename data::conversion<prv_data_type>::array_creation create_ar; 00044 00045 typedef typename data::conversion<prv_data_type>:: 00046 array_nd_creation create_nd; 00047 00048 typedef typename data::conversion< 00049 prv_data_type>::derived_creation create_dv; 00050 00051 00052 00053 public: 00054 00055 typedef array<T, typename create_ar::new_type> new_array; 00056 00057 typedef array<T, typename create_ar::similar_type> similar_array; 00058 00059 typedef typename types:: 00060 change_data_class_set< 00061 //types::t_if<types::is_array_nd<derived_type>, 00062 // typename create_nd::new_type, derived_type>::type, 00063 typename create_dv::new_type, prv_derived_type 00064 //>::type 00065 >::type create_new; 00066 00067 typedef typename types:: 00068 change_data_class_set< 00069 //types::t_if<types::is_array_nd<derived_type>, 00070 // typename create_nd::similar_type, derived_type>::type, 00071 typename create_dv::similar_type, prv_derived_type 00072 //>::type 00073 >::type create_similar; 00074 00075 00076 }; 00077 00078 } /* namespace array_details */ 00079 00080 } /* namespace ivl */ 00081 00082 #endif // IVL_ARRAY_DETAILS_COMMON_CONVERSIONS_ARRAY_COMMON_HPP