DGtal  0.9.4beta
Public Member Functions | Private Attributes
DGtal::concepts::CDrawableWithBoard2D< T > Struct Template Reference

#include <DGtal/io/boards/CDrawableWithBoard2D.h>

Collaboration diagram for DGtal::concepts::CDrawableWithBoard2D< T >:
[legend]

Public Member Functions

 BOOST_CONCEPT_USAGE (CDrawableWithBoard2D)
 

Private Attributes

myT
 
DrawableWithBoard2DmyD
 
Board2D myB
 
std::string myS
 

Detailed Description

template<typename T>
struct DGtal::concepts::CDrawableWithBoard2D< T >

Aim: The concept CDrawableWithBoard2D specifies what are the classes that admit an export with Board2D.

Description of concept 'CDrawableWithBoard2D'

An object x satisfying this concept may then be used as:

Board2D board;
board << CustomStyle( x.className(), x.defaultStyle() )
<< x;

Refinement of

Associated types :

Notation

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
the default draw style x.defaultStyle( m ="" ) mode m: std::string DrawableWithBoard2D returns a dynamic allocation of the default style for the model X in mode m
the name of the model x.className() std::string returns a string telling the name of the model
the way the objet x is drawn x.setStyle(Board2D &board) draws the object x on the board stream

Invariants

Models

ArithmeticalDSSComputer, FreemanChain, HyperRectDomain, ImageContainerByHashTree, ImageContainerBySTLVector, PointVector, DigitalSetBySTLSet,DigitalSetBySTLVector, Object

Notes

Todo:

ImageContainerByHashTree does not implement setStyle(Board2D &).

ImageContainerByHashTree does not implement defaultStyle(std::string&)const.

Definition at line 104 of file CDrawableWithBoard2D.h.

Member Function Documentation

template<typename T >
DGtal::concepts::CDrawableWithBoard2D< T >::BOOST_CONCEPT_USAGE ( CDrawableWithBoard2D< T >  )
inline

Definition at line 108 of file CDrawableWithBoard2D.h.

References DGtal::Display2DFactory::draw(), DGtal::concepts::CDrawableWithBoard2D< T >::myB, DGtal::concepts::CDrawableWithBoard2D< T >::myD, DGtal::concepts::CDrawableWithBoard2D< T >::myS, DGtal::concepts::CDrawableWithBoard2D< T >::myT, and DGtal::concepts::ConceptUtils::sameType().

109  {
110  //Drawable model should have a className() returning a string
111  concepts::ConceptUtils::sameType( myS, myT.className() );
112 
113  //Drawable model should be associated to global functions draw and defaultStyle.
115  concepts::ConceptUtils::sameType( myD, defaultStyle( myT) );
116  }
static void draw(DGtal::Board2D &board, const DGtal::DiscreteExteriorCalculus< dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger > &calculus)
void sameType(const T &t1, const T &t2)

Field Documentation

template<typename T >
Board2D DGtal::concepts::CDrawableWithBoard2D< T >::myB
private
template<typename T >
DrawableWithBoard2D* DGtal::concepts::CDrawableWithBoard2D< T >::myD
private
template<typename T >
std::string DGtal::concepts::CDrawableWithBoard2D< T >::myS
private
template<typename T >
T DGtal::concepts::CDrawableWithBoard2D< T >::myT
private

The documentation for this struct was generated from the following file: