Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Functions
JPrint.hh File Reference

I/O formatting auxiliaries. More...

#include <string>
#include <ostream>
#include <sstream>
#include <iomanip>
#include "JLang/JManip.hh"
#include "Jeep/JStreamToolkit.hh"

Go to the source code of this file.

Classes

struct  JEEPZ
 Auxiliary data structure for streaming of STL containers. More...
 
struct  JEEPZ::JStream
 Auxiliary class for format STL containers. More...
 

Namespaces

 JEEP
 General puprpose classes and methods.
 
 JPP
 This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 

Macros

#define VARGS_STRING(A, B,...)   MAKE_STRING(B)
 Make string for variadic macro. More...
 
#define MAKE_STRING(A)   (static_cast<std::ostringstream&>(JEEP::getOstream() << A)).str()
 Make string. More...
 
#define MAKE_CSTRING(A)   JEEP::getCString(MAKE_STRING(A))
 Make C-string. More...
 

Functions

std::ostream & JEEP::getOstream ()
 Get output stream for conversion to std::string. More...
 
const char * JEEP::getCString (const std::string &input)
 Get output C-string. More...
 

Detailed Description

I/O formatting auxiliaries.

Author
mdejong

Definition in file JPrint.hh.

Macro Definition Documentation

#define VARGS_STRING (   A,
  B,
  ... 
)    MAKE_STRING(B)

Make string for variadic macro.

When called,

  • first argument should correspond to a dummy value;
  • second to the ##__VA_ARGS__ macro; and
  • third to the fall back value (e.g. "");
Parameters
Adummy value
B##__VA_ARGS__ macro
Returns
std::string

Definition at line 133 of file JPrint.hh.

#define MAKE_STRING (   A)    (static_cast<std::ostringstream&>(JEEP::getOstream() << A)).str()

Make string.

Parameters
Astd::ostream compatible construct
Returns
std::string

Definition at line 142 of file JPrint.hh.

#define MAKE_CSTRING (   A)    JEEP::getCString(MAKE_STRING(A))

Make C-string.

Parameters
Astd::ostream compatible construct
Returns
C-string

Definition at line 151 of file JPrint.hh.