- Main Page
- Namespaces
- Classes
- Files

# depgraph.hpp

Go to the documentation of this file.

    00001
    00004 #include <set>
    00005 #include <map>
    00006
    00007 #include "artifact.hpp"
    00008 #include "topological_sort.hpp"
    00009
    00014 class dependency_graph
    00015 {
    00016 public:
    00018   typedef std::map<artifact, std::set<artifact> > graph_type;
    00019
    00023   void store_dependency(artifact const& target, artifact const& dependency);
    00024
    00026   graph_type const& graph() const { return graph_; }
    00027
    00032   template<class OutIter>
    00033   void sort(OutIter sorted)
    00034   const
    00035   {
    00036     topological_sort(graph_, sorted);
    00037   }
    00038
    00039 private:
    00040   graph_type graph_;
    00041 };