Guitar
ProcessHelper.h
Go to the documentation of this file.
1 #ifndef PROCESSHELPER_H
2 #define PROCESSHELPER_H
3 
4 #include <string>
5 
6 namespace process {
7 namespace helper {
8 
9 #ifdef _WIN32
10 typedef std::wstring dir_string_t;
11 #else
12 typedef std::string dir_string_t;
13 #endif
14 
15 class PushDir {
16 private:
18  static void chdir(dir_string_t const &dir);
19 
20 public:
21  PushDir() = default;
22  PushDir(dir_string_t const &dir);
23  ~PushDir();
24  void pushd(dir_string_t const &dir);
25  void popd();
26 };
27 
28 }
29 } // namespace process::helper
30 
31 #endif // PROCESSHELPER_H
Definition: ProcessHelper.h:15
dir_string_t cwd_
Definition: ProcessHelper.h:17
~PushDir()
Definition: ProcessHelper.cpp:29
void pushd(dir_string_t const &dir)
Definition: ProcessHelper.cpp:34
static void chdir(dir_string_t const &dir)
Definition: ProcessHelper.cpp:11
void popd()
Definition: ProcessHelper.cpp:50
std::string dir_string_t
Definition: ProcessHelper.h:12
Definition: ProcessHelper.h:6