#include <file_monitor_source.h>
◆ FileMonitorSource()
| cuttlefish::FileMonitorSource::FileMonitorSource |
( |
std::string |
path, |
|
|
std::unique_ptr< ReaderSeeker > |
file_io, |
|
|
std::function< Result< std::string >(std::string_view)> |
colorize_line, |
|
|
std::function< Result< bool >(std::string_view)> |
filter_line |
|
) |
| |
◆ ~FileMonitorSource()
| cuttlefish::FileMonitorSource::~FileMonitorSource |
( |
| ) |
|
|
overridedefault |
◆ ReadyFd()
| SharedFD cuttlefish::FileMonitorSource::ReadyFd |
( |
| ) |
|
|
overridevirtual |
When this file descriptor is ready for reading (as defined by poll), it is ready to report new data from Report.
If the file descriptor is invalid, the source is always considered ready.
Implements cuttlefish::MonitorSource.
◆ Report()
| MonitorOutput cuttlefish::FileMonitorSource::Report |
( |
size_t |
rows, |
|
|
size_t |
columns |
|
) |
| |
|
overridevirtual |
Pulls new information from the data source if there is any and returns the text that should be shown in the monitor window.
rows and columns are hints for the output. May output more or less.
Implements cuttlefish::MonitorSource.
◆ colorize_line_
| std::function<Result<std::string>(std::string_view)> cuttlefish::FileMonitorSource::colorize_line_ |
|
private |
◆ file_io_
| std::unique_ptr<ReaderSeeker> cuttlefish::FileMonitorSource::file_io_ |
|
private |
◆ filter_line_
| std::function<Result<bool>(std::string_view)> cuttlefish::FileMonitorSource::filter_line_ |
|
private |
◆ inotify_fd_
| SharedFD cuttlefish::FileMonitorSource::inotify_fd_ |
|
private |
◆ path_
| std::string cuttlefish::FileMonitorSource::path_ |
|
private |
The documentation for this class was generated from the following files: