#include "card.h"
// Default Constructor
{
// For debugging purposes
qDebug() << "[Card] [called] [Default Constructor]";
}
// Overloaded Constructor
Card
::Card(const QString &newCardID,
const QString &newName,
const QString &newImageURL,
const QString &newSubtype,
const QString &newSupertype,
const int &newNumber,
const QString &newArtist,
const QString &newRarity,
const QString &newSeries,
const QString &newSet,
const QString &newSetCode,
const QString &newCondition,
const QString &newStatus,
QObject* parent
): QObject(parent
){
// For debugging purposes
qDebug() << "[Card] [called] [Overloaded Constructor] || newCardID: " << newCardID << ", newName: " << newName << ", newImageURL: " << newImageURL << ", newSubtype: " << newSubtype << ", newSupertype: " << newSupertype << ", newNumber: " << newNumber << ", newArtist: " << newArtist << ", newRarity: " << newRarity << ", newSeries: " << newSeries << ", newSet: " << newSet << ", newSetCode: " << newSetCode << ", newCondition: " << newCondition << ", newStatus: " << newStatus;
this->cardID = newCardID;
this->name = newName;
this->imageURL = newImageURL;
this->subtype = newSubtype;
this->supertype = newSupertype;
this->number = newNumber;
this->artist = newArtist;
this->rarity = newRarity;
this->series = newSeries;
this->set = newSet;
this->setCode = newSetCode;
this->condition = newCondition;
this->status = newStatus;
}
// Copy Constructor
Card::Card(const Card& source)
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] [Copy Constructor]";
this->cardID = source.cardID;
this->name = source.name;
this->imageURL = source.imageURL;
this->subtype = source.subtype;
this->supertype = source.supertype;
this->number = source.number;
this->artist = source.artist;
this->rarity = source.rarity;
this->series = source.series;
this->set = source.set;
this->setCode = source.setCode;
this->condition = source.condition;
this->status = source.status;
}
// Assignment Opperator
Card& Card::operator=(const Card& source)
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] [Assignment opperator] || source.cardID: " << source.cardID << ", source.name: " << source.name << ", source.imageURL: " << source.imageURL << ", source.subtype: " << source.subtype << ", source.supertype: " << source.supertype << ", source.number: " << source.number << ", source.artist: " << source.artist << ", source.rarity: " << source.rarity << ", source.series: " << source.series << ", source.set: " << source.set << ", source.setCode: " << source.setCode << ", source.condition: " << source.condition << ", source.status: " << source.status;
if(this != &source)
{
this->cardID = source.cardID;
this->name = source.name;
this->imageURL = source.imageURL;
this->subtype = source.subtype;
this->supertype = source.supertype;
this->number = source.number;
this->artist = source.artist;
this->rarity = source.artist;
this->series = source.series;
this->set = source.set;
this->setCode = source.setCode;
this->condition = source.condition;
this->status = source.status;
}
return *this;
}
// GETTERS
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getCardID() || cardID: " << cardID;
return this->cardID;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getName() || name: " << name;
return this->name;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getImageURL() || imageURL: " << imageURL;
return this->imageURL;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getSubtype() || subtype: " << subtype;
return this->subtype;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getSupertype() || supertype: " << supertype;
return this->supertype;
}
int Card::getNumber() const
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getNumber() || number: " << number;
return this->number;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getArtist() || artist: " << artist;
return this->artist;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getRarity() || rarity: " << rarity;
return this->rarity;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getSeries() || series: " << series;
return this->series;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getSet() || set: " << set;
return this->set;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getSetCode() || setCode: " << setCode;
return this->setCode;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getCondition() || condition: " << condition;
return this->condition;
}
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> getStatus() || status: " << status;
return this->status;
}
// SETTERS
void Card
::setCardID(const QString newCardID
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setCardID(const QString newCardID) || newCardID: " << newCardID;
this->cardID = newCardID;
}
void Card
::setName(const QString newName
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setName(const QString newName) || newName: " << newName;
this->name = newName;
}
void Card
::setImageURL(const QString newImageURL
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setImageURL(const QString newImageURL) || newImageURL: " << newImageURL;
this->imageURL = newImageURL;
}
void Card
::setSubtype(const QString newSubtype
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setSubtype(const QString newSubtype) || newSubtype: " << newSubtype;
this->subtype = newSubtype;
}
void Card
::setSupertype(const QString newSupertype
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setSupertype(const QString newSupertype) || newSupertype: " << newSupertype;
this->supertype = newSupertype;
}
void Card::setNumber(const int newNumber)
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setNumber(const int newNumber) || newNumber: " << newNumber;
this->number = newNumber;
}
void Card
::setArtist(const QString newArtist
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setArtist(const QString newArtist) || newArtist: " << newArtist;
this->artist = newArtist;
}
void Card
::setRarity(const QString newRarity
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setRarity(const QString newRarity) || newRarity: " << newRarity;
this->rarity = newRarity;
}
void Card
::setSeries(const QString newSeries
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setSeries(const QString newSeries) || newSeries: " << newSeries;
this->series = newSeries;
}
void Card
::setSet(const QString newSet
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setSet(const QString newSet) || newSet: " << newSet;
this->set = newSet;
}
void Card
::setSetCode(const QString newSetCode
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setSetCode(const QString newSetCode) || setCode: " << setCode;
this->setCode = newSetCode;
}
void Card
::setCondition(const QString newCondition
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setCondition(const QString newCondition) || newCondition: " << newCondition;
this->condition = newCondition;
}
void Card
::setStatus(const QString newStatus
) {
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] >> setStatus(const QString newStatus) || newStatus: " << newStatus;
this->status = newStatus;
}
// Destructor
Card::~Card()
{
// For debugging purposes
qDebug() << "[Card] [called] [cardID:" << cardID << "] [Destructor]";
}