DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::concepts::CDrawableWithBoard2D< T > Struct Template Reference

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

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

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;
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition Board2D.h:71

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

◆ BOOST_CONCEPT_USAGE()

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

Definition at line 108 of file CDrawableWithBoard2D.h.

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

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().

Field Documentation

◆ myB

◆ myD

◆ myS

template<typename T >
std::string DGtal::concepts::CDrawableWithBoard2D< T >::myS
private

◆ myT

template<typename T >
T DGtal::concepts::CDrawableWithBoard2D< T >::myT
private

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