File: common-cleanup.hpp

package info (click to toggle)
osm2pgsql 0.96.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,304 kB
  • sloc: cpp: 11,462; python: 543; sh: 98; makefile: 17
file content (21 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef COMMON_CLEANUP_HPP
#define COMMON_CLEANUP_HPP

#include <string>

namespace cleanup {

// RAII structure to remove a file upon destruction. doesn't create or do
// anything to the file when it constructs.
struct file {
  file(const std::string &filename);
  ~file();
private:
  // name of the file to be deleted upon destruction
  std::string m_filename;
};


} // namespace cleanup

#endif /* COMMON_CLEANUP_HPP */