summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-04-29 18:03:03 (GMT)
committerEvan Martin <martine@danga.com>2011-04-29 18:04:12 (GMT)
commite3168e1d282d6dcac73f710c5deb575613c335b7 (patch)
tree82b8a12cf35a756ff9f32d5d708e2973f256deb7 /src/graph.h
parentfb7c7827ed22662d7dacc0c7a2dd0d48dc41ee06 (diff)
downloadNinja-e3168e1d282d6dcac73f710c5deb575613c335b7.zip
Ninja-e3168e1d282d6dcac73f710c5deb575613c335b7.tar.gz
Ninja-e3168e1d282d6dcac73f710c5deb575613c335b7.tar.bz2
add doxygen-compatibile comments to most classes
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/graph.h b/src/graph.h
index f3cfa97..bf714e3 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -24,13 +24,15 @@ using namespace std;
struct DiskInterface;
struct Node;
+
+/// Information about a single on-disk file: path, mtime.
struct FileStat {
FileStat(const string& path) : path_(path), mtime_(-1), node_(NULL) {}
- // Return true if the file exists (mtime_ got a value).
+ /// Return true if the file exists (mtime_ got a value).
bool Stat(DiskInterface* disk_interface);
- // Return true if we needed to stat.
+ /// Return true if we needed to stat.
bool StatIfNecessary(DiskInterface* disk_interface) {
if (status_known())
return false;
@@ -56,6 +58,9 @@ struct FileStat {
};
struct Edge;
+
+/// Information about a node in the dependency graph: the file, whether
+/// it's dirty, etc.
struct Node {
Node(FileStat* file) : file_(file), dirty_(false), in_edge_(NULL) {}
@@ -67,6 +72,7 @@ struct Node {
vector<Edge*> out_edges_;
};
+/// An invokable build command and associated metadata (description, etc.).
struct Rule {
Rule(const string& name) : name_(name) { }
@@ -80,6 +86,8 @@ struct Rule {
};
struct State;
+
+/// An edge in the dependency graph; links between Nodes using Rules.
struct Edge {
Edge() : rule_(NULL), env_(NULL), implicit_deps_(0), order_only_deps_(0) {}