X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fstate.h;h=9338aae0c2cdff64f769ff179cebd56c452f0f0b;hb=ccacce39c39d16977ab6c1592fcb6e941b05ddff;hp=b60c6667379104f3215f1a56ee6a49435c5508b0;hpb=985e727e001e1a92ae035364a9cbf1ff99522ff1;p=dcpomatic.git diff --git a/src/lib/state.h b/src/lib/state.h index b60c66673..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,20 +18,31 @@ */ -#include + +#ifndef DCPOMATIC_STATE_H +#define DCPOMATIC_STATE_H + + #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