metaproxy  1.21.0
Public Member Functions | Private Attributes | List of all members
metaproxy_1::filter::Multi::Map Class Reference
Collaboration diagram for metaproxy_1::filter::Multi::Map:
Collaboration graph

Public Member Functions

 Map (std::string pattern, std::string route, std::string auth)
 
bool match (const std::string target, std::string *ret, std::string *auth) const
 

Private Attributes

std::string m_target_pattern
 
std::string m_route
 
std::string m_auth
 

Detailed Description

Definition at line 116 of file filter_multi.cpp.

Constructor & Destructor Documentation

◆ Map()

metaproxy_1::filter::Multi::Map::Map ( std::string  pattern,
std::string  route,
std::string  auth 
)
inline

Definition at line 121 of file filter_multi.cpp.

121  :
122  m_target_pattern(pattern), m_route(route), m_auth(auth) {};

Member Function Documentation

◆ match()

bool metaproxy_1::filter::Multi::Map::match ( const std::string  target,
std::string *  ret,
std::string *  auth 
) const
inline

Definition at line 123 of file filter_multi.cpp.

124  {
125  if (yaz_match_glob(m_target_pattern.c_str(), target.c_str()))
126  {
127  *ret = m_route;
128  *auth = m_auth;
129  return true;
130  }
131  return false;
132  };

References m_auth, m_route, and m_target_pattern.

Member Data Documentation

◆ m_auth

std::string metaproxy_1::filter::Multi::Map::m_auth
private

Definition at line 119 of file filter_multi.cpp.

Referenced by match().

◆ m_route

std::string metaproxy_1::filter::Multi::Map::m_route
private

Definition at line 118 of file filter_multi.cpp.

Referenced by match().

◆ m_target_pattern

std::string metaproxy_1::filter::Multi::Map::m_target_pattern
private

Definition at line 117 of file filter_multi.cpp.

Referenced by match().


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