1 /*==========================================================================
2 SeqAn - The Library for Sequence Analysis
4 ============================================================================
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 3 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 ============================================================================
18 $Id: basic_pointer.h,v 1.1 2008/08/25 16:20:01 langmead Exp $
19 ==========================================================================*/
21 #ifndef SEQAN_HEADER_BASIC_POINTER_H
22 #define SEQAN_HEADER_BASIC_POINTER_H
24 namespace SEQAN_NAMESPACE_MAIN
27 //////////////////////////////////////////////////////////////////////////////
29 //////////////////////////////////////////////////////////////////////////////
31 ///.Metafunction.Value.param.T.type:Adaption.char array
33 template <typename TValue>
34 struct Value< TValue * >
38 template <typename TValue>
39 struct Value< TValue * const>
44 //The next two metafunctions dont work in VC++ due to a compiler bug.
45 //(the default implementation in common_type.h is called instead)
46 //work-around: convert arrays to pointers.
47 template <typename TValue, size_t SIZE>
48 struct Value< TValue [SIZE] >
52 template <typename TValue, size_t SIZE>
53 struct Value< TValue const [SIZE] >
55 typedef TValue const Type;
58 //////////////////////////////////////////////////////////////////////////////
60 ///.Metafunction.Iterator.param.T.type:Adaption.char array
62 template <typename TValue>
63 struct Iterator< TValue *, Standard>
65 typedef TValue * Type;
67 template <typename TValue>
68 struct Iterator< TValue * const, Standard>
70 typedef TValue * Type;
73 //____________________________________________________________________________
75 template <typename TValue, size_t SIZE>
76 struct Iterator< TValue [SIZE], Standard>:
77 Iterator<TValue *, Standard>
80 template <typename TValue, size_t SIZE>
81 struct Iterator< TValue const [SIZE], Standard>:
82 Iterator<TValue const *, Standard>
86 template <typename TValue, size_t SIZE>
87 struct Iterator< TValue [SIZE], Rooted>:
88 Iterator<TValue *, Rooted>
91 template <typename TValue, size_t SIZE>
92 struct Iterator< TValue const [SIZE], Rooted>:
93 Iterator<TValue const *, Rooted>
100 //////////////////////////////////////////////////////////////////////////////
101 }// namespace SEQAN_NAMESPACE_MAIN
103 #endif //#ifndef SEQAN_HEADER_...