Jpp  16.0.3
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 466 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 705 of file JParser.hh.

706  {
707  std::getline(in, object);
708 
709  if (fail(in)) {
710  THROW(JParserException, "JParser: error reading parameter " << getName());
711  }
712 
713  if (in.peek() != EOF) {
714  THROW(JParserException, "JParser: pending data after reading parameter " << getName());
715  }
716 
717  setInitialiationStatus(true);
718 
719  return in;
720  }
#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:96
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42
template<>
std::ostream & JPARSER::JParserTemplateElement< std::string, false >::write ( std::ostream &  out) const
inline
Parameters
outoutput stream
Returns
output stream

Definition at line 730 of file JParser.hh.

731  {
732  return writeObject(out, JLANG::double_quote(object));
733  }
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 823 of file JParser.hh.

824  {
825  TStringHelper<>::read(in, object);
826 
827  setInitialiationStatus(true);
828 
829  return in;
830  }
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42
template<>
std::istream & JPARSER::JParserTemplateElement< std::vector< 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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42

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