mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-03-21 17:55:21 -05:00
30 lines
865 B
C++
30 lines
865 B
C++
#include "card_database_parser.h"
|
|
|
|
SetNameMap ICardDatabaseParser::sets;
|
|
|
|
void ICardDatabaseParser::clearSetlist()
|
|
{
|
|
sets.clear();
|
|
}
|
|
|
|
CardSetPtr ICardDatabaseParser::internalAddSet(const QString &setName,
|
|
const QString &longName,
|
|
const QString &setType,
|
|
const QDate &releaseDate,
|
|
const CardSet::Priority priority)
|
|
{
|
|
if (sets.contains(setName)) {
|
|
return sets.value(setName);
|
|
}
|
|
|
|
CardSetPtr newSet = CardSet::newInstance(setName);
|
|
newSet->setLongName(longName);
|
|
newSet->setSetType(setType);
|
|
newSet->setReleaseDate(releaseDate);
|
|
newSet->setPriority(priority);
|
|
|
|
sets.insert(setName, newSet);
|
|
emit addSet(newSet);
|
|
return newSet;
|
|
}
|