#include <DGtal/helpers/Shortcuts.h>
template<typename TKSpace>
template<typename
Value>
struct DGtal::Shortcuts< TKSpace >::ValueReader< Value >
Definition at line 3406 of file Shortcuts.h.
◆ operator()() [1/2]
template<typename TKSpace >
template<typename
Value >
Definition at line 3422 of file Shortcuts.h.
3423 {
3424 std::string str;
3425 std::getline( input, str );
3426
3427 std::stringstream strstr(str);
3428
3429 std::istream_iterator<std::string> it(strstr);
3430 std::istream_iterator<std::string> end;
3431 std::vector<std::string> results(it, end);
3432 values.resize( results.size() );
3433 for ( unsigned int i = 0; i < results.size(); ++i ) {
3434 std::stringstream sstr( results[ i ] );
3435 sstr >> values[ i ];
3436 }
3437 return input.good();
3438 }
◆ operator()() [2/2]
template<typename TKSpace >
template<typename
Value >
Definition at line 3407 of file Shortcuts.h.
3408 {
3409 std::string str;
3410 std::getline( input, str );
3411
3412 std::stringstream strstr(str);
3413
3414 std::istream_iterator<std::string> it(strstr);
3415 std::istream_iterator<std::string> end;
3416 std::vector<std::string> results(it, end);
3417 std::stringstream sstr( results[ 0 ] );
3418 sstr >> value;
3419 return ( results.size() == 1 ) && input.good();
3420 }
The documentation for this struct was generated from the following file: