DGtal  1.5.beta
CBinner.h
1 
17 #pragma once
18 
31 #if defined(CBinner_RECURSES)
32 #error Recursive header files inclusion detected in CBinner.h
33 #else // defined(CBinner_RECURSES)
35 #define CBinner_RECURSES
36 
37 #if !defined CBinner_h
39 #define CBinner_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <boost/type_traits/is_integral.hpp>
45 #include <boost/type_traits/is_unsigned.hpp>
46 #include "DGtal/base/Common.h"
47 #include "DGtal/kernel/CEuclideanRing.h"
49 
50 namespace DGtal
51 {
52  namespace concepts
53  {
55 // class CBinner
96 template <typename T>
98 {
99  // ----------------------- Concept checks ------------------------------
100 public:
101  typedef typename T::Quantity Quantity;
102  typedef typename T::Bin Bin;
106 
107  // 2. then check the presence of data members, operators and methods with
109  {
110  myClone = new T( myQ, myQ, myBin );
112  }
114  {
116  }
117  // ------------------------- Private Datas --------------------------------
118 private:
119  T myX; // do not require T to be default constructible.
123 
124  // ------------------------- Internals ------------------------------------
125 private:
126 
127 }; // end of concept CBinner
128  }
129 } // namespace DGtal
130 
131 // //
133 
134 #endif // !defined CBinner_h
135 
136 #undef CBinner_RECURSES
137 #endif // else defined(CBinner_RECURSES)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Represents an object that places a quantity into a bin, i.e. a functor that associates a natural...
Definition: CBinner.h:98
void checkConstConstraints() const
Definition: CBinner.h:113
BOOST_CONCEPT_USAGE(CBinner)
Definition: CBinner.h:108
T::Quantity Quantity
Definition: CBinner.h:101
BOOST_STATIC_ASSERT((boost::is_unsigned< Bin >::value))
BOOST_STATIC_ASSERT((boost::is_integral< Bin >::value))
BOOST_CONCEPT_ASSERT((CEuclideanRing< Quantity >))
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
Go to http://www.boost.org/doc/libs/1_52_0/libs/type_traits/doc/html/index.html.
Definition: Boost.dox:179
Go to http://www.boost.org/doc/libs/1_52_0/libs/type_traits/doc/html/index.html.
Definition: Boost.dox:183