Skip to content

Commit

Permalink
[irods#8044] Add copy/set operation to environment_properties class.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn authored and alanking committed Dec 5, 2024
1 parent 931dd4b commit 600fac4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/core/include/irods/irods_environment_properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "irods/irods_exception.hpp"

#include <map>
#include <unordered_map>

namespace irods {

Expand All @@ -24,10 +25,21 @@ namespace irods {
*/
static environment_properties& instance();

// Returns a copy of the underlying configuration.
static std::unordered_map<std::string, boost::any> copy_configuration()
{
return instance().config_props_.map();
} // copy_configuration

void set_configuration(std::unordered_map<std::string, boost::any> _config)
{
config_props_.map() = std::move(_config);
} // set_configuration

/**
* @brief Read environment configuration and fill environment_properties::properties
*/
void capture( );
void capture();

/**
* @brief Get a property from the map if it exists. catch the exception in the case where
Expand Down

0 comments on commit 600fac4

Please sign in to comment.