CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
edm::OStreamColumn Class Reference

#include <OStreamColumn.h>

Public Member Functions

template<typename T >
auto operator() (T const &t) const
 
 OStreamColumn (std::string const &t)
 
 OStreamColumn (std::string const &t, std::size_t const w)
 
std::size_t width () const
 

Private Attributes

std::string title_
 
std::size_t width_
 

Friends

std::ostream & operator<< (std::ostream &, OStreamColumn const &)
 
template<typename E >
std::ostream & operator<< (std::ostream &, OStreamColumnEntry< E > const &)
 

Detailed Description

Definition at line 53 of file OStreamColumn.h.

Constructor & Destructor Documentation

OStreamColumn::OStreamColumn ( std::string const &  t)
explicit

Definition at line 7 of file OStreamColumn.cc.

References protons_cff::t.

OStreamColumn::OStreamColumn ( std::string const &  t,
std::size_t const  w 
)
explicit

Definition at line 9 of file OStreamColumn.cc.

References SiStripPI::max, title_, w, and width_.

10  : title_{t}, width_{std::max(w, title_.size())} {}
const double w
Definition: UKUtility.cc:23
std::string title_
Definition: OStreamColumn.h:66
std::size_t width_
Definition: OStreamColumn.h:67

Member Function Documentation

template<typename T >
auto edm::OStreamColumn::operator() ( T const &  t) const
inline

Definition at line 59 of file OStreamColumn.h.

59  {
60  return OStreamColumnEntry<T>{*this, t};
61  }
std::size_t edm::OStreamColumn::width ( ) const
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  t,
OStreamColumn const &  c 
)
friend

Definition at line 12 of file OStreamColumn.cc.

12  {
13  t << std::setw(c.width_) << c.title_;
14  return t;
15  }
template<typename E >
std::ostream& operator<< ( std::ostream &  t,
OStreamColumnEntry< E > const &  ce 
)
friend

Definition at line 78 of file OStreamColumn.h.

78  {
79  t << std::setw(ce.col.width_) << ce.t;
80  return t;
81  }

Member Data Documentation

std::string edm::OStreamColumn::title_
private

Definition at line 66 of file OStreamColumn.h.

Referenced by edm::operator<<(), and OStreamColumn().

std::size_t edm::OStreamColumn::width_
private

Definition at line 67 of file OStreamColumn.h.

Referenced by edm::operator<<(), and OStreamColumn().