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 lumiQTWidget::t.

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

Definition at line 11 of file OStreamColumn.cc.

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

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

Member Function Documentation

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

Definition at line 59 of file OStreamColumn.h.

60  {
61  return OStreamColumnEntry<T>{*this, t};
62  }
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 17 of file OStreamColumn.cc.

18  {
19  t << std::setw(c.width_) << c.title_;
20  return t;
21  }
template<typename E >
std::ostream& operator<< ( std::ostream &  t,
OStreamColumnEntry< E > const &  ce 
)
friend

Definition at line 79 of file OStreamColumn.h.

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

Member Data Documentation

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

Definition at line 67 of file OStreamColumn.h.

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

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

Definition at line 68 of file OStreamColumn.h.

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