42 #ifndef LINALGPACK_IO_FORMAT_H
43 #define LINALGPACK_IO_FORMAT_H
47 #include "DenseLinAlgPack_IOBasic.hpp"
49 namespace DenseLinAlgPack {
50 namespace LinAlgPackIO {
115 LinAlgPackIO::fmtflags flags_;
164 format() : prec_(6), wdt_(0), fill_(
' ') {}
307 int precision(
int p) {
int tmp = prec_; prec_ = p;
return tmp; }
311 int width(
int w) {
int tmp = wdt_; wdt_ = w;
return tmp; }
313 int fill()
const {
return fill_; }
315 int fill(
int c) {
int tmp = fill_; fill_ = c;
return tmp; }
356 template<
class T>
class const_bound_format;
384 const T&
obj()
const {
return obj_; }
408 class const_bound_format {
420 const T&
obj()
const {
return obj_; }
447 inline bound_format<T> bind(
const format& f, T& obj) {
448 return bound_format<T>(f,obj);
459 inline const_bound_format<T> cbind(
const format& f,
const T& obj) {
460 return const_bound_format<T>(f,obj);
481 #endif // LINALGPACK_IO_FORMAT_H
fmtflags flags(fmtflags f)
Set the flags.
fmtflags setf(fmtflags f)
Set a flag.
LinAlgPackIO::fmtflags fmtflags
fmtflags setf(fmtflags f, fmtflags mask)
Set a flag under a mask.
void unsetf(fmtflags mask)
Unset a flag(s)
fmtflags flags() const
Get the flags.
bit_flags()
Initialize the flags to 0x0000.