- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
qi::detail::PrettyPrintStream Class Reference

`#include <print.hpp>`

## Classes
struct | Column
| Contains the data and options needed to fill and format one column of a line. More...
class | IndentLevel
| Encapsulates in a RAII style a shift or an indentation level of a PrettyPrintStream instance. More...
struct | Line

## Public Types
enum | Option { Option::Colorized = 1 << 0, Option::Documentation = 1 << 1, Option::RawSignatures = 1 << 2 }
enum | RecurseOption : bool { RecurseOption::DoNotRecurse = false, RecurseOption::Recurse = true }
using | Options = qi::Flags< Option >
using | IndentLevelPtr = std::unique_ptr< IndentLevel >
using | Columns = std::vector< Column >
using | string_ref = boost::string_ref

## Public Member Functions
| PrettyPrintStream (std::ostream &stream, DisplayHiddenMembers displayHidden=DisplayHiddenMembers::Hide, Options flags=Options{Option::Colorized}, int indentLevel=0)
| PrettyPrintStream (const PrettyPrintStream &)=delete
PrettyPrintStream & | operator= (const PrettyPrintStream &)=delete
| PrettyPrintStream (PrettyPrintStream &&o) BOOST_NOEXCEPT
PrettyPrintStream & | operator= (PrettyPrintStream &&o) BOOST_NOEXCEPT
IndentLevelPtr | makeIndentLevel ()
void | print (const Line &line)
void | print (const MetaObject &mobj)
void | print (const MetaMethod &method, int offsetLabel=0, RecurseOption recurse=RecurseOption::Recurse)
void | print (const MetaSignal &signal, int offsetLabel=0, RecurseOption recurse=RecurseOption::Recurse)
void | print (const MetaProperty &property, int offsetLabel=0, RecurseOption recurse=RecurseOption::Recurse)
void | print (TypeInterface *type)
void | print (StructTypeInterface &structType)
void | print (ListTypeInterface &listType)
void | print (MapTypeInterface &mapType)
template<typename P >
PrettyPrintStream & | operator<< (P &&printable)

## Static Public Member Functions
static Line | makeSectionHeader (const Line &line)
static Line | makeSubSectionHeader (const Line &line)

## Public Attributes
friend | IndentLevel

## Static Public Attributes
static const string_ref | infoLabel
static const string_ref | methodsLabel
static const string_ref | signalsLabel
static const string_ref | propertiesLabel
static const string_ref | membersLabel
static const string_ref | returnTypeLabel
static const string_ref | returnDescrLabel
static const string_ref | elementTypeLabel
static const string_ref | keyTypeLabel
static const string_ref | parametersLabel
static const string_ref | signalTypesLabel

## Detailed Description

Provides facilities to print informations about types into a stream in a user friendly formatting. It also supports indentation. This class is movable but not copyable, thus not regular.

Example: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

- PrettyPrintStream stream(std::cout, DisplayHiddenMembers::Display,
- PrettyPrintSteam::Options{ PrettyPrintStream::Option::Colorized
- | PrettyPrintStream::Option::Documentation });
- MetaObject object = ...;
- stream << object;
- stream << PrettyPrintStream::makeSectionHeader(
- PrettyPrintStream::Line{ PrettyPrintStream::Column("here comes a method") });
- {
- const auto indent = stream.makeIndentLevel();
- MetaMethod method = ...;
- stream << method;
- }
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

Definition at line 63 of file print.hpp.

## Member Typedef Documentation

using qi::detail::PrettyPrintStream::Columns = std::vector<Column>

Definition at line 140 of file print.hpp.

using qi::detail::PrettyPrintStream::IndentLevelPtr = std::unique_ptr<IndentLevel>

Definition at line 97 of file print.hpp.

using qi::detail::PrettyPrintStream::Options = qi::Flags<Option>

Definition at line 72 of file print.hpp.

using qi::detail::PrettyPrintStream::string_ref = boost::string_ref

Definition at line 165 of file print.hpp.

## Member Enumeration Documentation

enum qi::detail::PrettyPrintStream::Option
| strong

Enumerator
Colorized |
Documentation |
RawSignatures |

Definition at line 66 of file print.hpp.

enum qi::detail::PrettyPrintStream::RecurseOption : bool
| strong

Enumerator
DoNotRecurse |
Recurse |

Definition at line 74 of file print.hpp.

## Constructor & Destructor Documentation

qi::detail::PrettyPrintStream::PrettyPrintStream | ( | std::ostream & | stream,
|  | DisplayHiddenMembers | displayHidden = `DisplayHiddenMembers::Hide`,
|  | Options | flags = `Options{Option::Colorized}`,
|  | int | indentLevel = `0`
| ) |  |
| explicit

qi::detail::PrettyPrintStream::PrettyPrintStream | ( | const PrettyPrintStream & |  | ) |
| delete

qi::detail::PrettyPrintStream::PrettyPrintStream | ( | PrettyPrintStream && | o | ) |
| inline

Definition at line 187 of file print.hpp.

## Member Function Documentation

IndentLevelPtr qi::detail::PrettyPrintStream::makeIndentLevel | ( |  | ) |

static Line qi::detail::PrettyPrintStream::makeSectionHeader | ( | const Line & | line | ) |
| static

static Line qi::detail::PrettyPrintStream::makeSubSectionHeader | ( | const Line & | line | ) |
| static

template<typename P >

PrettyPrintStream& qi::detail::PrettyPrintStream::operator<< | ( | P && | printable | ) |
| inline

With PrettyPrintStream& s, P printable, the following is valid: s.print(printable);

Definition at line 226 of file print.hpp.

PrettyPrintStream& qi::detail::PrettyPrintStream::operator= | ( | const PrettyPrintStream & |  | ) |
| delete

PrettyPrintStream& qi::detail::PrettyPrintStream::operator= | ( | PrettyPrintStream && | o | ) |
| inline

Definition at line 197 of file print.hpp.

void qi::detail::PrettyPrintStream::print | ( | const Line & | line | ) |

void qi::detail::PrettyPrintStream::print | ( | const MetaObject & | mobj | ) |

void qi::detail::PrettyPrintStream::print | ( | const MetaMethod & | method,
|  | int | offsetLabel = `0`,
|  | RecurseOption | recurse = `RecurseOption::Recurse`
| ) |  |

void qi::detail::PrettyPrintStream::print | ( | const MetaSignal & | signal,
|  | int | offsetLabel = `0`,
|  | RecurseOption | recurse = `RecurseOption::Recurse`
| ) |  |

void qi::detail::PrettyPrintStream::print | ( | const MetaProperty & | property,
|  | int | offsetLabel = `0`,
|  | RecurseOption | recurse = `RecurseOption::Recurse`
| ) |  |

void qi::detail::PrettyPrintStream::print | ( | TypeInterface * | type | ) |

void qi::detail::PrettyPrintStream::print | ( | StructTypeInterface & | structType | ) |

void qi::detail::PrettyPrintStream::print | ( | ListTypeInterface & | listType | ) |

void qi::detail::PrettyPrintStream::print | ( | MapTypeInterface & | mapType | ) |

## Member Data Documentation

const string_ref qi::detail::PrettyPrintStream::elementTypeLabel
| static

Definition at line 173 of file print.hpp.

friend qi::detail::PrettyPrintStream::IndentLevel

Definition at line 96 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::infoLabel
| static

Definition at line 166 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::keyTypeLabel
| static

Definition at line 174 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::membersLabel
| static

Definition at line 170 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::methodsLabel
| static

Definition at line 167 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::parametersLabel
| static

Definition at line 175 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::propertiesLabel
| static

Definition at line 169 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::returnDescrLabel
| static

Definition at line 172 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::returnTypeLabel
| static

Definition at line 171 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::signalsLabel
| static

Definition at line 168 of file print.hpp.

const string_ref qi::detail::PrettyPrintStream::signalTypesLabel
| static

Definition at line 176 of file print.hpp.

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

- /home/opennao/work/release-2.8/sdk/libqi/qi/detail/print.hpp