|
Open Model Railroad Network (OpenMRN)
|
Using this class as a base class will cause the given class to have all its instances linked up in a list. More...
#include <LinkedObject.hxx>
Public Member Functions | |
| T * | link_next () |
Static Public Member Functions | |
| static T * | link_head () |
| static Atomic * | head_mu () |
| Locks the list for modification (at any entry!). | |
Protected Member Functions | |
| T * | link_this () |
| LinkedObject () | |
| Constructor. Puts *this on the linked list. | |
| ~LinkedObject () | |
| Constructor. Removes *this from the linked list. | |
Protected Attributes | |
| T * | link_ |
| Linked list pointer. | |
Static Protected Attributes | |
| static T * | head_ {nullptr} |
| Beginning of the list. | |
Using this class as a base class will cause the given class to have all its instances linked up in a list.
The cost is 4 bytes per object, and some CPU cost in the destructor (to walk the list).
Definition at line 83 of file LinkedObject.hxx.
|
inlineprotected |
Constructor. Puts *this on the linked list.
Definition at line 112 of file LinkedObject.hxx.
|
inlineprotected |
Constructor. Removes *this from the linked list.
Definition at line 120 of file LinkedObject.hxx.
|
inlinestatic |
Locks the list for modification (at any entry!).
Definition at line 100 of file LinkedObject.hxx.
|
inlinestatic |
Definition at line 94 of file LinkedObject.hxx.
|
inline |
Definition at line 88 of file LinkedObject.hxx.
|
inlineprotected |
Definition at line 106 of file LinkedObject.hxx.
|
staticprotected |
Beginning of the list.
Definition at line 141 of file LinkedObject.hxx.
|
protected |
Linked list pointer.
Definition at line 139 of file LinkedObject.hxx.