DGtal 0.3.0

CDrawableWithDGtalBoard.h

Go to the documentation of this file.
00001 
00017 #pragma once
00018 
00033 #if defined(CDrawableWithDGtalBoard_RECURSES)
00034 #error Recursive header files inclusion detected in CDrawableWithDGtalBoard.h
00035 #else // defined(CDrawableWithDGtalBoard_RECURSES)
00036 
00037 #define CDrawableWithDGtalBoard_RECURSES
00038 
00039 #if !defined CDrawableWithDGtalBoard_h
00040 
00041 #define CDrawableWithDGtalBoard_h
00042 
00044 // Inclusions
00045 
00046 #include <iostream>
00047 #include "boost/concept_check.hpp"
00048 #include "DGtal/base/Common.h"
00049 #include "DGtal/io/DGtalBoard.h"
00051 
00052 namespace DGtal
00053 {
00054 
00056   // class CDrawableWithDGtalBoard
00110   template <typename T>
00111   struct CDrawableWithDGtalBoard
00112   {
00113     // ----------------------- Concept checks ------------------------------
00114   public:
00115     BOOST_CONCEPT_USAGE( CDrawableWithDGtalBoard )
00116     {
00117       //Drawable model should have a defaultStyle() returning a DrawableWithDGtalBoard*
00118       ConceptUtils::sameType( myD, myT.defaultStyle() );
00119       //Drawable model should have a defaultStyle( string ) returning a DrawableWithDGtalBoard*
00120       ConceptUtils::sameType( myD, myT.defaultStyle( myS ) );
00121       //Drawable model should have a styleName() returning a string
00122       ConceptUtils::sameType( myS, myT.styleName() );
00123       //Drawable model should have a selfDraw()
00125       myT.selfDraw( myB );
00126     }
00127 
00128     // ------------------------- Private Datas --------------------------------
00129   private:
00130     T myT;
00131     DrawableWithDGtalBoard *myD;
00132 
00134     DGtalBoard myB;
00135     std::string myS;
00136     
00137     // ------------------------- Internals ------------------------------------
00138   private:
00139 
00140   }; // end of concept CDrawableWithDGtalBoard
00141 
00142 } // namespace DGtal
00143 
00144 
00145 //                                                                           //
00147 
00148 #endif // !defined CDrawableWithDGtalBoard_h
00149 
00150 #undef CDrawableWithDGtalBoard_RECURSES
00151 #endif // else defined(CDrawableWithDGtalBoard_RECURSES)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines