diff --git a/Frameworks/io/src/environment.cc b/Frameworks/io/src/environment.cc index bdf1ea9f..2b059774 100644 --- a/Frameworks/io/src/environment.cc +++ b/Frameworks/io/src/environment.cc @@ -40,10 +40,20 @@ namespace oak return res; } - std::map const& basic_environment () + std::map& rw_environment () { - static std::map const* environment = new std::map(setup_basic_environment()); + static std::map* environment = new std::map(setup_basic_environment()); return *environment; } + std::map const& basic_environment () + { + return rw_environment(); + } + + void set_basic_environment (std::map const& newEnvironment) + { + rw_environment() = newEnvironment; + } + } /* io */ \ No newline at end of file diff --git a/Frameworks/io/src/environment.h b/Frameworks/io/src/environment.h index b4199563..3a8de94f 100644 --- a/Frameworks/io/src/environment.h +++ b/Frameworks/io/src/environment.h @@ -6,6 +6,7 @@ namespace oak { PUBLIC std::map const& basic_environment (); + PUBLIC void set_basic_environment (std::map const& newEnvironment); } /* io */