DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Attributes
DGtal::CDrawableWithBoard2D< T > Struct Template Reference

#include <CDrawableWithBoard2D.h>

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

Public Member Functions

 BOOST_CONCEPT_USAGE (CDrawableWithBoard2D)

Private Attributes

myT
DrawableWithBoard2DmyD
Board2D myB
std::string myS

Detailed Description

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

DescriptionDescription of concept 'CDrawableWithBoard2D'

Aim: The concept CDrawableWithBoard2D specifies what are the classes that admit an export with Board2D. 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

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

Invariants###

Models### ArimeticalDSS, 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 111 of file CDrawableWithBoard2D.h.


Member Function Documentation

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

Definition at line 115 of file CDrawableWithBoard2D.h.

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

{
//Drawable model should have a className() returning a string
ConceptUtils::sameType( myS, myT.className() );
//Drawable model should be associated to global functions draw and defaultStyle.
ConceptUtils::sameType( myD, defaultStyle( myT) );
}

Field Documentation

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

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