ivl 679
ivl/details/core/data/data_array_nd.hpp
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_CORE_DETAILS_DATA_DATA_ARRAY_ND_HPP
00025 #define IVL_CORE_DETAILS_DATA_DATA_ARRAY_ND_HPP
00026 
00027 
00028 namespace ivl {
00029 
00030 namespace data {
00031 
00032 template <class DT = types::term>
00033 struct normal_2d
00034 : public data_type_base<normal_2d<DT> >
00035 {
00036         typedef seq_optimal_tag optimal_access_tag;
00037         typedef types::t_true has_random_access;
00038         typedef types::t_true is_writeable;
00039         typedef types::t_true is_createable;
00040         typedef types::t_true is_resizeable;
00041         typedef types::t_true has_c_ptr;
00042         typedef types::t_true is_linear;
00043         typedef types::t_false has_specialized_iter;
00044         typedef types::t_false is_referencing_array;
00045         typedef types::number<10> optimal_access_cost;
00046 };
00047 
00048 template <int N = 0, class DT = types::term>
00049 struct normal_image
00050 : public data_type_base<normal_image<N, DT> >
00051 {
00052         typedef seq_optimal_tag optimal_access_tag;
00053         typedef types::t_true has_random_access;
00054         typedef types::t_true is_writeable;
00055         typedef types::t_true is_createable;
00056         typedef types::t_true is_resizeable;
00057         typedef types::t_true has_c_ptr;
00058         typedef types::t_true is_linear;
00059         typedef types::t_false has_specialized_iter;
00060         typedef types::t_false is_referencing_array;
00061         typedef types::number<10> optimal_access_cost;
00062         enum { Ch = N };
00063 };
00064 
00065 template <int N, class DT>
00066 struct get_image_channels<normal_image<N, DT> >
00067 {
00068         typedef types::number<N> type;
00069 };
00070 
00071 } //namespace data
00072 
00073 typedef data::normal_2d<> normal_2d;
00074 typedef data::normal_image<> normal_image;
00075 
00076 } //namespace ivl
00077 
00078 
00079 
00080 #endif // IVL_CORE_DETAILS_DATA_DATA_ARRAY_ND_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations