cheshirekow
v0.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
node.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3
*
4
* This file is part of mpblocks.
5
*
6
* mpblocks is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* mpblocks is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18
*/
25
#ifndef MPBLOCKS_RED_BLACK_NODE_H_
26
#define MPBLOCKS_RED_BLACK_NODE_H_
27
28
#include <
mpblocks/redblack/color.h
>
29
#include <cstdint>
30
31
namespace
mpblocks {
32
namespace
redblack {
33
35
template
<
typename
Traits>
36
struct
BasicNode
{
37
typedef
typename
Traits::Key
Key
;
38
typedef
typename
Traits::NodeRef
NodeRef
;
39
40
Color
color
;
41
Key
key
;
42
NodeRef
parent
;
43
NodeRef
left
;
44
NodeRef
right
;
45
46
BasicNode
(
Key
key
,
NodeRef
Nil
)
47
:
color
(
Color
::
BLACK
), key(key),
parent
(Nil),
left
(Nil),
right
(Nil) {}
48
49
BasicNode
(
NodeRef
Nil
)
50
:
color
(
Color
::
BLACK
),
parent
(Nil),
left
(Nil),
right
(Nil) {}
51
};
52
53
}
//< namespace redblack
54
}
//< namespace mpblocks
55
56
#endif // MPBLOCKS_RED_BLACK_NODE_H_
mpblocks::redblack::Color
Color
Definition:
color.h:35
mpblocks::redblack::BasicNode::key
Key key
Definition:
node.h:41
mpblocks::redblack::BasicNode
A node in a redblack tree.
Definition:
node.h:36
mpblocks::redblack::BasicNode::NodeRef
Traits::NodeRef NodeRef
Definition:
node.h:38
mpblocks::redblack::BasicNode::left
NodeRef left
Definition:
node.h:43
mpblocks::redblack::BasicNode::right
NodeRef right
Definition:
node.h:44
mpblocks::redblack::Color::BLACK
color.h
mpblocks::redblack::BasicNode::parent
NodeRef parent
Definition:
node.h:42
mpblocks::redblack::BasicNode::color
Color color
Definition:
node.h:40
mpblocks::redblack::BasicNode::Key
Traits::Key Key
Definition:
node.h:37
mpblocks::redblack::BasicNode::BasicNode
BasicNode(NodeRef Nil)
Definition:
node.h:49
fontconfig::op::Nil
Definition:
common.h:322
fontconfig::key::Key
Key
Definition:
common.h:119
mpblocks::redblack::BasicNode::BasicNode
BasicNode(Key key, NodeRef Nil)
Definition:
node.h:46
include
mpblocks
redblack
node.h
Generated on Sun Mar 22 2015 22:47:44 for cheshirekow by
1.8.6