OpenNI 1.5.7
XnNode.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 1.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef _XN_NODE_H_
22 #define _XN_NODE_H_
23 
24 //---------------------------------------------------------------------------
25 // Includes
26 //---------------------------------------------------------------------------
27 #include <XnDataTypes.h>
28 #include <XnBaseNode.h>
29 
30 //---------------------------------------------------------------------------
31 // Types
32 //---------------------------------------------------------------------------
36 class XnNode : protected XnBaseNode
37 {
38 public:
39  static XnNode *Allocate() { return (XnNode*)xnAllocateBaseNode(); }
40  static void Deallocate(XnNode *pNode) { xnDeallocateBaseNode((XnBaseNode*)pNode); }
41 
45  XnNode() { m_pNext = NULL; m_pPrevious = NULL; m_Data = NULL; }
46 
50  XnNode*& Next() {return (XnNode*&)m_pNext;}
54  const XnNode* const Next() const {return (const XnNode*)m_pNext;}
55 
59  XnNode*& Previous() {return (XnNode*&)m_pPrevious;}
63  const XnNode* const Previous() const {return (const XnNode*)m_pPrevious;}
64 
68  XnValue& Data() {return m_Data;}
72  const XnValue& Data() const {return m_Data;}
73 };
74 
75 #endif // _XN_NODE_H_
XnBaseNode::m_pNext
XnBaseNode * m_pNext
Definition: XnBaseNode.h:56
XnNode::Previous
XnNode *& Previous()
Definition: XnNode.h:78
XnDataTypes.h
XnNode::Allocate
static XnNode * Allocate()
Definition: XnNode.h:58
xnAllocateBaseNode
XN_C_API XnBaseNode *XN_C_DECL xnAllocateBaseNode()
XnBaseNode.h
XnNode::XnNode
XnNode()
Definition: XnNode.h:64
XnNode::Next
XnNode *& Next()
Definition: XnNode.h:69
xnDeallocateBaseNode
XN_C_API void XN_C_DECL xnDeallocateBaseNode(XnBaseNode *pNode)
XnNode::Data
XnValue & Data()
Definition: XnNode.h:87
XnNode::Deallocate
static void Deallocate(XnNode *pNode)
Definition: XnNode.h:59
XnBaseNode::m_pPrevious
XnBaseNode * m_pPrevious
Definition: XnBaseNode.h:58
XnBaseNode::m_Data
XnValue m_Data
Definition: XnBaseNode.h:60
XnValue
void * XnValue
Definition: XnDataTypes.h:35
XnBaseNode
Definition: XnBaseNode.h:34
XnNode
Definition: XnNode.h:36