NewLang Project
Yet another programm language
Loading...
Searching...
No Matches
newlang::StringMatcher Class Reference

#include <logger.h>

Public Member Functions

 StringMatcher ()=default
 
 StringMatcher (const std::string &filter, const char separator=':')
 
bool MatchesName (const std::string &name) const
 

Private Attributes

const std::string_view filter_
 
std::vector< std::string > glob_patterns_
 
std::unordered_set< std::string > exact_match_patterns_
 

Detailed Description

Definition at line 229 of file logger.h.

Constructor & Destructor Documentation

◆ StringMatcher() [1/2]

newlang::StringMatcher::StringMatcher ( )
default

◆ StringMatcher() [2/2]

newlang::StringMatcher::StringMatcher ( const std::string & filter,
const char separator = ':' )
inlineexplicit

Member Function Documentation

◆ MatchesName()

bool newlang::StringMatcher::MatchesName ( const std::string & name) const
inline

Definition at line 253 of file logger.h.

References exact_match_patterns_, and glob_patterns_.

Referenced by newlang::GlobalObjects::Dump().

Member Data Documentation

◆ filter_

const std::string_view newlang::StringMatcher::filter_
private

Definition at line 264 of file logger.h.

◆ glob_patterns_

std::vector<std::string> newlang::StringMatcher::glob_patterns_
private

Definition at line 265 of file logger.h.

Referenced by MatchesName(), and StringMatcher().

◆ exact_match_patterns_

std::unordered_set<std::string> newlang::StringMatcher::exact_match_patterns_
private

Definition at line 266 of file logger.h.

Referenced by MatchesName(), and StringMatcher().


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