#ifndef TOOLS_GN_OUTPUT_FILE_H_
#define TOOLS_GN_OUTPUT_FILE_H_
#include <string>
#include "tools/gn/build_settings.h"
#include "tools/gn/source_file.h"
class OutputFile {
public:
OutputFile() : value_() {}
explicit OutputFile(const base::StringPiece& str)
: value_(str.data(), str.size()) {
}
std::string& value() { return value_; }
const std::string& value() const { return value_; }
SourceFile GetSourceFile(const BuildSettings* build_settings) const {
return SourceFile(build_settings->build_dir().value() + value_);
}
bool operator==(const OutputFile& other) const {
return value_ == other.value_;
}
bool operator!=(const OutputFile& other) const {
return value_ != other.value_;
}
bool operator<(const OutputFile& other) const {
return value_ < other.value_;
}
private:
std::string value_;
};
#endif