OpenNI 1.5.4
XnNode.h
Go to the documentation of this file.
1 /****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2011 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * OpenNI is free software: you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published *
10 * by the Free Software Foundation, either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * OpenNI is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. *
20 * *
21 ****************************************************************************/
22 #ifndef _XN_NODE_H_
23 #define _XN_NODE_H_
24 
25 //---------------------------------------------------------------------------
26 // Includes
27 //---------------------------------------------------------------------------
28 #include <XnDataTypes.h>
29 #include <XnBaseNode.h>
30 
31 //---------------------------------------------------------------------------
32 // Types
33 //---------------------------------------------------------------------------
37 class XnNode : protected XnBaseNode
38 {
39 public:
40  static XnNode *Allocate() { return (XnNode*)xnAllocateBaseNode(); }
41  static void Deallocate(XnNode *pNode) { xnDeallocateBaseNode((XnBaseNode*)pNode); }
42 
46  XnNode() { m_pNext = NULL; m_pPrevious = NULL; m_Data = NULL; }
47 
51  XnNode*& Next() {return (XnNode*&)m_pNext;}
55  const XnNode* const Next() const {return (const XnNode*)m_pNext;}
56 
60  XnNode*& Previous() {return (XnNode*&)m_pPrevious;}
64  const XnNode* const Previous() const {return (const XnNode*)m_pPrevious;}
65 
69  XnValue& Data() {return m_Data;}
73  const XnValue& Data() const {return m_Data;}
74 };
75 
76 #endif // _XN_NODE_H_
XnBaseNode::m_pNext
XnBaseNode * m_pNext
Definition: XnBaseNode.h:58
XnNode::Previous
XnNode *& Previous()
Definition: XnNode.h:80
XnDataTypes.h
XnNode::Allocate
static XnNode * Allocate()
Definition: XnNode.h:60
xnAllocateBaseNode
XN_C_API XnBaseNode *XN_C_DECL xnAllocateBaseNode()
XnBaseNode.h
XnNode::XnNode
XnNode()
Definition: XnNode.h:66
XnNode::Next
XnNode *& Next()
Definition: XnNode.h:71
xnDeallocateBaseNode
XN_C_API void XN_C_DECL xnDeallocateBaseNode(XnBaseNode *pNode)
XnNode::Data
XnValue & Data()
Definition: XnNode.h:89
XnNode::Deallocate
static void Deallocate(XnNode *pNode)
Definition: XnNode.h:61
XnBaseNode::m_pPrevious
XnBaseNode * m_pPrevious
Definition: XnBaseNode.h:60
XnBaseNode::m_Data
XnValue m_Data
Definition: XnBaseNode.h:62
XnValue
void * XnValue
Definition: XnDataTypes.h:36
XnBaseNode
Definition: XnBaseNode.h:35
XnNode
Definition: XnNode.h:37