Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | 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 Member Functions

static char getSeparator ()
 Get 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 30 of file JToken.hh.

30  :
31  std::string()
32  {}

Member Function Documentation

template<char sep>
static char JLANG::JToken< sep >::getSeparator ( )
inlinestatic

Get separator.

Definition at line 38 of file JToken.hh.

39  {
40  return sep;
41  }

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

52  {
53  token.clear();
54 
55  return getline(in, token, sep);
56  }
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
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 66 of file JToken.hh.

67  {
68  return out << static_cast<const std::string&>(token) << sep;
69  }

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