OpenNI 1.5.7
XnNode.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 *                                                                            *
00003 *  OpenNI 1.x Alpha                                                          *
00004 *  Copyright (C) 2012 PrimeSense Ltd.                                        *
00005 *                                                                            *
00006 *  This file is part of OpenNI.                                              *
00007 *                                                                            *
00008 *  Licensed under the Apache License, Version 2.0 (the "License");           *
00009 *  you may not use this file except in compliance with the License.          *
00010 *  You may obtain a copy of the License at                                   *
00011 *                                                                            *
00012 *      http://www.apache.org/licenses/LICENSE-2.0                            *
00013 *                                                                            *
00014 *  Unless required by applicable law or agreed to in writing, software       *
00015 *  distributed under the License is distributed on an "AS IS" BASIS,         *
00016 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *
00017 *  See the License for the specific language governing permissions and       *
00018 *  limitations under the License.                                            *
00019 *                                                                            *
00020 *****************************************************************************/
00021 #ifndef _XN_NODE_H_
00022 #define _XN_NODE_H_
00023 
00024 //---------------------------------------------------------------------------
00025 // Includes
00026 //---------------------------------------------------------------------------
00027 #include <XnDataTypes.h>
00028 #include <XnBaseNode.h>
00029 
00030 //---------------------------------------------------------------------------
00031 // Types
00032 //---------------------------------------------------------------------------
00036 class XnNode : protected XnBaseNode
00037 {
00038 public:
00039     static XnNode *Allocate() { return (XnNode*)xnAllocateBaseNode(); }
00040     static void Deallocate(XnNode *pNode) { xnDeallocateBaseNode((XnBaseNode*)pNode); }
00041 
00045     XnNode() { m_pNext = NULL; m_pPrevious = NULL; m_Data = NULL; }
00046 
00050     XnNode*& Next() {return (XnNode*&)m_pNext;}
00054     const XnNode* const Next() const {return (const XnNode*)m_pNext;}
00055 
00059     XnNode*& Previous() {return (XnNode*&)m_pPrevious;}
00063     const XnNode* const Previous() const {return (const XnNode*)m_pPrevious;}
00064 
00068     XnValue& Data() {return m_Data;}
00072     const XnValue& Data() const {return m_Data;}
00073 };
00074 
00075 #endif // _XN_NODE_H_