Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Friends | List of all members
JLANG::JToken< sep > Class Template Reference

Wrapper class around string. More...

#include <JToken.hh>

Inheritance diagram for JLANG::JToken< sep >:

Public Member Functions

 JToken ()
 Default constructor. More...
 

Static Public Attributes

static const char SEPARATOR = sep
 Separator. More...
 

Friends

std::istream & operator>> (std::istream &in, JToken &token)
 Read token from input stream. More...
 
std::ostream & operator<< (std::ostream &out, const JToken &token)
 Write token to output stream. More...
 

Detailed Description

template<char sep>
class JLANG::JToken< sep >

Wrapper class around string.

The redirect operator istream::operator>>() will read until given template character instead of the standard white space.

Definition at line 24 of file JToken.hh.

Constructor & Destructor Documentation

template<char sep>
JLANG::JToken< sep >::JToken ( )
inline

Default constructor.

Definition at line 37 of file JToken.hh.

37  :
38  std::string()
39  {}

Friends And Related Function Documentation

template<char sep>
std::istream& operator>> ( std::istream &  in,
JToken< sep > &  token 
)
friend

Read token from input stream.

Parameters
ininput stream
tokentoken
Returns
input stream

Definition at line 49 of file JToken.hh.

50  {
51  token.clear();
52 
53  return getline(in, token, SEPARATOR);
54  }
static const char SEPARATOR
Separator.
Definition: JToken.hh:31
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:478
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<char sep>
std::ostream& operator<< ( std::ostream &  out,
const JToken< sep > &  token 
)
friend

Write token to output stream.

Parameters
outoutput stream
tokentoken
Returns
output stream

Definition at line 64 of file JToken.hh.

65  {
66  return out << static_cast<const std::string&>(token) << SEPARATOR;
67  }
static const char SEPARATOR
Separator.
Definition: JToken.hh:31

Member Data Documentation

template<char sep>
const char JLANG::JToken< sep >::SEPARATOR = sep
static

Separator.

Definition at line 31 of file JToken.hh.


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