VHISTlib  1.84.0.3018
/daten/ahuesgen/projects/vhist/code/vhistlib/include/vhistdifflib/path.h
00001 /* $HEADERS
00002  $Id: path.h 2179 2011-06-24 09:03:24Z ahuesgen $
00003  */
00004 
00005 #ifndef PATH_INCLUDED
00006 #define PATH_INCLUDED
00007 
00008 #include <QHash>
00009 #include <QLinkedList>
00010 #include <QSharedPointer>
00011 
00012 #include "../shared/misc_defines.h"
00013 #include "diffdefines.h"
00014 
00015 namespace vhist
00016 {
00017 
00018 template<class T>
00019 class PriorityQueue;
00020 class PathExpander;
00021 
00022 
00023 class VHIST_EXTERN Path
00024 {
00025     public:
00026         PathExpander* m_expander;
00027         Associations m_associations;
00028         Associations m_revAssociations;
00029         QHash<NodeId, bool> m_calcParentCostsLater;
00030         QLinkedList<NodeId> m_freeNodes1;
00031         QLinkedList<NodeId> m_freeNodes2;
00032         float m_curCosts;
00033 
00034     public: // getter
00035         NodeId association(NodeId nodeId, TreeId treeId) const;
00036         bool associated(NodeId nodeId, TreeId treeId) const;
00037         bool parentChanged(NodeId nodeId, TreeId treeId) const;
00038 
00039     public: // construction/destruction
00040         Path(PathExpander* expander);
00041         Path(const Path& rhs);
00042         ~Path();
00043         Path& operator=(const Path& rhs);
00044 
00045         void associate(NodeId node1, NodeId node2);
00046         bool reachedGoal();
00047         void expand(PriorityQueue<QSharedPointer<Path> >& m_queue);
00048         float getCosts();
00049         void printMe();
00050 };
00051 
00052 
00053 } // namespace vhist
00054 
00055 #endif // PATH_INCLUDED

VHISTlib 1.84.0.3018 of Jun 28 2013, generated by doxygen.