mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Modularize and Doxygen decklist.cpp
Took 1 hour 40 minutes Took 11 seconds
This commit is contained in:
parent
da52d677c7
commit
ae78aa1468
35 changed files with 1400 additions and 699 deletions
24
common/abstract_deck_list_node.cpp
Normal file
24
common/abstract_deck_list_node.cpp
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue