diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-30 20:36:42 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-04 19:29:49 +0000 |
commit | bde4a9f40bb4af39270a124d5ef9571a83305d0a (patch) | |
tree | 536719df20d8f18d4c40e893c2f93b4fa45fb2d5 /lib/resource.h | |
parent | Add some tests over collection (diff) | |
download | ilt-bde4a9f40bb4af39270a124d5ef9571a83305d0a.tar.bz2 ilt-bde4a9f40bb4af39270a124d5ef9571a83305d0a.tar.xz ilt-bde4a9f40bb4af39270a124d5ef9571a83305d0a.zip |
Restructure to allow a resource path and testing
Diffstat (limited to 'lib/resource.h')
-rw-r--r-- | lib/resource.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/resource.h b/lib/resource.h new file mode 100644 index 0000000..958c49d --- /dev/null +++ b/lib/resource.h @@ -0,0 +1,23 @@ +#ifndef RESOURCE_H +#define RESOURCE_H + +#include <filesystem> + +class Resource { +public: + static void setBasePath(std::filesystem::path); + static std::filesystem::path mapPath(const std::filesystem::path &); +}; + +#if defined(RESDIR) && defined(BOOST_TEST_MODULE) +class SetResourcePath { +public: + SetResourcePath() + { + Resource::setBasePath(RESDIR); + } +}; +BOOST_GLOBAL_FIXTURE(SetResourcePath); +#endif + +#endif |