irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irods::environment_properties Class Reference

#include <irods_environment_properties.hpp>

Collaboration diagram for irods::environment_properties:
[legend]

Public Member Functions

void capture ()
 
template<typename T >
error get_property (const std::string &_key, T &_val)
 
template<typename T >
T & get_property (const std::string &_key)
 
template<typename T >
T & set_property (const std::string &_key, const T &_val)
 
template<typename T >
remove (const std::string &_key)
 
void remove (const std::string &_key)
 
std::unordered_map< std::string, boost::any > & map ()
 

Static Public Member Functions

static environment_propertiesinstance ()
 

Private Member Functions

 environment_properties (environment_properties const &)
 
 environment_properties ()
 
void operator= (environment_properties const &)
 
void capture_json (const std::string &)
 

Private Attributes

configuration_parser config_props_
 

Detailed Description

Definition at line 17 of file irods_environment_properties.hpp.

Constructor & Destructor Documentation

◆ environment_properties() [1/2]

irods::environment_properties::environment_properties ( environment_properties const &  )
private

◆ environment_properties() [2/2]

irods::environment_properties::environment_properties ( )
private

Definition at line 77 of file irods_environment_properties.cpp.

References capture().

Here is the call graph for this function:

Member Function Documentation

◆ capture()

void irods::environment_properties::capture ( )
Description:\n Read environment configuration and fill environment_properties::properties

Definition at line 81 of file irods_environment_properties.cpp.

References capture_json(), irods::CFG_IRODS_ENVIRONMENT_FILE_KW(), irods::CFG_IRODS_SESSION_ENVIRONMENT_FILE_KW(), config_props_, terminate_irods_processes::e, irods::experimental::administration::client::v1::exists(), irods::get_json_environment_file(), irods::log(), LOG_ERROR, irods::error::ok(), PASS, rodsLog(), and irods::configuration_parser::set().

Referenced by _reloadRodsEnv(), environment_properties(), and runIrodsAgentFactory().

Here is the call graph for this function:

◆ capture_json()

void irods::environment_properties::capture_json ( const std::string &  _fn)
private
Description:\n capture irods_environment.json

Definition at line 109 of file irods_environment_properties.cpp.

References irods::error::code(), config_props_, irods::configuration_parser::load(), irods::error::ok(), irods::error::result(), and THROW.

Referenced by capture().

Here is the call graph for this function:

◆ get_property() [1/2]

template<typename T >
T& irods::environment_properties::get_property ( const std::string &  _key)
inline

Definition at line 48 of file irods_environment_properties.hpp.

References config_props_, and irods::configuration_parser::get().

Here is the call graph for this function:

◆ get_property() [2/2]

template<typename T >
error irods::environment_properties::get_property ( const std::string &  _key,
T &  _val 
)
inline
Description:\n Get a property from the map if it exists. catch the exception in the case where
the template types may not match and return success/fail

Definition at line 37 of file irods_environment_properties.hpp.

References terminate_irods_processes::e, error, and SUCCESS.

Referenced by irods::get_environment_property().

◆ instance()

environment_properties & irods::environment_properties::instance ( )
static
Description:\n type alias for iterating over configuration properties
Description:\n Access method for the singleton

Definition at line 72 of file irods_environment_properties.cpp.

Referenced by _reloadRodsEnv(), irods::get_environment_property(), printRodsEnv(), runIrodsAgentFactory(), and irods::set_environment_property().

◆ map()

std::unordered_map<std::string, boost::any>& irods::environment_properties::map ( )
inline

Definition at line 64 of file irods_environment_properties.hpp.

References config_props_, and irods::configuration_parser::map().

Referenced by printRodsEnv().

Here is the call graph for this function:

◆ operator=()

void irods::environment_properties::operator= ( environment_properties const &  )
private

◆ remove() [1/2]

template<typename T >
T irods::environment_properties::remove ( const std::string &  _key)
inline

Definition at line 58 of file irods_environment_properties.hpp.

References config_props_, and irods::configuration_parser::remove().

Here is the call graph for this function:

◆ remove() [2/2]

void irods::environment_properties::remove ( const std::string &  _key)

Definition at line 118 of file irods_environment_properties.cpp.

References config_props_, and irods::configuration_parser::remove().

Here is the call graph for this function:

◆ set_property()

template<typename T >
T& irods::environment_properties::set_property ( const std::string &  _key,
const T &  _val 
)
inline

Definition at line 53 of file irods_environment_properties.hpp.

References config_props_, and irods::configuration_parser::set().

Referenced by irods::set_environment_property().

Here is the call graph for this function:

Member Data Documentation

◆ config_props_

configuration_parser irods::environment_properties::config_props_
private
Description:\n properties lookup table

Definition at line 81 of file irods_environment_properties.hpp.

Referenced by capture(), capture_json(), get_property(), map(), remove(), and set_property().


The documentation for this class was generated from the following files: