DGtal  0.9.2
CSTLAssociativeContainer.h
1 
17 #pragma once
18 
31 #if defined(CSTLAssociativeContainer_RECURSES)
32 #error Recursive header files inclusion detected in CSTLAssociativeContainer.h
33 #else // defined(CSTLAssociativeContainer_RECURSES)
34 
35 #define CSTLAssociativeContainer_RECURSES
36 
37 #if !defined CSTLAssociativeContainer_h
38 
39 #define CSTLAssociativeContainer_h
40 
42 // Inclusions
43 #include <iostream>
45 
46 namespace DGtal
47 {
48  namespace concepts
49  {
51  // class CSTLAssociativeContainer
101  template <typename T>
103  {
104  // ----------------------- Concept checks ------------------------------
105  public:
106  typedef typename T::iterator iterator;
107  typedef typename T::value_type value_type;
108  typedef typename T::key_type key_type;
109  typedef typename T::size_type size_type;
110  typedef typename T::const_iterator const_iterator;
111 
113  {
114  x.erase(key);
115  x.erase(p);
116  x.erase(p, q);
117  x.clear();
118  p = x.find(key);
119  r = x.equal_range(key);
120  n = x.count(key);
121  };
122 
123  private:
124  void const_constraints(const T& cc)
125  {
126  ci = cc.find(key);
127  n = cc.count(key);
128  cr = cc.equal_range(key);
129  }
130 
131 
132  private:
133  T x;
134  iterator p,q;
135  const_iterator ci;
136  value_type val;
137  key_type key;
138  size_type n;
139  std::pair<iterator,iterator> r;
140  std::pair<const_iterator,const_iterator> cr;
141 
142  }; // end of concept CSTLAssociativeContainer
143  } // namespace concept
144 } // namespace DGtal
145 
146 
147 
148 // //
150 
151 #endif // !defined CSTLAssociativeContainer_h
152 
153 #undef CSTLAssociativeContainer_RECURSES
154 #endif // else defined(CSTLAssociativeContainer_RECURSES)
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition: Boost.dox:30
std::pair< const_iterator, const_iterator > cr
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing an Associative Container of the STL (https://www.sgi.com/tech/stl/AssociativeContainer.html).
Go to http://www.sgi.com/tech/stl/ForwardContainer.html.
Definition: Boost.dox:110