BuildCache
expected_file.hpp
1 //--------------------------------------------------------------------------------------------------
2 // Copyright (c) 2020 Marcus Geelnard
3 //
4 // This software is provided 'as-is', without any express or implied warranty. In no event will the
5 // authors be held liable for any damages arising from the use of this software.
6 //
7 // Permission is granted to anyone to use this software for any purpose, including commercial
8 // applications, and to alter it and redistribute it freely, subject to the following restrictions:
9 //
10 // 1. The origin of this software must not be misrepresented; you must not claim that you wrote
11 // the original software. If you use this software in a product, an acknowledgment in the
12 // product documentation would be appreciated but is not required.
13 //
14 // 2. Altered source versions must be plainly marked as such, and must not be misrepresented as
15 // being the original software.
16 //
17 // 3. This notice may not be removed or altered from any source distribution.
18 //--------------------------------------------------------------------------------------------------
19 
20 #ifndef BUILDCACHE_EXPECTED_FILE_HPP_
21 #define BUILDCACHE_EXPECTED_FILE_HPP_
22 
23 #include <string>
24 
25 namespace bcache {
26 
29 public:
30  expected_file_t() = default;
31  expected_file_t(const expected_file_t&) = default;
32  expected_file_t(const std::string& path, bool required) : m_path(path), m_required(required) {
33  }
34 
36  const std::string& path() const {
37  return m_path;
38  }
39 
41  bool required() const {
42  return m_required;
43  }
44 
45 private:
46  std::string m_path;
47  bool m_required;
48 };
49 
50 } // namespace bcache
51 
52 #endif // BUILDCACHE_EXPECTED_FILE_HPP_
bcache::expected_file_t
A description of an output file that is expected to be produced by a program.
Definition: expected_file.hpp:28
bcache::expected_file_t::path
const std::string & path() const
Definition: expected_file.hpp:36
bcache
The top level namespace.
Definition: compressor.cpp:34
bcache::expected_file_t::required
bool required() const
Definition: expected_file.hpp:41