12 #include <boost/variant.hpp>
13 #include <boost/utility/string_ref.hpp>
26 class StructTypeInterface;
27 class ListTypeInterface;
28 class MapTypeInterface;
69 Documentation = 1 << 1,
70 RawSignatures = 1 << 2
111 DelimitWithSpace = 1 << 0,
120 char fillChar =
' ');
131 KA_GENERATE_FRIEND_REGULAR_OPS_6(
Column, value,
color, alignment, opts, width, fillChar)
153 explicit Line(
const std::initializer_list<Column>& columns);
159 KA_GENERATE_FRIEND_REGULAR_OPS_2(Line, columns, opts)
166 static const string_ref infoLabel;
167 static const string_ref methodsLabel;
168 static const string_ref signalsLabel;
169 static const string_ref propertiesLabel;
170 static const string_ref membersLabel;
171 static const string_ref returnTypeLabel;
172 static const string_ref returnDescrLabel;
173 static const string_ref elementTypeLabel;
174 static const string_ref keyTypeLabel;
175 static const string_ref parametersLabel;
176 static const string_ref signalTypesLabel;
181 int indentLevel = 0);
188 : _stream(std::move(o._stream))
189 , _displayHidden(std::move(o._displayHidden))
190 , _options(std::move(o._options))
191 , _indentLevel(std::move(o._indentLevel))
199 _stream = std::move(o._stream);
200 _displayHidden = std::move(o._displayHidden);
201 _options = std::move(o._options);
202 _indentLevel = std::move(o._indentLevel);
208 static Line makeSectionHeader(
const Line& line);
209 static Line makeSubSectionHeader(
const Line& line);
211 IndentLevelPtr makeIndentLevel();
213 void print(
const Line& line);
215 void print(
const MetaMethod& method,
int offsetLabel = 0, RecurseOption recurse = RecurseOption::Recurse);
216 void print(
const MetaSignal& signal,
int offsetLabel = 0, RecurseOption recurse = RecurseOption::Recurse);
217 void print(
const MetaProperty& property,
int offsetLabel = 0, RecurseOption recurse = RecurseOption::Recurse);
225 template <
typename P>
228 print(std::forward<P>(printable));
233 inline int indentWidth()
const
235 return _indentLevel * indentFactor;
238 void increaseIndent();
239 void decreaseIndent();
246 void print(
const Column& column)
const;
248 void printParameters(
const std::vector<qi::Signature>& paramsSignatures,
249 const std::string& label,
250 RecurseOption recurse);
253 template <
typename Proc>
254 void printParameters(
const std::vector<qi::Signature>& paramsSignatures,
255 const std::string& label,
256 RecurseOption recurse,
260 template <
typename Proc>
266 template <
typename L>
267 void printMetaObjectMembers(
const L& members, string_ref headerLabel);
269 static const int indentFactor;
270 static const int maxOffset;
271 static const int idColumnWidth;
272 std::ostream* _stream;
303 : _stream(std::move(o._stream))
304 , _displayHidden(std::move(o._displayHidden))
312 _stream = std::move(o._stream);
313 _displayHidden = std::move(o._displayHidden);
320 template <
typename S>
323 *_stream << std::forward<S>(streamable);
337 template <
typename L>
338 void printMetaObjectMembers(
const L& members);
340 std::ostream* _stream;
347 #endif // QI_PRINT_HPP
Contains the data and options needed to fill and format one column of a line.
boost::string_ref string_ref
PrettyPrintStream & operator<<(P &&printable)
ParseablePrintStream & operator=(ParseablePrintStream &&o) BOOST_NOEXCEPT
dll import/export and compiler message
StreamColor
The Stream Color enum.
ParseablePrintStream & operator<<(const MetaObject &obj)
ParseablePrintStream(ParseablePrintStream &&o) BOOST_NOEXCEPT
Encapsulates in a RAII style a shift or an indentation level of a PrettyPrintStream instance...
boost::variant< int, std::string > ValueType
std::vector< Column > Columns
PrettyPrintStream & operator=(PrettyPrintStream &&o) BOOST_NOEXCEPT
std::unique_ptr< IndentLevel > IndentLevelPtr
ParseablePrintStream & operator<<(S &&streamable)
OutputStreamable S.
LogColor color()
Get log color.
PrettyPrintStream(PrettyPrintStream &&o) BOOST_NOEXCEPT