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::plugin_base Class Reference

#include <irods_plugin_base.hpp>

Inheritance diagram for irods::plugin_base:
[legend]
Collaboration diagram for irods::plugin_base:
[legend]

Public Member Functions

 plugin_base (const std::string &_n, const std::string &_c)
 
 plugin_base (const plugin_base &_rhs)
 
plugin_baseoperator= (const plugin_base &_rhs)
 
virtual ~plugin_base ()
 
virtual error post_disconnect_maintenance_operation (pdmo_type &)
 
virtual error need_post_disconnect_maintenance_operation (bool &_b)
 
error enumerate_operations (std::vector< std::string > &_ops)
 
const std::string & context_string () const
 
double interface_version () const
 
error add_operation (const std::string &_op, std::function< error(plugin_context &)> _f)
 
template<typename... types_t>
error add_operation (const std::string &_op, std::function< error(plugin_context &, types_t...)> _f)
 
template<typename... types_t>
error call (rsComm_t *_comm, const std::string &_operation_name, irods::first_class_object_ptr _fco, types_t... _t)
 
template<typename T >
error get_property (const std::string &_key, T &_val)
 
template<typename T >
error set_property (const std::string &_key, const T &_val)
 
void set_start_operation (maintenance_operation_t _op)
 
void set_stop_operation (maintenance_operation_t _op)
 
error start_operation ()
 
error stop_operation ()
 

Protected Attributes

std::string context_
 
std::string instance_name_
 
double interface_version_
 
plugin_property_map properties_
 
std::vector< std::pair< std::string, std::string > > ops_for_delay_load_
 
lookup_table< boost::any > operations_
 
maintenance_operation_t start_operation_
 
maintenance_operation_t stop_operation_
 

Detailed Description

Description:\n Abstract Base Class for iRODS Plugins
This class enforces the delay_load interface necessary for the load_plugin call to load any other non-member symbols from the shared object. reference lib/core/include/irods_load_plugin.hpp

Definition at line 47 of file irods_plugin_base.hpp.

Constructor & Destructor Documentation

◆ plugin_base() [1/2]

irods::plugin_base::plugin_base ( const std::string &  _n,
const std::string &  _c 
)
inline

Definition at line 55 of file irods_plugin_base.hpp.

◆ plugin_base() [2/2]

irods::plugin_base::plugin_base ( const plugin_base _rhs)
inline

Definition at line 65 of file irods_plugin_base.hpp.

◆ ~plugin_base()

virtual irods::plugin_base::~plugin_base ( )
inlinevirtual

Definition at line 86 of file irods_plugin_base.hpp.

Member Function Documentation

◆ add_operation() [1/2]

error irods::plugin_base::add_operation ( const std::string &  _op,
std::function< error(plugin_context &)>  _f 
)
inline

=-=-=-=-=-=-=-

Description:\n interface to add operations - key, function object

Definition at line 122 of file irods_plugin_base.hpp.

References ERROR, operations_, SUCCESS, and SYS_INVALID_INPUT_PARAM.

Referenced by irods::impostor_resource::impostor_resource(), and plugin_factory().

◆ add_operation() [2/2]

template<typename... types_t>
error irods::plugin_base::add_operation ( const std::string &  _op,
std::function< error(plugin_context &, types_t...)>  _f 
)
inline

=-=-=-=-=-=-=-

Description:\n interface to add operations - key, function object

Definition at line 138 of file irods_plugin_base.hpp.

References ERROR, operations_, SUCCESS, and SYS_INVALID_INPUT_PARAM.

◆ call()

template<typename... types_t>
error irods::plugin_base::call ( rsComm_t _comm,
const std::string &  _operation_name,
irods::first_class_object_ptr  _fco,
types_t...  _t 
)
inline

Definition at line 154 of file irods_plugin_base.hpp.

References rsComm_t::clientUser, irods::error::code(), ERROR, error, INVALID_ANY_CAST, irods::log(), irods::error::ok(), operations_, PASS, properties_, rsComm_t::proxyUser, irods::re_plugin_globals, irods::error::result(), RuleExecInfo::rsComm, RULE_ENGINE_SKIP_OPERATION, irods::plugin_context::rule_results(), SUCCESS, RuleExecInfo::uoic, and RuleExecInfo::uoip.

Here is the call graph for this function:

◆ context_string()

const std::string& irods::plugin_base::context_string ( ) const
inline

=-=-=-=-=-=-=-

Description:\n accessor for context string

Definition at line 112 of file irods_plugin_base.hpp.

References context_.

◆ enumerate_operations()

error irods::plugin_base::enumerate_operations ( std::vector< std::string > &  _ops)
inline

=-=-=-=-=-=-=-

Description:\n list all of the operations in the plugin

Definition at line 102 of file irods_plugin_base.hpp.

References ops_for_delay_load_, and SUCCESS.

◆ get_property()

template<typename T >
error irods::plugin_base::get_property ( const std::string &  _key,
T &  _val 
)
inline
Description:\n get a property from the map if it exists.

Definition at line 297 of file irods_plugin_base.hpp.

References ASSERT_PASS, irods::lookup_table< ValueType, KeyType, HashType >::get(), and properties_.

Here is the call graph for this function:

◆ interface_version()

double irods::plugin_base::interface_version ( ) const
inline

Definition at line 116 of file irods_plugin_base.hpp.

References interface_version_.

◆ need_post_disconnect_maintenance_operation()

virtual error irods::plugin_base::need_post_disconnect_maintenance_operation ( bool &  _b)
inlinevirtual

=-=-=-=-=-=-=-

Description:\n interface to determine if a PDMO is necessary

Reimplemented in univ_mss_resource, random_resource, load_balanced_resource, deferred_resource, compound_resource, repl_resource, irods::impostor_resource, unixfilesystem_resource, non_blocking_resource, and mockarchive_resource.

Definition at line 95 of file irods_plugin_base.hpp.

References SUCCESS.

◆ operator=()

◆ post_disconnect_maintenance_operation()

virtual error irods::plugin_base::post_disconnect_maintenance_operation ( pdmo_type )
inlinevirtual

◆ set_property()

template<typename T >
error irods::plugin_base::set_property ( const std::string &  _key,
const T &  _val 
)
inline
Description:\n set a property in the map

Definition at line 304 of file irods_plugin_base.hpp.

References ASSERT_PASS, properties_, and irods::lookup_table< ValueType, KeyType, HashType >::set().

Referenced by plugin_factory().

Here is the call graph for this function:

◆ set_start_operation()

◆ set_stop_operation()

void irods::plugin_base::set_stop_operation ( maintenance_operation_t  _op)
inline

Definition at line 313 of file irods_plugin_base.hpp.

References stop_operation_.

Referenced by plugin_factory().

◆ start_operation()

error irods::plugin_base::start_operation ( )
inline

Definition at line 317 of file irods_plugin_base.hpp.

References properties_, and start_operation_.

◆ stop_operation()

error irods::plugin_base::stop_operation ( )
inline

Definition at line 321 of file irods_plugin_base.hpp.

References properties_, and stop_operation_.

Member Data Documentation

◆ context_

std::string irods::plugin_base::context_
protected

◆ instance_name_

std::string irods::plugin_base::instance_name_
protected

Definition at line 327 of file irods_plugin_base.hpp.

Referenced by operator=().

◆ interface_version_

double irods::plugin_base::interface_version_
protected

Definition at line 328 of file irods_plugin_base.hpp.

Referenced by interface_version(), and operator=().

◆ operations_

◆ ops_for_delay_load_

std::vector< std::pair< std::string, std::string > > irods::plugin_base::ops_for_delay_load_
protected

=-=-=-=-=-=-=-

Description:\n Map holding resource operations

Definition at line 336 of file irods_plugin_base.hpp.

Referenced by enumerate_operations().

◆ properties_

◆ start_operation_

maintenance_operation_t irods::plugin_base::start_operation_
protected

Definition at line 342 of file irods_plugin_base.hpp.

Referenced by operator=(), set_start_operation(), and start_operation().

◆ stop_operation_

maintenance_operation_t irods::plugin_base::stop_operation_
protected

Definition at line 343 of file irods_plugin_base.hpp.

Referenced by operator=(), set_stop_operation(), and stop_operation().


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