path.h

Go to the documentation of this file.
00001 #ifndef PATH_CLASS
00002 #define PATH_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : path                                                              *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1992-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "node_dll.h"
00019 
00020 namespace nodes {
00021 
00022 // forward:
00023 class node;
00024 class path_node_stack;
00025 
00027 
00033 class NODES_CLASS_STYLE path
00034 {
00035 public:
00036   path(const node *root);
00038 
00041   path(const path &to_copy);
00042 
00043   ~path();
00044 
00045   path &operator =(const path &to_copy);
00046 
00047   int size() const;
00049 
00050   node *root() const;
00052 
00053   node *current() const;
00054   node *follow() const;
00056 
00058   node *pop();
00060 
00063   outcome push(node *to_add);
00065 
00068   outcome push(int index);
00070 
00073   bool generate_path(node *to_locate, path &to_follow) const;
00075 
00079   node *operator [] (int index) const;
00081 
00082 private:
00083   path_node_stack *_stack;  
00084 };
00085 
00086 } // namespace.
00087 
00088 #endif
00089 

Generated on Fri Nov 28 04:29:17 2008 for HOOPLE Libraries by  doxygen 1.5.1