Jpp  18.4.0
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 482 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 721 of file JParser.hh.

722  {
723  std::getline(in, object);
724 
725  if (fail(in)) {
726  THROW(JParserException, "JParser: error reading parameter " << getName());
727  }
728 
729  if (in.peek() != EOF) {
730  THROW(JParserException, "JParser: pending data after reading parameter " << getName());
731  }
732 
733  setInitialiationStatus(true);
734 
735  return in;
736  }
#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:113
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] 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 746 of file JParser.hh.

747  {
748  return writeObject(out, JLANG::double_quote(object));
749  }
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 839 of file JParser.hh.

840  {
841  TStringHelper<>::read(in, object);
842 
843  setInitialiationStatus(true);
844 
845  return in;
846  }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] 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 856 of file JParser.hh.

857  {
858  TStringHelper<>::read(in, object);
859 
860  setInitialiationStatus(true);
861 
862  return in;
863  }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] 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: