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//---------------------------------------------------------------------------
36class XnNode : protected XnBaseNode
37{
38public:
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
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_
XN_C_API void XN_C_DECL xnDeallocateBaseNode(XnBaseNode *pNode)
XN_C_API XnBaseNode *XN_C_DECL xnAllocateBaseNode()
void * XnValue
Definition XnDataTypes.h:35
const XnNode *const Next() const
Definition XnNode.h:54
XnNode()
Definition XnNode.h:45
static void Deallocate(XnNode *pNode)
Definition XnNode.h:40
XnNode *& Previous()
Definition XnNode.h:59
static XnNode * Allocate()
Definition XnNode.h:39
const XnNode *const Previous() const
Definition XnNode.h:63
XnValue & Data()
Definition XnNode.h:68
const XnValue & Data() const
Definition XnNode.h:72
XnNode *& Next()
Definition XnNode.h:50
Definition XnBaseNode.h:35
XnBaseNode * m_pNext
Definition XnBaseNode.h:37
XnBaseNode * m_pPrevious
Definition XnBaseNode.h:39
XnValue m_Data
Definition XnBaseNode.h:41