DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CUndirectedSimpleGraph.h
1 
17 #pragma once
18 
31 #if defined(CUndirectedSimpleGraph_RECURSES)
32 #error Recursive header files inclusion detected in CUndirectedSimpleGraph.h
33 #else // defined(CUndirectedSimpleGraph_RECURSES)
34 
35 #define CUndirectedSimpleGraph_RECURSES
36 
37 #if !defined CUndirectedSimpleGraph_h
38 
39 #define CUndirectedSimpleGraph_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CConstSinglePassRange.h"
46 #include "DGtal/topology/CUndirectedSimpleLocalGraph.h"
48 
49 namespace DGtal
50 {
51 
53  // class CUndirectedSimpleGraph
120  template <typename T>
124  // Use derivation for coarser concepts, like
125  // : CoarserConcept<T>
126  // Think to boost::CopyConstructible<T>, boost::DefaultConstructible<T>, ...
127  // http://www.boost.org/doc/libs/1_49_0/libs/concept_check/reference.htm
128  {
129  // ----------------------- Concept checks ------------------------------
130  public:
131  // 1. define first provided types (i.e. inner types), like
132  typedef typename T::Edge Edge;
133  typedef typename T::Size Size;
134 
135  // 2. then check the presence of data members, operators and methods with
137  {
138  // check const methods.
140  }
142  {
143  ConceptUtils::sameType( mySize, myX.size() );
144  }
145 
146  // ------------------------- Private Datas --------------------------------
147  private:
148  T myX; // do not require T to be default constructible.
150 
151  // ------------------------- Internals ------------------------------------
152  private:
153 
154  }; // end of concept CUndirectedSimpleGraph
155 
156 } // namespace DGtal
157 
158 // //
160 
161 #endif // !defined CUndirectedSimpleGraph_h
162 
163 #undef CUndirectedSimpleGraph_RECURSES
164 #endif // else defined(CUndirectedSimpleGraph_RECURSES)