|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Abstract base class for all data parsing implementations. More...
#include <IDataParser.hpp>


Public Member Functions | |
| virtual | ~IDataParser ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual void | ParseData (const std::filesystem::path &filepath)=0 |
| Parses data from a file path. | |
| virtual void | ParseData (std::istream &input)=0 |
| Parses data from an input stream. | |
| virtual uint32_t | GetCurrentProgress () const =0 |
| Gets the current parsing progress. | |
| virtual uint32_t | GetTotalProgress () const =0 |
| Gets the total expected progress value. | |
| virtual std::vector< std::pair< std::string, std::string > > | GetFileMetadata () const |
Ordered key → value pairs read from the file header during the last ParseData() call (see db::EventsContainer::SetFileMetadata). | |
| void | RegisterObserver (IDataParserObserver *observer) |
| Registers an observer to receive parsing notifications. | |
| void | UnregisterObserver (IDataParserObserver *observer) |
| void | NotifyNewEvent (db::LogEvent &&event) |
| void | NotifyProgressUpdated () |
| void | NotifyNewEventBatch (std::vector< std::pair< int, db::LogEvent::EventItems > > &&eventBatch) |
Private Attributes | |
| std::vector< IDataParserObserver * > | observers |
Abstract base class for all data parsing implementations.
This class defines the common interface for parsing different log file formats. Concrete implementations handle specific formats (XML, JSON, CSV, etc.) while providing a consistent interface for client code.
|
virtualdefault |
Virtual destructor for proper cleanup of derived classes.
|
pure virtual |
Gets the current parsing progress.
Implemented in parser::AscParser, parser::CsvParser, parser::DltParser, parser::EvlogParser, parser::JsonParser, parser::SapiLogParser, and parser::XmlParser.

|
inlinevirtual |
Ordered key → value pairs read from the file header during the last ParseData() call (see db::EventsContainer::SetFileMetadata).
Reimplemented in parser::SapiLogParser.
|
pure virtual |
Gets the total expected progress value.
Implemented in parser::AscParser, parser::CsvParser, parser::DltParser, parser::EvlogParser, parser::JsonParser, parser::SapiLogParser, and parser::XmlParser.

|
inline |
|
inline |

|
inline |

|
pure virtual |
Parses data from a file path.
| filepath | The path to the file to parse |
| std::runtime_error | if the file cannot be opened or parsed |
Implemented in parser::AscParser, parser::CsvParser, parser::DltParser, parser::EvlogParser, parser::JsonParser, parser::SapiLogParser, and parser::XmlParser.
|
pure virtual |
Parses data from an input stream.
| input | The input stream to read data from |
| std::runtime_error | if the stream cannot be read or parsed |
Implemented in parser::AscParser, parser::CsvParser, parser::DltParser, parser::EvlogParser, parser::JsonParser, parser::SapiLogParser, and parser::XmlParser.
|
inline |
Registers an observer to receive parsing notifications.
| observer | Pointer to the observer object |
|
inline |
|
private |