X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fstate.h;h=9338aae0c2cdff64f769ff179cebd56c452f0f0b;hb=194c2ac76b4bb4fc9fae5bc21d4e221ed194d444;hp=251124a43ae8d8e5071d929fb86feb94f5e7592c;hpb=183b5597f73b85c0d6d29db8f6ed519386d07aa9;p=dcpomatic.git diff --git a/src/lib/state.h b/src/lib/state.h index 251124a43..9338aae0c 100644 --- a/src/lib/state.h +++ b/src/lib/state.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington + Copyright (C) 2018-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,25 +18,31 @@ */ + #ifndef DCPOMATIC_STATE_H #define DCPOMATIC_STATE_H -#include + #include #include -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 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