ivl 679
ivl/details/core/types/identifier.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_TYPES_IDENTIFIER_HPP
00025 #define IVL_CORE_DETAILS_TYPES_IDENTIFIER_HPP
00026 
00027 namespace ivl {
00028 namespace types {
00029 
00030 //These are also called 'hidden tags'.
00031 //They are base classes of other classes that need to be identified as
00032 // something. The classes that do have one of these base classes are
00033 // considered to have the actual 'hidden tag'. It is like having
00034 // a tag with typedef, like the iterators case, however, not all classes
00035 // must have a typedef to conform with any specs.
00036 // Instead the hidden tag is searched to see if it is a base class of
00037 // the questioned class, by using a boost-like technique involving
00038 // a conversion operator, inheritance and sizeof combination trick.
00039 // this check is made by the types::is_base_of<> class.
00040 
00041 struct scalar_identifier { };
00042 
00043 struct copyscalar_identifier { };
00044 
00045 struct array_identifier { };
00046 
00047 struct array_is_referer_identifier { };
00048 
00049 //struct subreference_identifier { }; //to be removed
00050 
00051 struct pointer_based_iterator_identifier { }; // note: care because this tag
00052 // may coexist with pointer_range_based_iterator_identifier tag in which case
00053 // only the latter is valid.
00054 struct pointer_range_based_iterator_identifier { };
00055 struct ivl_array_reference_based_iterator_identifier { };
00056 struct past_end_capable_iterator_identifier { };
00057 
00058 // it is a tag for iterators that tells us that iterator::iter_border_walker
00059 // is defined. otherwise ptrdiff_t is presumed.
00060 struct border_walker_iterator_identifier { };
00061 // tag to disable border_walker_iterator_identifier on child classes.
00062 struct no_border_walker_iterator_identifier { };
00063 
00064 // it is a tag for iterators that tells us that iterator::iter_nd_border_walker
00065 // is defined. otherwise ptrdiff_t is presumed.
00066 struct nd_border_walker_iterator_identifier { };
00067 
00068 
00069 struct rvalue_identifier { };
00070 
00071 // tag loop with write-write option
00072 struct loop_ww_identifier { };
00073 
00074 // tag to detect all the types of array that have the default implementation
00075 template <class A>
00076 struct normal_array_identifier { };
00077 
00078 } /* namespace types */
00079 } /* namespace ivl */
00080 
00081 #endif // IVL_CORE_DETAILS_TYPES_IDENTIFIER_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations