libfilezilla
Toggle main menu visibility
Loading...
Searching...
No Matches
lib
libfilezilla
aio
xml_writer.hpp
Go to the documentation of this file.
1
#ifndef LIBFILEZILLA_AIO_XML_WRITER_HEADER
2
#define LIBFILEZILLA_AIO_XML_WRITER_HEADER
3
7
8
#include "
writer.hpp
"
9
#include "
../xml.hpp
"
10
11
#include <optional>
12
13
namespace
fz
{
15
class
FZ_PUBLIC_SYMBOL xml_parser_writer final :
public
writer_base
16
{
17
public
:
18
xml_parser_writer(
xml::parser::callback_t
&& cb, std::wstring
const
& name,
aio_buffer_pool
& pool,
progress_cb_t
&& progress_cb =
nullptr
);
19
20
void
enable_pretty_log(
logmsg::type
t);
21
22
private
:
23
virtual
aio_result
FZ_PRIVATE_SYMBOL do_add_buffer(
scoped_lock
&,
buffer_lease
&& b)
override
;
24
virtual
aio_result
FZ_PRIVATE_SYMBOL do_finalize(
scoped_lock
&)
override
;
25
26
xml::parser
parser_;
27
xml::parser::callback_t
cb_;
28
std::optional<xml::pretty_logger> logger_;
29
};
30
32
class
FZ_PUBLIC_SYMBOL xml_namespace_parser_writer final :
public
writer_base
33
{
34
public
:
35
xml_namespace_parser_writer(
xml::parser::callback_t
&& cb, std::wstring
const
& name,
aio_buffer_pool
& pool,
progress_cb_t
&& progress_cb =
nullptr
);
36
37
void
enable_pretty_log(
logmsg::type
t);
38
39
private
:
40
virtual
aio_result
FZ_PRIVATE_SYMBOL do_add_buffer(
scoped_lock
&,
buffer_lease
&& b)
override
;
41
virtual
aio_result
FZ_PRIVATE_SYMBOL do_finalize(
scoped_lock
&)
override
;
42
43
xml::namespace_parser
parser_;
44
std::optional<xml::pretty_logger> logger_;
45
};
46
}
47
48
#endif
fz::aio_buffer_pool
A buffer pool for use with async readers/writers.
Definition
aio.hpp:107
fz::buffer_lease
Definition
aio.hpp:26
fz::scoped_lock
A simple scoped lock.
Definition
mutex.hpp:117
fz::writer_base::progress_cb_t
std::function< void(writer_base const *, uint64_t written)> progress_cb_t
Definition
writer.hpp:75
fz::xml::namespace_parser
A stremable XML parser that resolves namespace declarations and namespace prefixes.
Definition
xml.hpp:184
fz::xml::parser
A streaming XML parser.
Definition
xml.hpp:54
fz::xml::parser::callback_t
std::function< bool(callback_event type, std::string_view path, std::string_view name, std::string &&value)> callback_t
Definition
xml.hpp:62
fz::logmsg::type
type
Definition
logger.hpp:16
fz
The namespace used by libfilezilla.
Definition
apply.hpp:17
fz::aio_result
aio_result
Result of aio operations.
Definition
aio.hpp:190
writer.hpp
Classes for writing data asynchronously into files.
xml.hpp
Streaming XML parser, including a parser with namespace support.
Generated by
1.17.0