gem5
v20.1.0.0
|
ObjectMatch contains a vector of expressions. More...
#include <match.hh>
Public Member Functions | |
ObjectMatch () | |
ObjectMatch (const std::string &expression) | |
void | add (const ObjectMatch &other) |
void | setExpression (const std::string &expression) |
void | setExpression (const std::vector< std::string > &expression) |
std::vector< std::vector< std::string > > | getExpressions () |
bool | match (const std::string &name) const |
Protected Member Functions | |
bool | domatch (const std::string &name) const |
Protected Attributes | |
std::vector< std::vector< std::string > > | tokens |
ObjectMatch contains a vector of expressions.
ObjectMatch can then be queried, via ObjectMatch.match(std::string), to check if a string matches any expressions in the vector.
Expressions in ObjectMatch take the form "<token1>.<token2>.<token3>"; a series of expected tokens separated by a period. The input string takes the form "<value1>.<value2>.<value3>". In this case, the input string matches the expression if <value1> == <token1> && <token2> == <value2> && <value3> == <token3>. A token may be a wildcard character, "*", which will match to any value in that position (inclusive of no value at that location).
ObjectMatch::ObjectMatch | ( | const std::string & | expression | ) |
void ObjectMatch::add | ( | const ObjectMatch & | other | ) |
Definition at line 46 of file match.cc.
References tokens.
Referenced by Trace::Logger::addIgnore(), and TEST().
|
protected |
std::vector< std::vector< std::string > > ObjectMatch::getExpressions | ( | ) |
|
inline |
Definition at line 66 of file match.hh.
References domatch(), name(), and tokens.
Referenced by Trace::Logger::dprintf_flag(), Trace::Logger::dump(), Trace::OstreamLogger::logMessage(), and TEST().
void ObjectMatch::setExpression | ( | const std::string & | expression | ) |
Referenced by TEST().
void ObjectMatch::setExpression | ( | const std::vector< std::string > & | expression | ) |
|
protected |