LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
IControler.hpp
Go to the documentation of this file.
1
11#ifndef MVC_ICONTRLOLER_HPP
12#define MVC_ICONTRLOLER_HPP
13
14#include <cstddef>
15#include <cstdint>
16#include <filesystem>
17#include <functional>
18#include <string>
19#include <vector>
20
21namespace parser
22{
24}
25
26namespace mvc
27{
36{
37 int eventId {0};
38 std::string matchedKey;
39 std::string matchedText;
40 std::vector<std::string> columnValues;
41};
42
55{
56 public:
63
69 virtual ~IController() { }
70
71 virtual std::vector<std::string> GetSearchColumns() const = 0;
72
73 virtual void SearchEvents(const std::string& query,
74 const std::vector<std::string>& columns,
75 const std::function<void(const SearchResultRow&)>& onResult,
76 std::function<void(size_t, size_t)> progressCallback = {}) = 0;
77
79 virtual void LoadLogFile(const std::filesystem::path& filepath,
80 parser::IDataParserObserver* observer) = 0;
81
83 virtual uint32_t GetParserCurrentProgress() const = 0;
84
86 virtual uint32_t GetParserTotalProgress() const = 0;
87};
88
89} // namespace mvc
90
91#endif // MVC_ICONTRLOLER_HPP
Toolkit-agnostic controller interface for the MVC architecture.
Definition IControler.hpp:55
virtual uint32_t GetParserTotalProgress() const =0
IController()
Default constructor.
Definition IControler.hpp:62
virtual void SearchEvents(const std::string &query, const std::vector< std::string > &columns, const std::function< void(const SearchResultRow &)> &onResult, std::function< void(size_t, size_t)> progressCallback={})=0
virtual uint32_t GetParserCurrentProgress() const =0
virtual std::vector< std::string > GetSearchColumns() const =0
virtual ~IController()
Default destructor.
Definition IControler.hpp:69
virtual void LoadLogFile(const std::filesystem::path &filepath, parser::IDataParserObserver *observer)=0
Parses and loads the provided log file into the model.
Observer interface for receiving notifications from data parsers.
Definition IDataParser.hpp:52
Definition IControler.hpp:27
Data parsing components and interfaces.
Definition IControler.hpp:22
Result row returned by IController::SearchEvents() for each matching event.
Definition IControler.hpp:36
std::string matchedKey
Definition IControler.hpp:38
std::vector< std::string > columnValues
Definition IControler.hpp:40
std::string matchedText
Definition IControler.hpp:39
int eventId
Definition IControler.hpp:37