X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanalyzer.h;h=5464dacf989ac84ecea5be2a0c9353128924ec8f;hb=HEAD;hp=3e7aff0311511adc3682d8218be17e3088daeb1f;hpb=1dbeace0c44127bee08a3a8b231f4c8dcf707b2c;p=builder.git diff --git a/source/analyzer.h b/source/analyzer.h deleted file mode 100644 index 3e7aff0..0000000 --- a/source/analyzer.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef ANALYZER_H_ -#define ANALYZER_H_ - -#include -#include -#include -#include - -class Builder; -class Target; - -/** -Performs various kinds of dependency analysis on the build tree. -*/ -class Analyzer -{ -public: - enum Mode - { - DEPS, //< Skip over "trivial" targets such as InstalledFile - ALLDEPS, //< Print out absolutely every target - REBUILD, //< Print targets that are going to be rebuilt - RDEPS //< Print targets that depend on the given targets - }; - -private: - typedef std::vector TableRow; - typedef std::list Table; - - Builder &builder; - Mode mode; - Table table; - unsigned max_depth; - bool full_paths; - std::map > rdepends; - -public: - Analyzer(Builder &); - - void set_mode(Mode m) { mode = m; } - void set_max_depth(unsigned m) { max_depth = m; } - void set_full_paths(bool f) { full_paths = f; } - - /// Performs the analysis and prints out the resulting dependency tree. - void analyze(); - -private: - /** Adds rows for a target, then recursively adds rows for dependencies as - needed. */ - void build_depend_table(Target &, unsigned); - - /// Prints out the table that resulted from the analysis. - void print_table() const; - - static bool target_order(const Target *, const Target *); - static bool target_order_full(const Target *, const Target *); -}; - -#endif