]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/HTMLFormatter.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 #ifndef CEPH_HTML_FORMATTER_H
4 #define CEPH_HTML_FORMATTER_H
9 class HTMLFormatter
: public XMLFormatter
{
11 explicit HTMLFormatter(bool pretty
= false);
12 ~HTMLFormatter() override
;
13 void reset() override
;
15 void set_status(int status
, const char* status_name
) override
;
16 void output_header() override
;
18 void dump_unsigned(std::string_view name
, uint64_t u
) override
;
19 void dump_int(std::string_view name
, int64_t u
) override
;
20 void dump_float(std::string_view name
, double d
) override
;
21 void dump_string(std::string_view name
, std::string_view s
) override
;
22 std::ostream
& dump_stream(std::string_view name
) override
;
23 void dump_format_va(std::string_view name
, const char *ns
, bool quoted
, const char *fmt
, va_list ap
) override
;
26 void dump_string_with_attrs(std::string_view name
, std::string_view s
, const FormatterAttrs
& attrs
) override
;
28 template <typename T
> void dump_template(std::string_view name
, T arg
);
31 const char* m_status_name
;