1#ifndef COCKATRICE_XML3_H
2#define COCKATRICE_XML3_H
6#include <QLoggingCategory>
7#include <QXmlStreamReader>
44 void parseFile(QIODevice &device)
override;
51 const QString &fileName,
52 const QString &sourceUrl =
"unknown",
53 const QString &sourceVersion =
"unknown")
override;
QHash< QString, CardSetPtr > SetNameMap
Definition card_info.h:28
QHash< QString, CardInfoPtr > CardNameMap
Definition card_info.h:27
~CockatriceXml3Parser() override=default
QString getMainCardType(QString &type)
Extracts the main card type from a full type string.
Definition cockatrice_xml_3.cpp:114
bool getCanParseFile(const QString &name, QIODevice &device) override
Determines if the parser can handle this file.
Definition cockatrice_xml_3.cpp:17
CockatriceXml3Parser()=default
void loadCardsFromXml(QXmlStreamReader &xml)
Load all <card> elements from the XML stream.
Definition cockatrice_xml_3.cpp:152
void parseFile(QIODevice &device) override
Parse the XML database.
Definition cockatrice_xml_3.cpp:48
void loadSetsFromXml(QXmlStreamReader &xml)
Load all <set> elements from the XML stream.
Definition cockatrice_xml_3.cpp:77
bool saveToFile(SetNameMap _sets, CardNameMap cards, const QString &fileName, const QString &sourceUrl="unknown", const QString &sourceVersion="unknown") override
Save sets and cards back to an XML3 file.
Definition cockatrice_xml_3.cpp:441
Defines the base parser interface (ICardDatabaseParser) for all card database parsers.
Definition card_database_parser.h:20
Q_LOGGING_CATEGORY(CockatriceXml3Log, "cockatrice_xml.xml_3_parser")