#include <parser.h>
 | 
|   | Parser (const std::string &d, char t) | 
|   | 
| std::vector< std::string >  | Find (const std::string &tag) | 
|   | 
| std::string  | Find (const std::string &tag, size_t index, std::string value="") | 
|   | 
Definition at line 10 of file parser.h.
 
◆ Parser()
      
        
          | Parser::Parser  | 
          ( | 
          const std::string & |           d,  | 
        
        
           | 
           | 
          char |           t ) | 
        
      
 
Definition at line 7 of file parser.cc.
    8{
    9  std::istringstream iss(d);
   10  std::string        token;
   11 
   12  while (std::getline(iss, token, t)) {
   13    boost::algorithm::trim(token);
   14    size_t      pos   = token.find('=');
   15    std::string 
key   = token.substr(0, pos);
 
   16    std::string value = token.substr(pos + 1);
   17    boost::algorithm::trim(key);
   18    boost::algorithm::trim(value);
   20  }
   21}
std::multimap< std::string, std::string > mmap
 
 
 
 
◆ Find() [1/2]
      
        
          | std::vector< std::string > Parser::Find  | 
          ( | 
          const std::string & |           tag | ) | 
           | 
        
      
 
Definition at line 23 of file parser.cc.
   24{
   26  auto                     i = 
mmap.equal_range(tag);
 
   27  for (auto it = i.first; it != i.second; ++it) {
   28    r.push_back(it->second);
   29  }
   30 
   31  return r;
   32}
 
 
 
◆ Find() [2/2]
      
        
          | std::string Parser::Find  | 
          ( | 
          const std::string & |           tag,  | 
        
        
           | 
           | 
          size_t |           index,  | 
        
        
           | 
           | 
          std::string |           value = "" ) | 
        
      
 
Definition at line 34 of file parser.cc.
   36{
   38 
   39  if (
result.size() > index) {
 
   41  }
   42  return value;
   43}
std::vector< std::string > Find(const std::string &tag)
 
 
 
 
◆ mmap
The documentation for this class was generated from the following files: