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_kvp_string_parser.hpp
Go to the documentation of this file.
1 #ifndef __IRODS_KVP_STRING_PARSER_HPP__
2 #define __IRODS_KVP_STRING_PARSER_HPP__
3 
4 // =-=-=-=-=-=-=-
5 #include "irods_error.hpp"
6 
7 // =-=-=-=-=-=-=-
8 // stl includes
9 #include <string>
10 
11 // =-=-=-=-=-=-=-
12 // boost includes
13 #include <iostream>
14 #include <string>
15 #include <boost/foreach.hpp>
16 #include <boost/tokenizer.hpp>
17 #include <map>
18 #include <boost/foreach.hpp>
19 #include <boost/algorithm/string.hpp>
20 
21 namespace irods {
24  static const std::string KVP_DEF_DELIMITER( ";" );
25  static const std::string KVP_DEF_ASSOCIATION( "=" );
26  static const std::string KVP_DEF_ESCAPE( "\\" );
27 
30  typedef std::map< std::string, std::string > kvp_map_t;
31 
34  std::string kvp_delimiter();
35 
38  std::string kvp_association();
39 
42  std::string kvp_escape();
43 
48  const std::string& _str, // string to be parsed
49  kvp_map_t& _kvp, // map of kvp
50  const std::string& _association = KVP_DEF_ASSOCIATION, // association token, defaults
51  const std::string& _delimeter = KVP_DEF_DELIMITER ); // delimiter token, defaults
52 
57  const std::string& _str, // string to be parsed
58  kvp_map_t& _kvp, // map of kvp
59  const std::string& _association = KVP_DEF_ASSOCIATION, // association token, defaults
60  const std::string& _delimeter = KVP_DEF_DELIMITER, // delimiter token, defaults
61  const std::string& _escape = KVP_DEF_ESCAPE ); // escape token, defaults
62 
64  std::string kvp_string(
65  const kvp_map_t& _kvp ); // The map from which to generate the string
66 
68  std::string escaped_kvp_string(
69  const kvp_map_t& _kvp ); // The map from which to generate the string
70 
71 }; // namespace irods
72 
73 
74 #endif // __IRODS_KVP_STRING_PARSER_HPP__
irods::kvp_escape
std::string kvp_escape()
Definition: irods_kvp_string_parser.cpp:29
irods::KVP_DEF_DELIMITER
static const std::string KVP_DEF_DELIMITER(";")
irods::kvp_delimiter
std::string kvp_delimiter()
Definition: irods_kvp_string_parser.cpp:17
irods::escaped_kvp_string
std::string escaped_kvp_string(const kvp_map_t &_kvp)
Definition: irods_kvp_string_parser.cpp:214
irods::parse_escaped_kvp_string
error parse_escaped_kvp_string(const std::string &_str, kvp_map_t &_kvp, const std::string &_association=KVP_DEF_ASSOCIATION, const std::string &_delimeter=KVP_DEF_DELIMITER, const std::string &_escape=KVP_DEF_ESCAPE)
Definition: irods_kvp_string_parser.cpp:106
irods
Definition: apiHandler.hpp:35
irods::kvp_string
std::string kvp_string(const kvp_map_t &_kvp)
Definition: irods_kvp_string_parser.cpp:169
irods::KVP_DEF_ESCAPE
static const std::string KVP_DEF_ESCAPE("\\")
irods::error
Definition: irods_error.hpp:23
irods::parse_kvp_string
error parse_kvp_string(const std::string &_str, kvp_map_t &_kvp, const std::string &_association=KVP_DEF_ASSOCIATION, const std::string &_delimeter=KVP_DEF_DELIMITER)
Definition: irods_kvp_string_parser.cpp:69
irods::kvp_association
std::string kvp_association()
Definition: irods_kvp_string_parser.cpp:23
irods_error.hpp
irods::kvp_map_t
std::map< std::string, std::string > kvp_map_t
Definition: irods_kvp_string_parser.hpp:30
irods::KVP_DEF_ASSOCIATION
static const std::string KVP_DEF_ASSOCIATION("=")