| Flutter Impeller |

working_directory.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #pragma once
6
7 #include <string>
8
9 #include "flutter/fml/macros.h"
10
11 namespace impeller {
12 namespace testing {
13
14 /// Keeps track of the global variable for the specified working
15 /// directory.
16 class WorkingDirectory {
17 public:
18 static WorkingDirectory* Instance();
19
20 std::string GetFilenamePath(const std::string& filename) const;
21
22 void SetPath(const std::string& path);
23
24 const std::string& GetPath() const { return path_; }
25
26 private:
27 FML_DISALLOW_COPY_AND_ASSIGN(WorkingDirectory);
28 WorkingDirectory();
29 static WorkingDirectory* instance_;
30 std::string path_;
31 bool did_set_ = false;
32 };
33
34 } // namespace testing
35 } // namespace impeller
impeller::testing::WorkingDirectory::SetPath
void SetPath(const std::string &path)
Definition: working_directory.cc:28
impeller::testing::WorkingDirectory::GetPath
const std::string & GetPath() const
Definition: working_directory.h:24
impeller::testing::WorkingDirectory
Definition: working_directory.h:16
impeller::testing::WorkingDirectory::GetFilenamePath
std::string GetFilenamePath(const std::string &filename) const
Definition: working_directory.cc:23
impeller::testing::WorkingDirectory::Instance
static WorkingDirectory * Instance()
Definition: working_directory.cc:16
impeller
Definition: aiks_context.cc:10