Jpp  17.3.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 483 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 722 of file JParser.hh.

723  {
724  std::getline(in, object);
725 
726  if (fail(in)) {
727  THROW(JParserException, "JParser: error reading parameter " << getName());
728  }
729 
730  if (in.peek() != EOF) {
731  THROW(JParserException, "JParser: pending data after reading parameter " << getName());
732  }
733 
734  setInitialiationStatus(true);
735 
736  return in;
737  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
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:540
bool fail(std::istream &in)
Check for stream state.
Definition: JParser.hh:113
const char * getName()
Get ROOT name of given data type.
Definition: JRootToolkit.hh:57
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:46
template<>
std::ostream & JPARSER::JParserTemplateElement< std::string, false >::write ( std::ostream &  out) const
inline
Parameters
outoutput stream
Returns
output stream

Definition at line 747 of file JParser.hh.

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

841  {
842  TStringHelper<>::read(in, object);
843 
844  setInitialiationStatus(true);
845 
846  return in;
847  }
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:46
template<>
std::istream & JPARSER::JParserTemplateElement< std::vector< TString >, false >::read ( std::istream &  in)
inline
Parameters
ininput stream
Returns
input stream

Definition at line 857 of file JParser.hh.

858  {
859  TStringHelper<>::read(in, object);
860 
861  setInitialiationStatus(true);
862 
863  return in;
864  }
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:46

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