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

#include <irods_hierarchy_parser.hpp>

Collaboration diagram for irods::hierarchy_parser:
[legend]

Public Types

typedef std::vector< std::string > resc_list_t
 
typedef resc_list_t::const_iterator const_iterator
 

Public Member Functions

 hierarchy_parser (void)
 
 hierarchy_parser (const std::string &_hier)
 
 hierarchy_parser (const hierarchy_parser &parser)
 
virtual ~hierarchy_parser ()
 
hierarchy_parseroperator= (const hierarchy_parser &parser)
 
error set_string (const std::string &_resc_hier)
 
error str (std::string &_ret_string, const std::string &_term_resc="") const
 
std::string str (const std::string &_term_resc="") const
 
error add_child (const std::string &_resc)
 
error first_resc (std::string &_ret_resc) const
 
std::string first_resc () const
 
error last_resc (std::string &_ret_resc) const
 
std::string last_resc () const
 
error next (const std::string &_current, std::string &_ret_resc) const
 
std::string next (const std::string &_current) const
 
error num_levels (int &levels) const
 
int num_levels () const
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
bool resc_in_hier (const std::string &_resc) const
 

Static Public Member Functions

static const std::string & delimiter (void)
 

Private Attributes

resc_list_t resc_list_
 

Detailed Description

Description:\n Class to manage resource hierarchy strings

Definition at line 14 of file irods_hierarchy_parser.hpp.

Member Typedef Documentation

◆ const_iterator

typedef resc_list_t::const_iterator irods::hierarchy_parser::const_iterator

Definition at line 17 of file irods_hierarchy_parser.hpp.

◆ resc_list_t

typedef std::vector<std::string> irods::hierarchy_parser::resc_list_t

Definition at line 16 of file irods_hierarchy_parser.hpp.

Constructor & Destructor Documentation

◆ hierarchy_parser() [1/3]

irods::hierarchy_parser::hierarchy_parser ( void  )
Description:\n ctor doesn't do much, until it has a string

Definition at line 13 of file irods_hierarchy_parser.cpp.

◆ hierarchy_parser() [2/3]

irods::hierarchy_parser::hierarchy_parser ( const std::string &  _hier)
explicit
Description:\n ctor - calls set_string using passed value

Definition at line 16 of file irods_hierarchy_parser.cpp.

References irods::DELIM, resc_list_, irods::string_tokenize(), SYS_INVALID_INPUT_PARAM, and THROW.

Here is the call graph for this function:

◆ hierarchy_parser() [3/3]

irods::hierarchy_parser::hierarchy_parser ( const hierarchy_parser parser)
Description:\n copy constructor

Definition at line 24 of file irods_hierarchy_parser.cpp.

References add_child(), and deploy_schemas_locally::parser.

Here is the call graph for this function:

◆ ~hierarchy_parser()

irods::hierarchy_parser::~hierarchy_parser ( )
virtual

Definition at line 32 of file irods_hierarchy_parser.cpp.

Member Function Documentation

◆ add_child()

◆ begin()

hierarchy_parser::const_iterator irods::hierarchy_parser::begin ( void  ) const
Description:\n Returns an iterator to the beginning of the list

Definition at line 196 of file irods_hierarchy_parser.cpp.

References resc_list_.

◆ delimiter()

const std::string & irods::hierarchy_parser::delimiter ( void  )
static
Description:\n Returns the delimiter used for hierarchy strings.

Definition at line 210 of file irods_hierarchy_parser.cpp.

References irods::DELIM.

Referenced by irods::resource_manager::get_hier_to_root_for_resc(), open_for_prefer_archive_policy(), and repl_object().

◆ end()

hierarchy_parser::const_iterator irods::hierarchy_parser::end ( void  ) const
Description:\n Returns an iterator to the end of the list

Definition at line 200 of file irods_hierarchy_parser.cpp.

References resc_list_.

◆ first_resc() [1/2]

std::string irods::hierarchy_parser::first_resc ( ) const
Description:\n Returns the first resource

Definition at line 122 of file irods_hierarchy_parser.cpp.

References resc_list_.

◆ first_resc() [2/2]

error irods::hierarchy_parser::first_resc ( std::string &  _ret_resc) const

◆ last_resc() [1/2]

std::string irods::hierarchy_parser::last_resc ( ) const
Description:\n Returns the last resource in the hierarchy

Definition at line 129 of file irods_hierarchy_parser.cpp.

References resc_list_.

◆ last_resc() [2/2]

error irods::hierarchy_parser::last_resc ( std::string &  _ret_resc) const
Description:\n Returns the last resource in the hierarchy

Definition at line 109 of file irods_hierarchy_parser.cpp.

References resc_list_, and SUCCESS.

Referenced by _rsDataObjCreateWithResc(), apply_acPostProcForDataCopyReceived(), apply_acPostProcForParallelTransferReceived(), and irods::get_resc_properties_as_kvp().

◆ next() [1/2]

std::string irods::hierarchy_parser::next ( const std::string &  _current) const
Description:\n Returns the next resource in the hierarchy after the specified resource

Definition at line 167 of file irods_hierarchy_parser.cpp.

References CHILD_NOT_FOUND, NO_NEXT_RESC_FOUND, resc_list_, str(), and THROW.

Referenced by irods.pypyodbc.Cursor::__next__().

Here is the call graph for this function:

◆ next() [2/2]

error irods::hierarchy_parser::next ( const std::string &  _current,
std::string &  _ret_resc 
) const
Description:\n Returns the next resource in the hierarchy after the specified resource

Definition at line 136 of file irods_hierarchy_parser.cpp.

References CHILD_NOT_FOUND, ERROR, NO_NEXT_RESC_FOUND, resc_list_, and SUCCESS.

Referenced by irods.pypyodbc.Cursor::__next__(), and replGetNextRescInHier().

◆ num_levels() [1/2]

int irods::hierarchy_parser::num_levels ( ) const
Description:\n Returns the number of levels in the resource hierarchy

Definition at line 192 of file irods_hierarchy_parser.cpp.

References resc_list_.

◆ num_levels() [2/2]

error irods::hierarchy_parser::num_levels ( int levels) const
Description:\n Returns the number of levels in the resource hierarchy

Definition at line 185 of file irods_hierarchy_parser.cpp.

References resc_list_, and SUCCESS.

Referenced by _addChildToResource().

◆ operator=()

hierarchy_parser & irods::hierarchy_parser::operator= ( const hierarchy_parser rhs)
Description:\n assignment operator

Definition at line 204 of file irods_hierarchy_parser.cpp.

References resc_list_.

◆ resc_in_hier()

bool irods::hierarchy_parser::resc_in_hier ( const std::string &  _resc) const
Description:\n Returns true if the specified resource is in the hierarchy.

Definition at line 214 of file irods_hierarchy_parser.cpp.

References resc_list_.

Referenced by compound_file_modified(), and matchAndTrimRescGrp().

◆ set_string()

◆ str() [1/2]

std::string irods::hierarchy_parser::str ( const std::string &  _term_resc = "") const
Description:\n Returns the resource hierarchy string.
This method returns a properly formatted hierarchy string, terminating the string at the _term_resc resource if non-empty.

Definition at line 70 of file irods_hierarchy_parser.cpp.

References irods::DELIM, and resc_list_.

◆ str() [2/2]

error irods::hierarchy_parser::str ( std::string &  _ret_string,
const std::string &  _term_resc = "" 
) const
Description:\n Returns the resource hierarchy string.
This method returns a properly formatted hierarchy string, terminating the string at the _term_resc resource if non-empty.

Definition at line 46 of file irods_hierarchy_parser.cpp.

References irods::DELIM, resc_list_, and SUCCESS.

Referenced by next(), irods::create_write_replicator::replicate(), and round_robin_file_resolve_hierarchy().

Member Data Documentation

◆ resc_list_

resc_list_t irods::hierarchy_parser::resc_list_
private

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