NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
c_owner_set.hpp
Go to the documentation of this file.
1#pragma once
2#include <types.h>
3/// @file
4
5/// @brief A set node with a pointer to the owning container. See cOwnerSetMg_c.
6/// @ingroup clib
7/// @unofficial
9public:
10 void *getOwner() const { return mpOwner; }
11 cOwnerSetNd_c *getNext() const { return mpNext; }
12
13private:
14 void* mpOwner; ///< The set that contains this node.
15 cOwnerSetNd_c* mpNext; ///< The next node in the set.
16
17 friend class cOwnerSetMg_c;
18};
19
20/// @brief A set container. See cOwnerSetNd_c.
21/// @details The set is implemented as a singly-linked list.
22/// @ingroup clib
23/// @unofficial
25public:
26 /// @brief Constructs a new set container.
27 cOwnerSetMg_c() : mpRoot(nullptr) {}
28
29 /// @brief Destroys the set.
31
32 /**
33 * @brief Adds a node to the set.
34 *
35 * @param nd The node to add.
36 * @param owner The owner of the node.
37 */
38 void add(cOwnerSetNd_c *nd, void *owner);
39
40 /**
41 * @brief Removes a node from the set.
42 *
43 * @param nd The node to remove.
44 * @param owner The owner of the node.
45 */
46 void remove(cOwnerSetNd_c *nd, void *owner);
47
48private:
49 /// @brief Clears out the set and unlinks all child nodes.
50 void clear();
51
52 cOwnerSetNd_c* mpRoot; ///< The first element of the set.
53};
54
55/// @brief [Looks like a badly stripped assert].
56/// @ingroup clib
57/// @unofficial
58void UNK_80161880();
void add(cOwnerSetNd_c *nd, void *owner)
Adds a node to the set.
cOwnerSetMg_c()
Constructs a new set container.
void clear()
Clears out the set and unlinks all child nodes.
void remove(cOwnerSetNd_c *nd, void *owner)
Removes a node from the set.
cOwnerSetNd_c * mpRoot
The first element of the set.
~cOwnerSetMg_c()
Destroys the set.
A set node with a pointer to the owning container. See cOwnerSetMg_c.
void * mpOwner
The set that contains this node.
cOwnerSetNd_c * mpNext
The next node in the set.
void UNK_80161880()
[Looks like a badly stripped assert].