1 #ifndef __JLANG_JMANIP__
2 #define __JLANG_JMANIP__
17 namespace JPP {
using namespace JLANG; }
28 static const int index = std::ios_base::xalloc();
186 inline std::ostream&
newline(std::ostream& out)
210 inline std::ostream&
tab(std::ostream& out)
222 inline std::ostream&
rewind(std::ostream& out)
224 return (out <<
'\r').flush();
254 return out << setw(format.
width);
288 return out << setw(format.width) << left;
320 return out << setw(format.width) << right;
338 const char fill =
' ') :
356 return out << setfill(format.
fill) << setw(format.
width);
405 const int w = this->width - os.str().size();
406 const char c = this->out.fill();
409 return this->out <<
FILL(
w/2) <<
' ' << os.str() <<
FILL((
w+1)/2) <<
' ' << setfill(
c);
411 return this->out << os.str();
456 const int precision) :
459 this->precision = precision;
474 return out << fixed << right << setw(format.
width) << setprecision(format.
precision);
494 const int precision) :
497 this->precision = precision;
512 return out << scientific << right << setw(format.
width) << setprecision(format.
precision);
546 const int precision = 0,
548 const char fill =
' ') :
550 precision(precision),
583 void get(std::ostream& out)
585 this->width = out.width();
586 this->precision = out.precision();
587 this->flags = out.flags();
588 this->fill = out.fill();
597 void put(std::ostream& out)
const
599 out.width (this->width);
600 out.precision(this->precision);
601 out.flags (this->flags);
602 out.fill (this->fill);
697 const JFormat_t& buffer = getFormat<T>();
714 getFormat<T>() = format;
RIGHT(const int width)
Constructor.
Auxiliary data structure for alignment of data.
LAMBDA(const function_type &f1)
Constructor.
friend std::ostream & operator<<(std::ostream &out, const WIDTH &format)
Format specifier.
bool getMediumprint(std::ostream &out)
Get medium print option.
friend std::ostream & operator<<(std::ostream &out, const SCIENTIFIC &format)
Format specifier.
JFormat_t & getFormat()
Get format for given type.
friend std::ostream & operator<<(std::ostream &out, const RIGHT &format)
Format specifier.
WIDTH(const int width)
Constructor.
Auxiliary data structure for floating point format specification.
friend std::ostream & operator<<(std::ostream &out, const FIXED &format)
Format specifier.
Auxiliary data structure for alignment of data.
void setShortprint(std::ostream &out)
Set short print option.
std::ostream & rewind(std::ostream &out)
Rewind character.
Auxiliary class for format center.
Auxiliary data structure to convert (lambda) function to printable object.
void setLongprint(std::ostream &out)
Set long print option.
std::ostream & newline(std::ostream &out)
Print newline character.
LEFT(const int width)
Constructor.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
bool getLongprint(std::ostream &out)
Get long print option.
int getIndex()
Get index for user I/O manipulation.
std::ostream & shortprint(std::ostream &out)
Set short printing.
Auxiliary data structure for sequence of same character.
std::ostream & longprint(std::ostream &out)
Set long printing.
friend std::ostream & operator<<(std::ostream &out, const LEFT &format)
Format specifier.
int getPrintOption(std::ostream &out)
Get print option.
SCIENTIFIC(const int width, const int precision)
Constructor.
JCenter(std::ostream &out, const WIDTH &format)
Constructor.
void setPrintOption(std::ostream &out, const int option)
Set print option.
friend std::ostream & operator<<(std::ostream &out, const FILL &format)
Format specifier.
std::ostream & whitespace(std::ostream &out)
Print white space character.
FILL(const int width=0, const char fill= ' ')
Constructor.
bool getShortprint(std::ostream &out)
Get short print option.
CENTER(const int width)
Constructor.
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
FIXED(const int width, const int precision)
Constructor.
JPrintOption_t
Print options.
std::ostream & tab(std::ostream &out)
Print tab character.
std::function< void(std::ostream &)> function_type
Type definition of print function.
Auxiliary data structure for floating point format specification.
std::ostream & operator<<(const T &value)
Write value to output stream.
void setFormat(const JFormat_t &format)
Set format for given type.
friend std::ostream & operator<<(std::ostream &out, const LAMBDA &object)
Write printable object to output stream.
std::ostream & mediumprint(std::ostream &out)
Set medium printing.
void setMediumprint(std::ostream &out)
Set medium print option.
friend JCenter operator<<(std::ostream &out, const CENTER &format)
Format specifier.