Modularize and Doxygen decklist.cpp (#6099)

This commit is contained in:
BruebachL 2025-09-05 04:52:46 +02:00 committed by GitHub
parent da52d677c7
commit 2eba126ed7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1494 additions and 698 deletions

View file

@ -0,0 +1,24 @@
#include "abstract_deck_list_node.h"
#include "inner_deck_list_node.h"
AbstractDecklistNode::AbstractDecklistNode(InnerDecklistNode *_parent, int position)
: parent(_parent), sortMethod(Default)
{
if (parent) {
if (position == -1) {
parent->append(this);
} else {
parent->insert(position, this);
}
}
}
int AbstractDecklistNode::depth() const
{
if (parent) {
return parent->depth() + 1;
} else {
return 0;
}
}