Add config location versioning (#2090).
[dcpomatic.git] / src / lib / state.h
index b60c6667379104f3215f1a56ee6a49435c5508b0..9338aae0c2cdff64f769ff179cebd56c452f0f0b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
-#include <boost/noncopyable.hpp>
+
+#ifndef DCPOMATIC_STATE_H
+#define DCPOMATIC_STATE_H
+
+
 #include <boost/filesystem.hpp>
 #include <boost/optional.hpp>
 
-class State : public boost::noncopyable
+
+class State
 {
 public:
+       State () {}
        virtual ~State () {}
        virtual void read () = 0;
        virtual void write () const = 0;
 
+       State (State const&) = delete;
+       State& operator= (State const&) = delete;
+
        /** If set, this overrides the standard path (in home, Library, AppData or wherever) for config.xml, cinemas.xml etc. */
        static boost::optional<boost::filesystem::path> override_path;
-
-protected:
-       static boost::filesystem::path path (std::string file, bool create_directories = true);
+       static boost::filesystem::path read_path (std::string file);
+       static boost::filesystem::path write_path (std::string file);
 };
+
+
+#endif