mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 15:02:16 -07:00
* Sort *every* file into a doxygen group. Took 7 hours 9 minutes Took 18 seconds Took 2 minutes * Lint some ingroup definitions. Took 10 minutes Took 2 seconds * Just include the groups in the Doxyfile in this commit. Took 3 minutes * Update some group comments so they link! Took 14 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
38 lines
No EOL
1.1 KiB
C++
38 lines
No EOL
1.1 KiB
C++
/**
|
|
* @file cockatrice_xml_4.h
|
|
* @ingroup CardDatabaseParsers
|
|
* @brief The CockatriceXml4Parser is capable of parsing version 4 of the Cockatrice XML Schema.
|
|
*/
|
|
|
|
#ifndef COCKATRICE_XML4_H
|
|
#define COCKATRICE_XML4_H
|
|
|
|
#include "card_database_parser.h"
|
|
|
|
#include <QLoggingCategory>
|
|
#include <QXmlStreamReader>
|
|
|
|
inline Q_LOGGING_CATEGORY(CockatriceXml4Log, "cockatrice_xml.xml_4_parser");
|
|
|
|
class CockatriceXml4Parser : public ICardDatabaseParser
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(ICardDatabaseParser)
|
|
public:
|
|
CockatriceXml4Parser() = default;
|
|
~CockatriceXml4Parser() override = default;
|
|
bool getCanParseFile(const QString &name, QIODevice &device) override;
|
|
void parseFile(QIODevice &device) override;
|
|
bool saveToFile(SetNameMap _sets,
|
|
CardNameMap cards,
|
|
const QString &fileName,
|
|
const QString &sourceUrl = "unknown",
|
|
const QString &sourceVersion = "unknown") override;
|
|
|
|
private:
|
|
QVariantHash loadCardPropertiesFromXml(QXmlStreamReader &xml);
|
|
void loadCardsFromXml(QXmlStreamReader &xml);
|
|
void loadSetsFromXml(QXmlStreamReader &xml);
|
|
};
|
|
|
|
#endif |