X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fstate.h;h=9338aae0c2cdff64f769ff179cebd56c452f0f0b;hb=6cac49dc50dae6b173135df101d532f20031ca70;hp=35a93f52d5d30239eca39b8de24e378f99911870;hpb=19a4388397813392d11dce07e4453c9b798b8bdb;p=dcpomatic.git diff --git a/src/lib/state.h b/src/lib/state.h index 35a93f52d..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,23 +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; - 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