Panda3D
panda
src
putil
linkedListNode.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file linkedListNode.h
10
* @author drose
11
* @date 2006-03-16
12
*/
13
14
#ifndef LINKEDLISTNODE_H
15
#define LINKEDLISTNODE_H
16
17
#include "
pandabase.h
"
18
#include "
pnotify.h
"
19
20
/**
21
* This just stores the pointers to implement a doubly-linked list of some
22
* kind of object. There are occasions when a hand-rolled linked list is more
23
* appropriate than an STL container.
24
*
25
* Typically, each node of the linked list, as well as the root of the list,
26
* will inherit from this class.
27
*
28
* Note that this class is not inherently thread-safe; derived classes are
29
* responsible for protecting any calls into it within mutexes, if necessary.
30
*/
31
class
EXPCL_PANDA_PUTIL
LinkedListNode
{
32
protected
:
33
INLINE
LinkedListNode
();
34
INLINE
LinkedListNode
(
bool
);
35
INLINE
LinkedListNode
(
LinkedListNode
&&from) noexcept;
36
INLINE ~
LinkedListNode
();
37
38
INLINE
LinkedListNode
&operator = (
LinkedListNode
&&from);
39
40
INLINE
bool
is_on_list()
const
;
41
INLINE
void
remove_from_list();
42
INLINE
void
insert_before(
LinkedListNode
*node);
43
INLINE
void
insert_after(
LinkedListNode
*node);
44
45
INLINE
void
take_list_from(
LinkedListNode
*other_root);
46
47
LinkedListNode
*_prev, *_next;
48
};
49
50
#include "
linkedListNode.I
"
51
52
#endif
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
LinkedListNode
This just stores the pointers to implement a doubly-linked list of some kind of object.
Definition:
linkedListNode.h:31
pnotify.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
linkedListNode.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Mon Sep 14 2020 15:07:06 for Panda3D by
1.8.20