Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
CENTER::JCenter Struct Reference

Auxiliary class for format center. More...

#include <JManip.hh>

Inheritance diagram for CENTER::JCenter:
WIDTH

Public Member Functions

 JCenter (std::ostream &out, const WIDTH &format)
 Constructor. More...
 
template<class T >
std::ostream & operator<< (const T &value)
 Write value to output stream. More...
 

Public Attributes

int width
 

Private Attributes

std::ostream & out
 

Detailed Description

Auxiliary class for format center.

Definition at line 373 of file JManip.hh.

Constructor & Destructor Documentation

CENTER::JCenter::JCenter ( std::ostream &  out,
const WIDTH format 
)
inline

Constructor.

Parameters
outoutput stream
formatformat center

Definition at line 382 of file JManip.hh.

382  :
383  WIDTH(format),
384  out (out)
385  {}
WIDTH(const int width)
Constructor.
Definition: JManip.hh:237
std::ostream & out
Definition: JManip.hh:415

Member Function Documentation

template<class T >
std::ostream& CENTER::JCenter::operator<< ( const T value)
inline

Write value to output stream.

Parameters
valuevalue
Returns
this JCenter

Definition at line 395 of file JManip.hh.

396  {
397  using namespace std;
398 
399  ostringstream os;
400 
401  os.copyfmt(out);
402 
403  os << value;
404 
405  const int w = this->width - os.str().size();
406  const char c = this->out.fill();
407 
408  if (w > 0)
409  return this->out << FILL(w/2) << ' ' << os.str() << FILL((w+1)/2) << ' ' << setfill(c);
410  else
411  return this->out << os.str();
412  }
data_type w[N+1][M+1]
Definition: JPolint.hh:741
int width
Definition: JManip.hh:257
Auxiliary data structure for sequence of same character.
Definition: JManip.hh:328
std::ostream & out
Definition: JManip.hh:415
$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 &))'

Member Data Documentation

std::ostream& CENTER::JCenter::out
private

Definition at line 415 of file JManip.hh.

int WIDTH::width
inherited

Definition at line 257 of file JManip.hh.


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