31 #if defined(ContainerTraits_RECURSES)
32 #error Recursive header files inclusion detected in ContainerTraits.h
33 #else // defined(ContainerTraits_RECURSES)
35 #define ContainerTraits_RECURSES
37 #if !defined ContainerTraits_h
39 #define ContainerTraits_h
49 #include <boost/type_traits.hpp>
50 #include <boost/unordered_set.hpp>
51 #include <boost/unordered_map.hpp>
52 #include <unordered_set>
53 #include <unordered_map>
54 #include <forward_list>
57 #include "DGtal/base/Common.h"
84 template <
typename TContainer>
91 template <
class T,
class Alloc >
98 template <
class T,
class Alloc >
105 template <
class T,
class Alloc >
112 template <
class T,
class Alloc >
119 template <
class T,
size_t N >
126 template <
class T,
class Compare,
class Alloc >
133 template <
class Key,
class T,
class Compare,
class Alloc >
140 template <
class T,
class Compare,
class Alloc >
147 template <
class Key,
class T,
class Compare,
class Alloc >
154 template <
typename Value,
typename Hash,
typename Pred,
typename Alloc >
161 template <
typename Value,
typename Hash,
typename Pred,
typename Alloc >
168 template <
typename Value,
typename T,
typename Hash,
typename Pred,
typename Alloc >
175 template <
typename Value,
typename T,
typename Hash,
typename Pred,
typename Alloc >
182 template <
class Key,
class Hash,
class Pred,
class Alloc >
189 template <
class Key,
class Hash,
class Pred,
class Alloc >
196 template <
class Key,
class T,
class Hash,
class Pred,
class Alloc >
203 template <
class Key,
class T,
class Hash,
class Pred,
class Alloc >
222 template <
typename T>
228 template <
typename C>
229 static yes&
test(
typename C::Category*);
231 template <
typename C>
241 template <
typename TCategory>
249 template <
typename TCategory>
257 template <
typename TCategory>
265 template <
typename TCategory>
267 BOOST_STATIC_CONSTANT(
bool, value = ( boost::is_base_of<OrderedAssociativeCategory,TCategory>::value ) );
273 template <
typename TCategory>
275 BOOST_STATIC_CONSTANT(
bool, value = ( boost::is_base_of<UnorderedAssociativeCategory,TCategory>::value ) );
281 template <
typename TCategory>
283 BOOST_STATIC_CONSTANT(
bool, value = ( boost::is_base_of<SimpleAssociativeCategory,TCategory>::value ) );
289 template <
typename TCategory>
291 BOOST_STATIC_CONSTANT(
bool, value = ( boost::is_base_of<PairAssociativeCategory,TCategory>::value ) );
297 template <
typename TCategory>
299 BOOST_STATIC_CONSTANT(
bool, value = ( boost::is_base_of<UniqueAssociativeCategory,TCategory>::value ) );
305 template <
typename TCategory>
307 BOOST_STATIC_CONSTANT(
bool, value = ( boost::is_base_of<MultipleAssociativeCategory,TCategory>::value ) );
316 template <
typename T>
326 template <
typename T>
336 template <
typename T>
346 template <
typename T>
356 template <
typename T>
366 template <
typename T>
376 template <
typename T>
386 template <
typename T>
396 template <
typename T>
411 #endif // !defined ContainerTraits_h
413 #undef ContainerTraits_RECURSES
414 #endif // else defined(ContainerTraits_RECURSES)
UnorderedSetAssociativeCategory Category
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< ContainerCategory, TCategory >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsPairAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsOrderedAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsUniqueAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
UnorderedSetAssociativeCategory Category
NotContainerCategory Category
UnorderedMapAssociativeCategory Category
MapAssociativeCategory Category
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< PairAssociativeCategory, TCategory >::value))
static yes & test(typename C::Category *)
BOOST_STATIC_CONSTANT(bool, value=sizeof(test< T >(0))==sizeof(yes))
UnorderedMultimapAssociativeCategory Category
Aim: Checks whether type T has a nested type called 'Category' or not. NB: from en....
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsContainerFromCategory< typename ContainerTraits< T >::Category >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsUnorderedAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
UnorderedMultisetAssociativeCategory Category
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< UnorderedAssociativeCategory, TCategory >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< AssociativeCategory, TCategory >::value))
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< SequenceCategory, TCategory >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsMultipleAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
DGtal is the top-level namespace which contains all DGtal functions and types.
SequenceCategory Category
Defines default container traits for arbitrary types.
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< SimpleAssociativeCategory, TCategory >::value))
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< UniqueAssociativeCategory, TCategory >::value))
SequenceCategory Category
UnorderedMultisetAssociativeCategory Category
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< OrderedAssociativeCategory, TCategory >::value))
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsSimpleAssociativeContainerFromCategory< typename ContainerTraits< T >::Category >::value))
SequenceCategory Category
BOOST_STATIC_CONSTANT(bool, value=(boost::is_base_of< MultipleAssociativeCategory, TCategory >::value))
SetAssociativeCategory Category
MultisetAssociativeCategory Category
UnorderedMultimapAssociativeCategory Category
UnorderedMapAssociativeCategory Category
SequenceCategory Category
MultimapAssociativeCategory Category
BOOST_STATIC_CONSTANT(bool, value=(detail::HasNestedTypeCategory< ContainerTraits< T > >::value &&detail::IsSequenceContainerFromCategory< typename ContainerTraits< T >::Category >::value))
SequenceCategory Category