13 #ifndef CT_PRINTCTRL_H
14 #define CT_PRINTCTRL_H
90 PrintCtrl(std::ostream& coutProxy = std::cout,
int Ndec = -1000,
108 void pr_de(
const double d,
int sigDigits = -1,
109 const int wMin = -1,
const int wMax = -1);
128 void pr_de_c10(
const double d,
int sigDigits = -1,
129 const int wMin = -1,
const int wMax = -1);
163 double cropAbs10(
const double d,
const int nDecades)
const;
Turn on cropping unless the global toggle is turned off.
CROP_TYPE
enum for cropping control
global toggle for turning off cropping
int m_wMin
default minimimum field width
double cropAbs10(const double d, const int nDecades) const
Crop a double at a certain decade level.
void setCropCntrl(CROP_TYPE ctlocal)
Set the cropping control flag.
bool doCrop() const
private function to figure out cropping logic
void pr_de_c10(const double d, int sigDigits=-1, const int wMin=-1, const int wMax=-1)
Print a double using scientific notation cropping decade values.
Turn off cropping, unless the global toggle is turned on.
int setWmin(int wMin)
Set the default minimum width.
double cropSigDigits(const double d, int sigDigits) const
Crop a double at a certain number of significant digits.
int m_wMax
Default maximum field width.
CROP_TYPE_GLOBAL
enum for global cropping control
int m_Ndec
Default decade level to use for decade cropping.
global toggle for turning on cropping
void pr_de(const double d, int sigDigits=-1, const int wMin=-1, const int wMax=-1)
Print a double using scientific notation.
std::ostream & m_cout
This is the ostream to send all output from the object.
int setSigDigits(int sigDigits)
Set the default significant digits to output.
CROP_TYPE m_cropCntrl
Local Cropping Control.
Turn off cropping always.
PrintCtrl(std::ostream &coutProxy=std::cout, int Ndec=-1000, CROP_TYPE ctlocal=CT_ON)
Constructor.
int setWmax(int wMax)
Set the default maximum width.
int setNdec(int nDecades)
Set the default value of N decade.
This class provides some printing and cropping utilities.
int m_precision
default precision level to use in printing
static CROP_TYPE_GLOBAL GlobalCrop
static enum for turning on and off cropping
no preference for global cropping