Jpp  19.1.0-rc.1
the software that should make you happy
Static Public Member Functions | List of all members
JPARSER::TStringHelper< true > Struct Reference

Specialisation of TStringHelper if TString exists. More...

#include <JParser.hh>

Static Public Member Functions

template<class T >
static std::istream & read (std::istream &in, T &object)
 Read object from input stream. More...
 
template<class T >
static std::istream & read (std::istream &in, std::vector< T > &object)
 Read std::vector of objects from input stream. More...
 

Detailed Description

Specialisation of TStringHelper if TString exists.

Definition at line 995 of file JParser.hh.

Member Function Documentation

◆ read() [1/2]

template<class T >
static std::istream& JPARSER::TStringHelper< true >::read ( std::istream &  in,
T &  object 
)
inlinestatic

Read object from input stream.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 1005 of file JParser.hh.

1006  {
1007  return object.ReadLine(in);
1008  }

◆ read() [2/2]

template<class T >
static std::istream& JPARSER::TStringHelper< true >::read ( std::istream &  in,
std::vector< T > &  object 
)
inlinestatic

Read std::vector of objects from input stream.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 1018 of file JParser.hh.

1019  {
1020  for (std::string buffer; in >> buffer; ) {
1021  object.push_back(buffer.c_str());
1022  }
1023 
1024  return in;
1025  }

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