LibKEduVocDocument

readerbase.h
1/*
2 * SPDX-FileCopyrightText: 2014 Andreas Xavier <andxav at zoho dot com>
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
6#ifndef READERBASE_H
7#define READERBASE_H
8
9#include "keduvocdocument.h"
10
11#include <QDebug>
12
13class KEduVocDocument;
14
15/**
16 * @brief a base class for readers of various lexicon formats
17 *
18 * */
20{
21public:
22 /** destructor */
23 virtual ~ReaderBase() {};
24
25 /** @brief Can this reader parse the file
26 *
27 * Read a small portion of the header of the file
28 * and decide if it is a suitable type.
29 * @return true if parsable
30 */
31 virtual bool isParsable() = 0;
32
33 /** @brief returns the KEduVocDocument::FileType that this reader handles
34 @return KEduVocDocument::FileType handled
35 */
37
38 /** @brief Parse file and write into doc
39 @param doc to be written
40 @return error status of the read.*/
42
43 /** an error message.
44 @return the error message
45 */
46 virtual QString errorMessage() const = 0;
47};
48
49#endif // READERBASE_H
The primary entry point to the hierarchy of objects describing vocabularies.
ErrorCode
the return code when opening/saving
FileType
known vocabulary file types
a base class for readers of various lexicon formats
Definition readerbase.h:20
virtual QString errorMessage() const =0
an error message.
virtual KEduVocDocument::FileType fileTypeHandled()=0
returns the KEduVocDocument::FileType that this reader handles
virtual ~ReaderBase()
destructor
Definition readerbase.h:23
virtual KEduVocDocument::ErrorCode read(KEduVocDocument &doc)=0
Parse file and write into doc.
virtual bool isParsable()=0
Can this reader parse the file.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.