Build tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

compdb.h 357B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. #include <ostream>
  5. #include "bufio.h"
  6. namespace compdb {
  7. class Writer {
  8. public:
  9. Writer(std::ostream &stream): buf_(stream) {}
  10. ~Writer();
  11. void write(
  12. const std::string &dir, const std::string &file,
  13. const std::vector<std::string> &cmd);
  14. private:
  15. bufio::OBuf<> buf_;
  16. bool first_ = true;
  17. };
  18. }