DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CDrawableWithBoard2D.h
1 
17 #pragma once
18 
33 #if defined(CDrawableWithBoard2D_RECURSES)
34 #error Recursive header files inclusion detected in CDrawableWithBoard2D.h
35 #else // defined(CDrawableWithBoard2D_RECURSES)
36 
37 #define CDrawableWithBoard2D_RECURSES
38 
39 #if !defined CDrawableWithBoard2D_h
40 
41 #define CDrawableWithBoard2D_h
42 
44 // Inclusions
45 
46 #include <iostream>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/io/boards/Board2D.h"
49 #include "DGtal/io/Display2DFactory.h"
51 
52 namespace DGtal
53 {
54 
56  // class CDrawableWithBoard2D
110  template <typename T>
112  {
113  // ----------------------- Concept checks ------------------------------
114  public:
116  {
117  //Drawable model should have a className() returning a string
118  ConceptUtils::sameType( myS, myT.className() );
119 
120  //Drawable model should be associated to global functions draw and defaultStyle.
122  ConceptUtils::sameType( myD, defaultStyle( myT) );
123  }
124 
125  // ------------------------- Private Datas --------------------------------
126  private:
127  T myT;
130  std::string myS;
131 
132  // ------------------------- Internals ------------------------------------
133  private:
134 
135  }; // end of concept CDrawableWithBoard2D
136 
137 } // namespace DGtal
138 
139 
140 // //
142 
143 #endif // !defined CDrawableWithBoard2D_h
144 
145 #undef CDrawableWithBoard2D_RECURSES
146 #endif // else defined(CDrawableWithBoard2D_RECURSES)