CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
edm::DocFormatHelper Class Reference

#include <DocFormatHelper.h>

Public Types

enum  DescriptionParent {
  TOP, OR, XOR, AND,
  OTHER
}
 

Public Member Functions

bool brief () const
 
size_t column1 () const
 
size_t column2 () const
 
size_t column3 () const
 
size_t commentWidth () const
 
int counter () const
 
void decrementCounter ()
 
 DocFormatHelper ()
 
void incrementCounter ()
 
void indent (std::ostream &os) const
 
void indent2 (std::ostream &os) const
 
int indentation () const
 
void init ()
 
size_t lineWidth () const
 
DescriptionParent parent () const
 
int pass () const
 
std::string const & section () const
 
void setAtLeast1 (size_t width)
 
void setAtLeast2 (size_t width)
 
void setAtLeast3 (size_t width)
 
void setBrief (bool value)
 
void setCounter (int value)
 
void setIndentation (int value)
 
void setLineWidth (size_t value)
 
void setParent (DescriptionParent value)
 
void setPass (int value)
 
void setSection (std::string const &value)
 
int startColumn2 () const
 

Static Public Member Functions

static int offsetModuleLabel ()
 
static int offsetSectionContent ()
 
static int offsetTopLevelPSet ()
 
static void wrapAndPrintText (std::ostream &os, std::string const &text, size_t indent, size_t suggestedWidth)
 

Private Attributes

bool brief_
 
size_t column1_
 
size_t column2_
 
size_t column3_
 
int counter_
 
int indentation_
 
size_t lineWidth_
 
DescriptionParent parent_
 
int pass_
 
std::string section_
 
size_t startColumn2_
 

Detailed Description

Definition at line 15 of file DocFormatHelper.h.

Member Enumeration Documentation

Enumerator
TOP 
OR 
XOR 
AND 
OTHER 

Definition at line 19 of file DocFormatHelper.h.

Constructor & Destructor Documentation

edm::DocFormatHelper::DocFormatHelper ( )
inline

Definition at line 27 of file DocFormatHelper.h.

Member Function Documentation

bool edm::DocFormatHelper::brief ( ) const
inline

Definition at line 43 of file DocFormatHelper.h.

References brief_.

Referenced by edm::ParameterSetDescription::print(), edm::EmptyGroupDescription::print_(), edm::AllowedLabelsDescriptionBase::print_(), edm::IfExistsDescription::print_(), edm::ORGroupDescription::print_(), edm::ANDGroupDescription::print_(), edm::XORGroupDescription::print_(), edm::ParameterWildcardBase::print_(), edm::ParameterDescriptionBase::print_(), edm::ParameterSwitchBase::printBase(), edm::ParameterDescriptionBase::printDefault_(), edm::AllowedLabelsDescriptionBase::printNestedContent_(), edm::XORGroupDescription::printNestedContent_(), edm::IfExistsDescription::printNestedContent_(), edm::ORGroupDescription::printNestedContent_(), edm::ANDGroupDescription::printNestedContent_(), edm::AllowedLabelsDescription< ParameterSetDescription >::printNestedContent_(), edm::ParameterWildcard< ParameterSetDescription >::printNestedContent_(), edm::ParameterDescriptionBase::printNestedContent_(), edm::AllowedLabelsDescription< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterWildcard< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterDescription< ParameterSetDescription >::printNestedContent_(), edm::ParameterDescription< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterSwitchBase::printNestedContentBase(), and edm::AllowedLabelsDescriptionBase::printNestedContentBase_().

43 { return brief_; }
size_t edm::DocFormatHelper::column1 ( ) const
inline
size_t edm::DocFormatHelper::column2 ( ) const
inline
size_t edm::DocFormatHelper::column3 ( ) const
inline
size_t edm::DocFormatHelper::commentWidth ( ) const

Definition at line 125 of file DocFormatHelper.cc.

References lineWidth(), startColumn2(), and tablePrinter::width.

Referenced by edm::AllowedLabelsDescriptionBase::print_(), edm::XORGroupDescription::print_(), edm::ANDGroupDescription::print_(), edm::ORGroupDescription::print_(), edm::IfExistsDescription::print_(), edm::ParameterWildcardBase::print_(), edm::ParameterDescriptionBase::print_(), and edm::ParameterSwitchBase::printBase().

125  {
126 
127  // Make the length of a comment at least 30 characters
128  // per line, longer if there is more space available
129  size_t width = 30U;
130  if (lineWidth() > startColumn2() + 30U) {
131  width = lineWidth() - startColumn2();
132  }
133  return width;
134  }
int startColumn2() const
size_t lineWidth() const
int edm::DocFormatHelper::counter ( ) const
inline
void edm::DocFormatHelper::decrementCounter ( )
inline
void edm::DocFormatHelper::incrementCounter ( )
inline
void edm::DocFormatHelper::indent ( std::ostream &  os) const
void edm::DocFormatHelper::indent2 ( std::ostream &  os) const
int edm::DocFormatHelper::indentation ( ) const
inline
void edm::DocFormatHelper::init ( void  )
size_t edm::DocFormatHelper::lineWidth ( ) const
inline

Definition at line 44 of file DocFormatHelper.h.

References lineWidth_.

Referenced by commentWidth().

44 { return lineWidth_; }
static int edm::DocFormatHelper::offsetModuleLabel ( )
inlinestatic

Definition at line 84 of file DocFormatHelper.h.

Referenced by edm::ConfigurationDescriptions::print().

84 { return 2; }
static int edm::DocFormatHelper::offsetSectionContent ( )
inlinestatic
static int edm::DocFormatHelper::offsetTopLevelPSet ( )
inlinestatic

Definition at line 85 of file DocFormatHelper.h.

Referenced by edm::ConfigurationDescriptions::printForLabel().

85 { return 2; }
DescriptionParent edm::DocFormatHelper::parent ( void  ) const
inline

Definition at line 71 of file DocFormatHelper.h.

References parent_.

Referenced by python.Vispa.Gui.ConnectableWidget.ConnectableWidget::addMenuEntry(), python.Vispa.Views.LineDecayView.LineDecayContainer::applyFilter(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::arrangeUsingRelations(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::autolayoutAlgorithm(), python.Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner::autosizeScrollArea(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::autosizeScrollArea(), python.Vispa.Gui.PortWidget.PortWidget::connectionPoint(), python.Vispa.Main.StartupScreen.StartupScreen::createDescriptionWidget(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::dataAccessor(), python.Vispa.Views.LineDecayView.LineDecayContainer::dataAccessor(), python.Vispa.Views.LineDecayView.LineDecayContainer::delete(), python.Vispa.Gui.VispaWidget.VispaWidget::delete(), python.Vispa.Gui.VispaWidget.VispaWidget::dragWidget(), python.Vispa.Share.ImageExporter.ImageExporter::exportImageDialog(), python.Vispa.Gui.VispaWidget.VispaWidget::keyPressEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::leaveEvent(), python.Vispa.Gui.PortWidget.PortWidget::moduleParent(), python.Vispa.Gui.WidgetContainer.WidgetContainer::mouseDoubleClickEvent(), python.Vispa.Gui.VispaWidget.VispaWidget::mouseDoubleClickEvent(), python.Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), python.Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), python.Vispa.Views.LineDecayView.ParticleWidget::mousePressEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::noDecorationsMode(), python.Vispa.Views.LineDecayView.LineDecayContainer::operationId(), python.Vispa.Gui.VispaWidget.VispaWidget::paintEvent(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), edm::ANDGroupDescription::print_(), edm::ORGroupDescription::print_(), edm::XORGroupDescription::print_(), edm::ORGroupDescription::printNestedContent_(), edm::ANDGroupDescription::printNestedContent_(), edm::IfExistsDescription::printNestedContent_(), edm::XORGroupDescription::printNestedContent_(), edm::AllowedLabelsDescription< ParameterSetDescription >::printNestedContent_(), edm::ParameterWildcard< ParameterSetDescription >::printNestedContent_(), edm::ParameterDescriptionBase::printNestedContent_(), edm::AllowedLabelsDescription< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterWildcard< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterDescription< ParameterSetDescription >::printNestedContent_(), edm::ParameterDescription< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterSwitchBase::printNestedContentBase(), edm::AllowedLabelsDescriptionBase::printNestedContentBase_(), python.Vispa.Views.WidgetView.WidgetView::restoreSelection(), python.Vispa.Views.WidgetView.WidgetView::select(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::sizeHint(), python.Vispa.Views.LineDecayView.LineDecayContainer::tabController(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::toggleCollapsed(), python.Vispa.Views.PropertyView.PropertyView::valueChanged(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::widgetByObject(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDoubleClicked(), and python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDragged().

71 { return parent_; }
DescriptionParent parent_
int edm::DocFormatHelper::pass ( ) const
inline
std::string const& edm::DocFormatHelper::section ( ) const
inline

Definition at line 52 of file DocFormatHelper.h.

References section_.

Referenced by VarParsing.VarParsing::parseArguments(), edm::AllowedLabelsDescriptionBase::print_(), edm::IfExistsDescription::print_(), edm::ORGroupDescription::print_(), edm::XORGroupDescription::print_(), edm::ANDGroupDescription::print_(), edm::ParameterWildcardBase::print_(), edm::ParameterSwitchBase::printBase(), edm::ParameterDescriptionBase::printDefault_(), edm::ParameterDescription< ParameterSetDescription >::printDefault_(), edm::ParameterDescription< std::vector< ParameterSet > >::printDefault_(), edm::IfExistsDescription::printNestedContent_(), edm::ORGroupDescription::printNestedContent_(), edm::XORGroupDescription::printNestedContent_(), edm::ANDGroupDescription::printNestedContent_(), edm::AllowedLabelsDescription< ParameterSetDescription >::printNestedContent_(), edm::ParameterWildcard< ParameterSetDescription >::printNestedContent_(), edm::ParameterDescriptionBase::printNestedContent_(), edm::AllowedLabelsDescription< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterWildcard< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterDescription< ParameterSetDescription >::printNestedContent_(), edm::ParameterDescription< std::vector< ParameterSet > >::printNestedContent_(), edm::ParameterSwitchBase::printNestedContentBase(), and edm::AllowedLabelsDescriptionBase::printNestedContentBase_().

52 { return section_; }
void edm::DocFormatHelper::setAtLeast1 ( size_t  width)
inline
void edm::DocFormatHelper::setAtLeast2 ( size_t  width)
inline
void edm::DocFormatHelper::setAtLeast3 ( size_t  width)
inline
void edm::DocFormatHelper::setBrief ( bool  value)
inline
void edm::DocFormatHelper::setCounter ( int  value)
inline
void edm::DocFormatHelper::setIndentation ( int  value)
inline
void edm::DocFormatHelper::setLineWidth ( size_t  value)
inline
void edm::DocFormatHelper::setParent ( DescriptionParent  value)
inline
void edm::DocFormatHelper::setPass ( int  value)
inline
void edm::DocFormatHelper::setSection ( std::string const &  value)
inline
int edm::DocFormatHelper::startColumn2 ( ) const
inline
void edm::DocFormatHelper::wrapAndPrintText ( std::ostream &  os,
std::string const &  text,
size_t  indent,
size_t  suggestedWidth 
)
static

Definition at line 98 of file DocFormatHelper.cc.

References indent().

Referenced by edm::ConfigurationDescriptions::print(), edm::AllowedLabelsDescriptionBase::print_(), edm::ANDGroupDescription::print_(), edm::IfExistsDescription::print_(), edm::XORGroupDescription::print_(), edm::ORGroupDescription::print_(), edm::ParameterWildcardBase::print_(), edm::ParameterDescriptionBase::print_(), edm::ParameterSwitchBase::printBase(), and edm::ConfigurationDescriptions::printForLabel().

101  {
102 
103  size_t pos = text.find_first_of('\n');
104  if (pos == std::string::npos) {
105  // no embedded newlines
106  wrapAndPrintLine(os, text, indent, suggestedWidth);
107  } else {
108  // print the first line.
109  wrapAndPrintLine(os, text.substr(0, pos), indent, suggestedWidth);
110  // print all lines after the first.
111  wrapAndPrintText(os, text.substr(pos + 1), indent, suggestedWidth);
112  }
113  }
static void wrapAndPrintText(std::ostream &os, std::string const &text, size_t indent, size_t suggestedWidth)
tuple text
Definition: runonSM.py:42
void indent(std::ostream &os) const

Member Data Documentation

bool edm::DocFormatHelper::brief_
private

Definition at line 90 of file DocFormatHelper.h.

Referenced by brief(), and setBrief().

size_t edm::DocFormatHelper::column1_
private

Definition at line 99 of file DocFormatHelper.h.

Referenced by column1(), init(), and setAtLeast1().

size_t edm::DocFormatHelper::column2_
private

Definition at line 100 of file DocFormatHelper.h.

Referenced by column2(), init(), and setAtLeast2().

size_t edm::DocFormatHelper::column3_
private

Definition at line 101 of file DocFormatHelper.h.

Referenced by column3(), init(), and setAtLeast3().

int edm::DocFormatHelper::counter_
private

Definition at line 103 of file DocFormatHelper.h.

Referenced by counter(), decrementCounter(), incrementCounter(), init(), and setCounter().

int edm::DocFormatHelper::indentation_
private

Definition at line 92 of file DocFormatHelper.h.

Referenced by indent(), indentation(), and setIndentation().

size_t edm::DocFormatHelper::lineWidth_
private

Definition at line 91 of file DocFormatHelper.h.

Referenced by lineWidth(), and setLineWidth().

DescriptionParent edm::DocFormatHelper::parent_
private

Definition at line 105 of file DocFormatHelper.h.

Referenced by init(), parent(), and setParent().

int edm::DocFormatHelper::pass_
private

Definition at line 97 of file DocFormatHelper.h.

Referenced by init(), pass(), and setPass().

std::string edm::DocFormatHelper::section_
private

Definition at line 95 of file DocFormatHelper.h.

Referenced by init(), section(), and setSection().

size_t edm::DocFormatHelper::startColumn2_
private

Definition at line 93 of file DocFormatHelper.h.

Referenced by indent2(), and startColumn2().