Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JPARSER::JParserTemplateElement< JType_t, has_eq > Class Template Reference

Template class holder for I/O of parser element. More...

#include <JParser.hh>

Public Member Functions

template<>
std::istream & read (std::istream &in)
 
template<>
std::ostream & write (std::ostream &out) const
 
template<>
std::istream & read (std::istream &in)
 
template<>
std::istream & read (std::istream &in)
 

Detailed Description

template<class JType_t, bool has_eq = JComparisonAvailable<JType_t>::has_eq>
class JPARSER::JParserTemplateElement< JType_t, has_eq >

Template class holder for I/O of parser element.

This class implements the JPARSER::JParserElementInterface interface.

Definition at line 679 of file JParser.hh.

Member Function Documentation

template<>
std::istream & JPARSER::JParserTemplateElement< std::string, false >::read ( std::istream &  in)
inline
Parameters
ininput stream
Returns
input stream

Definition at line 918 of file JParser.hh.

919  {
920  std::getline(in, object);
921 
922  if (fail(in)) {
923  THROW(JParserException, "JParser: error reading parameter " << getName());
924  }
925 
926  if (in.peek() != EOF) {
927  THROW(JParserException, "JParser: pending data after reading parameter " << getName());
928  }
929 
930  setInitialiationStatus(true);
931 
932  return in;
933  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:478
Exception when parsing a value.
Definition: JException.hh:556
bool fail(std::istream &in)
Check for stream state.
Definition: JParser.hh:114
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:48
const char * getName()
Get ROOT name of given data type.
Definition: JRootToolkit.hh:60
template<>
std::ostream & JPARSER::JParserTemplateElement< std::string, false >::write ( std::ostream &  out) const
inline
Parameters
outoutput stream
Returns
output stream

Definition at line 943 of file JParser.hh.

944  {
945  return writeObject(out, JLANG::double_quote(object));
946  }
std::string double_quote(const std::string &value)
Quote string.
std::ostream & writeObject(std::ostream &out, const T &object)
Stream output of object.
template<>
std::istream & JPARSER::JParserTemplateElement< TString, false >::read ( std::istream &  in)
inline
Parameters
ininput stream
Returns
input stream

Definition at line 1036 of file JParser.hh.

1037  {
1038  TStringHelper<>::read(in, object);
1039 
1040  setInitialiationStatus(true);
1041 
1042  return in;
1043  }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:48
template<>
std::istream & JPARSER::JParserTemplateElement< std::vector< TString >, false >::read ( std::istream &  in)
inline
Parameters
ininput stream
Returns
input stream

Definition at line 1053 of file JParser.hh.

1054  {
1055  TStringHelper<>::read(in, object);
1056 
1057  setInitialiationStatus(true);
1058 
1059  return in;
1060  }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:48

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