SimpleITK  2.0.0
sitkMemberFunctionFactoryBase.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkMemberFunctionFactoryBase_h
19 #define sitkMemberFunctionFactoryBase_h
20 
21 #include "sitkConfigure.h"
22 #include "sitkPixelIDTypes.h"
23 #include "sitkPixelIDTypeLists.h"
24 #include "sitkMacro.h"
25 #include "sitkNonCopyable.h"
26 
27 #include "Ancillary/TypeList.h"
28 #include "Ancillary/FunctionTraits.h"
29 
30 #include <unordered_map>
31 #include <functional>
32 #include <tuple>
33 
34 namespace itk
35 {
36 namespace simple
37 {
38 
39 // this namespace is internal and not part of the external simple ITK interface
40 namespace detail {
41 
42 // make hash function available in current name space to take priority
43 
44 template <typename T> struct hash : public std::hash<T>{};
45 
47 template<typename T>
48 inline void hash_combine(std::size_t& seed, const T& val)
49 {
50  // Code from boost
51  // Reciprocal of the golden ratio helps spread entropy
52  // and handles duplicates.
53  std::hash<T> hasher;
54  seed ^= hasher(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
55 }
56 
57 template<typename S, typename T>
58 struct hash<std::pair<S, T>>
59 {
60  inline size_t operator()(const std::pair<S, T>& val) const
61  {
62  size_t seed = 0;
63  hash_combine(seed, val.first);
64  hash_combine(seed, val.second);
65  return seed;
66  }
67 };
68 
69 template<class... TupleArgs>
70 struct hash<std::tuple<TupleArgs...>>
71 {
72 private:
73  // recursive hashing of std::tuple from Sarang Baheti's blog
74  // https://www.variadic.xyz/2018/01/15/hashing-stdpair-and-stdtuple/
75  template<size_t Idx, typename... TupleTypes>
76  inline typename std::enable_if<Idx == sizeof...(TupleTypes), void>::type
77  hash_combine_tup(size_t&, const std::tuple<TupleTypes...>&) const {}
78 
79  template<size_t Idx, typename... TupleTypes>
80  inline typename std::enable_if<Idx < sizeof...(TupleTypes), void>::type
81  hash_combine_tup(size_t& seed, const std::tuple<TupleTypes...>& tup) const
82  {
83  hash_combine(seed, std::get<Idx>(tup));
84 
85  // on to next element
86  hash_combine_tup<Idx+1>(seed, tup);
87  }
88 
89 public:
90  size_t operator()(std::tuple<TupleArgs...> tupleValue) const
91  {
92  size_t seed = 0;
93  hash_combine_tup<0>(seed, tupleValue);
94  return seed;
95  }
96 };
97 
98 
99 template< typename TMemberFunctionPointer,
100  typename TKey,
101  unsigned int TArity = ::detail::FunctionTraits<TMemberFunctionPointer>::arity>
103 
104 
111 template< typename TMemberFunctionPointer, typename TKey>
112 class MemberFunctionFactoryBase<TMemberFunctionPointer, TKey, 0> :
113  protected NonCopyable
114 {
115 protected:
116 
117  using MemberFunctionType = TMemberFunctionPointer;
118  using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
119  using MemberFunctionResultType = typename ::detail::FunctionTraits<MemberFunctionType>::ResultType;
120 
121 
123  : m_PFunction( 3*typelist::Length<InstantiatedPixelIDTypeList>::Result )
124  { }
125 
126 public:
127 
130  using FunctionObjectType = std::function< MemberFunctionResultType ( ) >;
131 
132 
133 protected:
134 
135  using KeyType = TKey;
136 
142  {
143 
144  // this is really only needed because std::bind1st does not work
145  // with tr1::function... that is with tr1::bind, we need to
146  // specify the other arguments, and can't just bind the first
147  return std::bind( pfunc,objectPointer );
148  }
149 
150  using FunctionMapType = std::unordered_map< TKey, FunctionObjectType, hash<TKey> >;
151 
152  // maps of Keys to pointers to member functions
154 
155 
156 };
157 
158 
165 template< typename TMemberFunctionPointer, typename TKey>
166 class MemberFunctionFactoryBase<TMemberFunctionPointer, TKey, 1> :
167  protected NonCopyable
168 {
169 protected:
170 
171  using MemberFunctionType = TMemberFunctionPointer;
172  using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
173  using MemberFunctionResultType = typename ::detail::FunctionTraits<MemberFunctionType>::ResultType;
174  using MemberFunctionArgumentType = typename ::detail::FunctionTraits<MemberFunctionType>::Argument0Type;
175 
176 
178  : m_PFunction( 3 * typelist::Length<InstantiatedPixelIDTypeList>::Result )
179  { }
180 
181 public:
182 
186 
187 
188 protected:
189 
190  using KeyType = TKey;
191 
197  {
198  // needed for _1 place holder
199  using namespace std::placeholders;
200 
201  // this is really only needed because std::bind1st does not work
202  // with tr1::function... that is with tr1::bind, we need to
203  // specify the other arguments, and can't just bind the first
204  return std::bind( pfunc,objectPointer, _1 );
205  }
206 
207 
208  using FunctionMapType = std::unordered_map< TKey, FunctionObjectType, hash<TKey> >;
209 
210  // maps of Keys to pointers to member functions
212 
213 };
214 
215 
216 template< typename TMemberFunctionPointer, typename TKey>
217 class MemberFunctionFactoryBase<TMemberFunctionPointer, TKey, 2> :
218  protected NonCopyable
219 {
220 protected:
221 
222  using MemberFunctionType = TMemberFunctionPointer;
223  using MemberFunctionResultType = typename ::detail::FunctionTraits<MemberFunctionType>::ResultType;
224  using MemberFunctionArgument0Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument0Type;
225  using MemberFunctionArgument1Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument1Type;
226  using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
227 
228 
230  : m_PFunction( 3 * typelist::Length<InstantiatedPixelIDTypeList>::Result )
231  { }
232 
233 public:
234 
239 
240 
241 protected:
242 
243  using KeyType = TKey;
244 
250  {
251  // needed for _1 place holder
252  using namespace std::placeholders;
253 
254  // this is really only needed because std::bind1st does not work
255  // with tr1::function... that is with tr1::bind, we need to
256  // specify the other arguments, and can't just bind the first
257  return std::bind( pfunc, objectPointer, _1, _2 );
258  }
259 
260  using FunctionMapType = std::unordered_map< TKey, FunctionObjectType, hash<TKey> >;
261 
262  // maps of Keys to pointers to member functions
264 
265 };
266 
267 
268 template< typename TMemberFunctionPointer, typename TKey>
269 class MemberFunctionFactoryBase<TMemberFunctionPointer, TKey, 3> :
270  protected NonCopyable
271 {
272 protected:
273 
274  using MemberFunctionType = TMemberFunctionPointer;
275  using MemberFunctionResultType = typename ::detail::FunctionTraits<MemberFunctionType>::ResultType;
276  using MemberFunctionArgument0Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument0Type;
277  using MemberFunctionArgument1Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument1Type;
278  using MemberFunctionArgument2Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument2Type;
279  using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
280 
281 
283  : m_PFunction( 3 * typelist::Length<InstantiatedPixelIDTypeList>::Result )
284  { }
285 
286 public:
287 
291 
292 
293 protected:
294 
295  using KeyType = TKey;
296 
302  {
303  // needed for _1 place holder
304  using namespace std::placeholders;
305 
306  // this is really only needed because std::bind1st does not work
307  // with tr1::function... that is with tr1::bind, we need to
308  // specify the other arguments, and can't just bind the first
309  return std::bind( pfunc, objectPointer, _1, _2, _3 );
310  }
311 
312  using FunctionMapType = std::unordered_map< TKey, FunctionObjectType, hash<TKey> >;
313 
314  // maps of Keys to pointers to member functions
316 
317 };
318 
319 
320 template< typename TMemberFunctionPointer, typename TKey>
321 class MemberFunctionFactoryBase<TMemberFunctionPointer, TKey, 4> :
322  protected NonCopyable
323 {
324 protected:
325 
326  using MemberFunctionType = TMemberFunctionPointer;
327  using MemberFunctionResultType = typename ::detail::FunctionTraits<MemberFunctionType>::ResultType;
328  using MemberFunctionArgument0Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument0Type;
329  using MemberFunctionArgument1Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument1Type;
330  using MemberFunctionArgument2Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument2Type;
331  using MemberFunctionArgument3Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument3Type;
332  using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
333 
334 
336  : m_PFunction( 3 * typelist::Length<InstantiatedPixelIDTypeList>::Result )
337  { }
338 
339 public:
340 
344 
345 
346 protected:
347 
348  using KeyType = TKey;
349 
355  {
356  // needed for _1 place holder
357  using namespace std::placeholders;
358 
359  // this is really only needed because std::bind1st does not work
360  // with tr1::function... that is with tr1::bind, we need to
361  // specify the other arguments, and can't just bind the first
362  return std::bind( pfunc, objectPointer, _1, _2, _3, _4 );
363  }
364 
365  using FunctionMapType = std::unordered_map< TKey, FunctionObjectType, hash<TKey> >;
366 
367  // maps of Keys to pointers to member functions
369 
370 };
371 
372 template< typename TMemberFunctionPointer, typename TKey>
373 class MemberFunctionFactoryBase<TMemberFunctionPointer, TKey, 5> :
374  protected NonCopyable
375 {
376 protected:
377 
378  using MemberFunctionType = TMemberFunctionPointer;
379  using MemberFunctionResultType = typename ::detail::FunctionTraits<MemberFunctionType>::ResultType;
380  using MemberFunctionArgument0Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument0Type;
381  using MemberFunctionArgument1Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument1Type;
382  using MemberFunctionArgument2Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument2Type;
383  using MemberFunctionArgument3Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument3Type;
384  using MemberFunctionArgument4Type = typename ::detail::FunctionTraits<MemberFunctionType>::Argument4Type;
385  using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
386 
387 
389  : m_PFunction( 3 * typelist::Length<InstantiatedPixelIDTypeList>::Result )
390  { }
391 
392 public:
393 
396  typedef std::function< MemberFunctionResultType (
397  MemberFunctionArgument0Type,
398  MemberFunctionArgument1Type,
399  MemberFunctionArgument2Type,
400  MemberFunctionArgument3Type,
401  MemberFunctionArgument4Type ) >
403 
404 
405 protected:
406 
407  using KeyType = TKey;
408 
414  {
415  // needed for _1 place holder
416  using namespace std::placeholders;
417 
418  // this is really only needed because std::bind1st does not work
419  // with tr1::function... that is with tr1::bind, we need to
420  // specify the other arguments, and can't just bind the first
421  return std::bind( pfunc, objectPointer, _1, _2, _3, _4, _5 );
422  }
423 
424 
425  using FunctionMapType = std::unordered_map< TKey, FunctionObjectType, hash<TKey> >;
426 
427  // maps of Keys to pointers to member functions
429 
430 
431 };
432 
433 } // end namespace detail
434 } // end namespace simple
435 } // end namespace itk
436 
437 #endif // sitkMemberFunctionFactoryBase_h
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::MemberFunctionResultType
typename ::detail::FunctionTraits< MemberFunctionType >::ResultType MemberFunctionResultType
Definition: sitkMemberFunctionFactoryBase.h:173
itk::simple::detail::hash
Definition: sitkMemberFunctionFactoryBase.h:44
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::MemberFunctionArgument0Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument0Type MemberFunctionArgument0Type
Definition: sitkMemberFunctionFactoryBase.h:224
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::BindObject
static FunctionObjectType BindObject(MemberFunctionType pfunc, ObjectType *objectPointer)
Definition: sitkMemberFunctionFactoryBase.h:354
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::FunctionMapType
std::unordered_map< TKey, FunctionObjectType, hash< TKey > > FunctionMapType
Definition: sitkMemberFunctionFactoryBase.h:425
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::FunctionObjectType
std::function< MemberFunctionResultType(MemberFunctionArgument0Type, MemberFunctionArgument1Type, MemberFunctionArgument2Type) > FunctionObjectType
Definition: sitkMemberFunctionFactoryBase.h:290
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::MemberFunctionResultType
typename ::detail::FunctionTraits< MemberFunctionType >::ResultType MemberFunctionResultType
Definition: sitkMemberFunctionFactoryBase.h:223
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionType
TMemberFunctionPointer MemberFunctionType
Definition: sitkMemberFunctionFactoryBase.h:326
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::KeyType
TKey KeyType
Definition: sitkMemberFunctionFactoryBase.h:243
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::BindObject
static FunctionObjectType BindObject(MemberFunctionType pfunc, ObjectType *objectPointer)
Definition: sitkMemberFunctionFactoryBase.h:249
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::MemberFunctionFactoryBase
MemberFunctionFactoryBase()
Definition: sitkMemberFunctionFactoryBase.h:282
sitkNonCopyable.h
sitkPixelIDTypes.h
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::MemberFunctionArgument0Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument0Type MemberFunctionArgument0Type
Definition: sitkMemberFunctionFactoryBase.h:276
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::BindObject
static FunctionObjectType BindObject(MemberFunctionType pfunc, ObjectType *objectPointer)
Definition: sitkMemberFunctionFactoryBase.h:301
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::ObjectType
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
Definition: sitkMemberFunctionFactoryBase.h:226
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::m_PFunction
FunctionMapType m_PFunction
Definition: sitkMemberFunctionFactoryBase.h:315
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionArgument0Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument0Type MemberFunctionArgument0Type
Definition: sitkMemberFunctionFactoryBase.h:380
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::FunctionObjectType
std::function< MemberFunctionResultType(MemberFunctionArgument0Type, MemberFunctionArgument1Type) > FunctionObjectType
Definition: sitkMemberFunctionFactoryBase.h:238
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::ObjectType
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
Definition: sitkMemberFunctionFactoryBase.h:332
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::m_PFunction
FunctionMapType m_PFunction
Definition: sitkMemberFunctionFactoryBase.h:368
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionArgument3Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument3Type MemberFunctionArgument3Type
Definition: sitkMemberFunctionFactoryBase.h:383
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::BindObject
static FunctionObjectType BindObject(MemberFunctionType pfunc, ObjectType *objectPointer)
Definition: sitkMemberFunctionFactoryBase.h:413
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::MemberFunctionFactoryBase
MemberFunctionFactoryBase()
Definition: sitkMemberFunctionFactoryBase.h:122
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::MemberFunctionType
TMemberFunctionPointer MemberFunctionType
Definition: sitkMemberFunctionFactoryBase.h:171
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::MemberFunctionFactoryBase
MemberFunctionFactoryBase()
Definition: sitkMemberFunctionFactoryBase.h:177
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::FunctionObjectType
std::function< MemberFunctionResultType(MemberFunctionArgument0Type, MemberFunctionArgument1Type, MemberFunctionArgument2Type, MemberFunctionArgument3Type) > FunctionObjectType
Definition: sitkMemberFunctionFactoryBase.h:343
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionArgument2Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument2Type MemberFunctionArgument2Type
Definition: sitkMemberFunctionFactoryBase.h:382
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionArgument3Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument3Type MemberFunctionArgument3Type
Definition: sitkMemberFunctionFactoryBase.h:331
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::MemberFunctionType
TMemberFunctionPointer MemberFunctionType
Definition: sitkMemberFunctionFactoryBase.h:222
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::MemberFunctionType
TMemberFunctionPointer MemberFunctionType
Definition: sitkMemberFunctionFactoryBase.h:117
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::m_PFunction
FunctionMapType m_PFunction
Definition: sitkMemberFunctionFactoryBase.h:211
itk::simple::detail::hash< std::pair< S, T > >::operator()
size_t operator()(const std::pair< S, T > &val) const
Definition: sitkMemberFunctionFactoryBase.h:60
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::MemberFunctionFactoryBase
MemberFunctionFactoryBase()
Definition: sitkMemberFunctionFactoryBase.h:229
sitkMacro.h
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionArgument4Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument4Type MemberFunctionArgument4Type
Definition: sitkMemberFunctionFactoryBase.h:384
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::MemberFunctionArgument2Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument2Type MemberFunctionArgument2Type
Definition: sitkMemberFunctionFactoryBase.h:278
itk::simple::NonCopyable
An inheritable class to disable copying of a class.
Definition: sitkNonCopyable.h:51
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::m_PFunction
FunctionMapType m_PFunction
Definition: sitkMemberFunctionFactoryBase.h:153
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::FunctionMapType
std::unordered_map< TKey, FunctionObjectType, hash< TKey > > FunctionMapType
Definition: sitkMemberFunctionFactoryBase.h:150
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::FunctionMapType
std::unordered_map< TKey, FunctionObjectType, hash< TKey > > FunctionMapType
Definition: sitkMemberFunctionFactoryBase.h:312
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::KeyType
TKey KeyType
Definition: sitkMemberFunctionFactoryBase.h:348
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionArgument1Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument1Type MemberFunctionArgument1Type
Definition: sitkMemberFunctionFactoryBase.h:381
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::FunctionObjectType
std::function< MemberFunctionResultType(MemberFunctionArgument0Type, MemberFunctionArgument1Type, MemberFunctionArgument2Type, MemberFunctionArgument3Type, MemberFunctionArgument4Type) > FunctionObjectType
Definition: sitkMemberFunctionFactoryBase.h:402
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::MemberFunctionResultType
typename ::detail::FunctionTraits< MemberFunctionType >::ResultType MemberFunctionResultType
Definition: sitkMemberFunctionFactoryBase.h:275
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionResultType
typename ::detail::FunctionTraits< MemberFunctionType >::ResultType MemberFunctionResultType
Definition: sitkMemberFunctionFactoryBase.h:327
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::MemberFunctionArgumentType
typename ::detail::FunctionTraits< MemberFunctionType >::Argument0Type MemberFunctionArgumentType
Definition: sitkMemberFunctionFactoryBase.h:174
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::MemberFunctionResultType
typename ::detail::FunctionTraits< MemberFunctionType >::ResultType MemberFunctionResultType
Definition: sitkMemberFunctionFactoryBase.h:119
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::ObjectType
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
Definition: sitkMemberFunctionFactoryBase.h:279
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::FunctionObjectType
std::function< MemberFunctionResultType() > FunctionObjectType
Definition: sitkMemberFunctionFactoryBase.h:130
itk::simple::InstantiatedPixelIDTypeList
AllPixelIDTypeList InstantiatedPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:207
itk::simple::detail::hash< std::tuple< TupleArgs... > >::hash_combine_tup
std::enable_if< Idx==sizeof...(TupleTypes), void >::type hash_combine_tup(size_t &, const std::tuple< TupleTypes... > &) const
Definition: sitkMemberFunctionFactoryBase.h:77
itk::simple::detail::hash_combine
void hash_combine(std::size_t &seed, const T &val)
Definition: sitkMemberFunctionFactoryBase.h:48
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::FunctionMapType
std::unordered_map< TKey, FunctionObjectType, hash< TKey > > FunctionMapType
Definition: sitkMemberFunctionFactoryBase.h:260
sitkConfigure.h
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::BindObject
static FunctionObjectType BindObject(MemberFunctionType pfunc, ObjectType *objectPointer)
Definition: sitkMemberFunctionFactoryBase.h:196
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::FunctionMapType
std::unordered_map< TKey, FunctionObjectType, hash< TKey > > FunctionMapType
Definition: sitkMemberFunctionFactoryBase.h:365
sitkPixelIDTypeLists.h
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::FunctionObjectType
std::function< MemberFunctionResultType(MemberFunctionArgumentType) > FunctionObjectType
Definition: sitkMemberFunctionFactoryBase.h:185
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::ObjectType
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
Definition: sitkMemberFunctionFactoryBase.h:118
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::MemberFunctionArgument1Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument1Type MemberFunctionArgument1Type
Definition: sitkMemberFunctionFactoryBase.h:225
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionType
TMemberFunctionPointer MemberFunctionType
Definition: sitkMemberFunctionFactoryBase.h:378
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionArgument1Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument1Type MemberFunctionArgument1Type
Definition: sitkMemberFunctionFactoryBase.h:329
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::KeyType
TKey KeyType
Definition: sitkMemberFunctionFactoryBase.h:135
itk
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::MemberFunctionType
TMemberFunctionPointer MemberFunctionType
Definition: sitkMemberFunctionFactoryBase.h:274
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::m_PFunction
FunctionMapType m_PFunction
Definition: sitkMemberFunctionFactoryBase.h:428
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionArgument2Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument2Type MemberFunctionArgument2Type
Definition: sitkMemberFunctionFactoryBase.h:330
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::ObjectType
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
Definition: sitkMemberFunctionFactoryBase.h:172
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 2 >::m_PFunction
FunctionMapType m_PFunction
Definition: sitkMemberFunctionFactoryBase.h:263
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::FunctionMapType
std::unordered_map< TKey, FunctionObjectType, hash< TKey > > FunctionMapType
Definition: sitkMemberFunctionFactoryBase.h:208
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::KeyType
TKey KeyType
Definition: sitkMemberFunctionFactoryBase.h:407
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 1 >::KeyType
TKey KeyType
Definition: sitkMemberFunctionFactoryBase.h:190
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionArgument0Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument0Type MemberFunctionArgument0Type
Definition: sitkMemberFunctionFactoryBase.h:328
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::ObjectType
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
Definition: sitkMemberFunctionFactoryBase.h:385
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 0 >::BindObject
static FunctionObjectType BindObject(MemberFunctionType pfunc, ObjectType *objectPointer)
Definition: sitkMemberFunctionFactoryBase.h:141
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionFactoryBase
MemberFunctionFactoryBase()
Definition: sitkMemberFunctionFactoryBase.h:388
itk::simple::detail::MemberFunctionFactoryBase
A base class for the MemberFunctionFactory.
Definition: sitkMemberFunctionFactoryBase.h:102
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 5 >::MemberFunctionResultType
typename ::detail::FunctionTraits< MemberFunctionType >::ResultType MemberFunctionResultType
Definition: sitkMemberFunctionFactoryBase.h:379
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 4 >::MemberFunctionFactoryBase
MemberFunctionFactoryBase()
Definition: sitkMemberFunctionFactoryBase.h:335
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::KeyType
TKey KeyType
Definition: sitkMemberFunctionFactoryBase.h:295
itk::simple::detail::MemberFunctionFactoryBase< TMemberFunctionPointer, TKey, 3 >::MemberFunctionArgument1Type
typename ::detail::FunctionTraits< MemberFunctionType >::Argument1Type MemberFunctionArgument1Type
Definition: sitkMemberFunctionFactoryBase.h:277