aimstil  5.0.5
PointerTraits.h
Go to the documentation of this file.
1 #ifndef TIL_POINTER_TRAITS_H
2 #define TIL_POINTER_TRAITS_H
3 
4 // includes from TIL library
5 #include "til/til_declarations.h"
6 #include "til/ImageBase.h"
7 
8 namespace til {
9 
11  template < typename Pointer >
12  struct PointerTraits {};
13 
14  /*
16  template < typename T >
17  struct PointerTraits<ConstPtr<T> >
18  {
19  typedef T DataType;
20  static const bool is_const = true;
21  };
22 
24  template < typename T >
25  struct PointerTraits<Ptr<T> >
26  {
27  typedef T DataType;
28  static const bool is_const = false;
29  };
30  */
31  /*
33  template < typename TImage >
34  struct PointerTraits<typename Iterator<TImage>::Linear>
35  {
36  typedef typename Iterator<TImage>::Linear::value_type TData;
37  static const bool is_const = false;
38  };
39 
41  template < typename TImage >
42  struct PointerTraits<typename Iterator<TImage>::ConstLinear>
43  {
44  typedef typename Iterator<TImage>::ConstLinear::value_type TData;
45  static const bool is_const = true;
46  };
47 
49  template < typename TImage >
50  struct PointerTraits<typename Iterator<TImage>::Volumetric>
51  {
52  typedef typename Iterator<TImage>::Volumetric::value_type TData;
53  static const bool is_const = false;
54  };
55 
57  template < typename TImage>
58  struct PointerTraits<typename Iterator<TImage>::ConstVolumetric>
59  {
60  typedef typename Iterator<TImage>::ConstVolumetric::value_type TData;
61  static const bool is_const = true;
62  };
63  */
64 
66  template < typename T >
67  struct PointerTraits<const T*>
68  {
69  typedef T DataType;
70  static const bool is_const = true;
71  };
72 
74  template < typename T >
75  struct PointerTraits<T*>
76  {
77  typedef T DataType;
78  static const bool is_const = false;
79  };
80 }
81 
82 #endif
83 
84 
Belongs to package Box Do not include directly, include til/Box.h instead.
Definition: Accumulator.h:10
This file contains forward declarations of classes defined in the TIL library.
Pointer traits.
Definition: labelClasses.h:25