00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef FINDAPPROXLEVELENTRY_H
00020 #define FINDAPPROXLEVELENTRY_H
00021
00022 #include "pandabase.h"
00023
00024 #include "findApproxPath.h"
00025 #include "workingNodePath.h"
00026
00027 class FindApproxLevel;
00028 class NodePathCollection;
00029
00030
00031
00032
00033
00034
00035
00036
00037 class FindApproxLevelEntry {
00038 public:
00039 INLINE FindApproxLevelEntry(const WorkingNodePath &node_path,
00040 FindApproxPath &approx_path);
00041 INLINE FindApproxLevelEntry(const FindApproxLevelEntry ©, int increment = 0);
00042 INLINE void operator = (const FindApproxLevelEntry ©);
00043
00044 INLINE bool next_is_stashed(int increment) const;
00045
00046 void consider_node(NodePathCollection &result, FindApproxLevel &next_level,
00047 int max_matches, int increment) const;
00048 void consider_next_step(NodePathCollection &result,
00049 PandaNode *child_node, FindApproxLevel &next_level,
00050 int max_matches, int increment) const;
00051 INLINE bool is_solution(int increment) const;
00052
00053 void output(ostream &out) const;
00054
00055
00056
00057 WorkingNodePath _node_path;
00058
00059
00060
00061
00062
00063 int _i;
00064 FindApproxPath &_approx_path;
00065 };
00066
00067 INLINE ostream &
00068 operator << (ostream &out, const FindApproxLevelEntry &entry) {
00069 entry.output(out);
00070 return out;
00071 }
00072
00073 #include "findApproxLevelEntry.I"
00074
00075 #endif