Jpp  17.3.0-rc.2
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 23 of file JToken.hh.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 36 of file JToken.hh.

36  :
37  std::string()
38  {}
then awk string

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 48 of file JToken.hh.

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

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

Member Data Documentation

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

Separator.

Definition at line 30 of file JToken.hh.


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