Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

node_chain.h

Go to the documentation of this file.
00001 /*
00002 Object Oriented Mobile Robot Model (OOMRM) C++  Library Copyright (C) 2002-2005  Derek Jones
00003 
00004 This library is free software; you can redistribute it  and/or
00005 modify it under the terms of the GNU Lesser General Public
00006 License  as published by the Free Software Foundation; either
00007 version 2.1 of the  License, or (at your option) any later version.
00008 
00009 This library is  distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY;  without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU
00012 Lesser General Public License for more  details.
00013 
00014 You should have received a copy of the GNU Lesser General  Public
00015 License along with this library; if not, write to the Free  Software
00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307  USA
00017 
00018 
00019  * $Id: node_chain.h,v 1.1.1.1 2006/05/11 05:22:46 derek Exp $
00020 */
00021 
00022 #ifndef NODE_CHAIN
00023 #define NODE_CHAIN
00024 #include <node.h>
00025 #include <chain.h>
00026 using namespace std;
00027 #define NODE_CHAIN_MAX 100
00028 
00029 
00032 struct dynamic_node
00033 {
00034   dynamic_node(void);
00035   dynamic_node(Node*, int);
00036   Node* node; // pointer to node in _field in Dstar class.
00037   int    Cold; // old cost
00038 };
00039 
00041 
00049 class node_chain : public chain
00050 {
00051 public:
00052   node_chain(void);
00053   const dynamic_node serve(void);       
00054   dynamic_node operator[](int) const;   
00055 //  void initialize(void);      ///< marks all nodes as being written out.
00056   int exists(Node* inode); 
00057   bool update(Node* inode, int icost); 
00058 private:
00059 //  bool append(const dynamic_node&); ///< append a dynamic node.
00060   bool append(Node*, int); 
00061   dynamic_node _node_chain[NODE_CHAIN_MAX];
00062 };
00063 
00064 #endif

Generated on Mon Oct 8 19:32:19 2007 for OOMRM Mapping API by doxygen1.3