DGtal 2.0.0
Loading...
Searching...
No Matches
DGtal::Shortcuts< TKSpace >::ValueReader< Value > Struct Template Reference

#include <DGtal/helpers/Shortcuts.h>

Public Member Functions

bool operator() (std::istream &input, Value &value)
bool operator() (std::istream &input, std::vector< Value > &values)

Detailed Description

template<typename TKSpace>
template<typename Value>
struct DGtal::Shortcuts< TKSpace >::ValueReader< Value >

Definition at line 3406 of file Shortcuts.h.

Member Function Documentation

◆ operator()() [1/2]

template<typename TKSpace>
template<typename Value>
bool DGtal::Shortcuts< TKSpace >::ValueReader< Value >::operator() ( std::istream & input,
std::vector< Value > & values )
inline

Definition at line 3422 of file Shortcuts.h.

3423 {
3426 // construct a stream from the string
3428 // use stream iterators to copy the stream to the vector as whitespace separated strings
3432 values.resize( results.size() );
3433 for ( unsigned int i = 0; i < results.size(); ++i ) {
3435 sstr >> values[ i ];
3436 }
3437 return input.good();
3438 }
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
Definition Shortcuts.h:102

◆ operator()() [2/2]

template<typename TKSpace>
template<typename Value>
bool DGtal::Shortcuts< TKSpace >::ValueReader< Value >::operator() ( std::istream & input,
Value & value )
inline

Definition at line 3407 of file Shortcuts.h.

3408 {
3411 // construct a stream from the string
3413 // use stream iterators to copy the stream to the vector as whitespace separated strings
3418 sstr >> value;
3419 return ( results.size() == 1 ) && input.good();
3420 }

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