Public Member Functions | Public Attributes | List of all members
recob::dumper::IndentOptions_t Struct Reference

Structure collecting indentation options. More...

#include <NewLine.h>

Public Member Functions

 IndentOptions_t (std::string ind="", bool followLine=false)
 
IndentOptions_tappendIndentation (std::string more)
 
IndentOptions_tremoveIndentation (std::string less)
 

Public Attributes

std::string indent
 indentation string More...
 
bool appendFirst = false
 skip indentation on the first line More...
 

Detailed Description

Structure collecting indentation options.

Definition at line 20 of file NewLine.h.

Constructor & Destructor Documentation

recob::dumper::IndentOptions_t::IndentOptions_t ( std::string  ind = "",
bool  followLine = false 
)
inline

Definition at line 24 of file NewLine.h.

25  : indent(ind), appendFirst(followLine)
26  {}
std::string indent
indentation string
Definition: NewLine.h:21
bool appendFirst
skip indentation on the first line
Definition: NewLine.h:22

Member Function Documentation

IndentOptions_t& recob::dumper::IndentOptions_t::appendIndentation ( std::string  more)
inline

Definition at line 28 of file NewLine.h.

29  { indent += more; appendFirst = false; return *this; }
std::string indent
indentation string
Definition: NewLine.h:21
bool appendFirst
skip indentation on the first line
Definition: NewLine.h:22
IndentOptions_t& recob::dumper::IndentOptions_t::removeIndentation ( std::string  less)
inline

Definition at line 30 of file NewLine.h.

31  {
32  indent.erase(std::max(indent.length() - less.length(), size_t(0)));
33  return *this;
34  }
std::string indent
indentation string
Definition: NewLine.h:21
static int max(int a, int b)

Member Data Documentation

bool recob::dumper::IndentOptions_t::appendFirst = false

skip indentation on the first line

Definition at line 22 of file NewLine.h.

std::string recob::dumper::IndentOptions_t::indent

indentation string

Definition at line 21 of file NewLine.h.


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