retdec
|
#include <yara_rule.h>
Public Member Functions | |
Const getters | |
const std::string & | getName () const |
const YaraMeta * | getMeta (const std::string &id) const |
const YaraMatch * | getMatch (std::size_t index) const |
const YaraMatch * | getFirstMatch () const |
const std::vector< YaraMeta > & | getMetas () const |
const std::vector< YaraMatch > & | getMatches () const |
std::size_t | getNumberOfMetas () const |
std::size_t | getNumberOfMatches () const |
Getters | |
YaraMeta * | getMeta (const std::string &id) |
YaraMatch * | getMatch (std::size_t index) |
YaraMatch * | getFirstMatch () |
Setters | |
void | setName (const std::string &ruleName) |
Other methods | |
void | addMeta (const YaraMeta &meta) |
void | addMatch (const YaraMatch &match) |
Private Attributes | |
std::string | name |
std::vector< YaraMeta > | metas |
std::vector< YaraMatch > | matches |
Friends | |
std::ostream & | operator<< (std::ostream &o, const YaraRule &rule) |
Representation of one YARA rule
void retdec::yaracpp::YaraRule::addMatch | ( | const YaraMatch & | match | ) |
Add match
match | Match related to this rule |
void retdec::yaracpp::YaraRule::addMeta | ( | const YaraMeta & | meta | ) |
Add meta
meta | Meta related to this rule |
YaraMatch * retdec::yaracpp::YaraRule::getFirstMatch | ( | ) |
Get first match of this rule
nullptr
if rule has no matches const YaraMatch * retdec::yaracpp::YaraRule::getFirstMatch | ( | ) | const |
Get first match of this rule
nullptr
if rule has no matches YaraMatch * retdec::yaracpp::YaraRule::getMatch | ( | std::size_t | index | ) |
Get selected match of this rule
index | Index of selected match (indexed from 0) |
nullptr
if such match is not found const YaraMatch * retdec::yaracpp::YaraRule::getMatch | ( | std::size_t | index | ) | const |
Get selected match of this rule
index | Index of selected match (indexed from 0) |
nullptr
if such match is not found const std::vector< YaraMatch > & retdec::yaracpp::YaraRule::getMatches | ( | ) | const |
Get all matches
YaraMeta * retdec::yaracpp::YaraRule::getMeta | ( | const std::string & | id | ) |
Get selected meta related to this rule
id | Name of selected meta |
nullptr
if such meta is not found const YaraMeta * retdec::yaracpp::YaraRule::getMeta | ( | const std::string & | id | ) | const |
Get selected meta related to this rule
id | Name of selected meta |
nullptr
if such meta is not found const std::vector< YaraMeta > & retdec::yaracpp::YaraRule::getMetas | ( | ) | const |
Get all metas
const std::string & retdec::yaracpp::YaraRule::getName | ( | ) | const |
Get name related to this rule
std::size_t retdec::yaracpp::YaraRule::getNumberOfMatches | ( | ) | const |
Get number of stored matches
std::size_t retdec::yaracpp::YaraRule::getNumberOfMetas | ( | ) | const |
Get number of stored metas
void retdec::yaracpp::YaraRule::setName | ( | const std::string & | ruleName | ) |
Set name of rule
ruleName | Name of rule |
|
friend |
Overload to print rule's name
o | output stream |
rule | rule being printed |
|
private |
|
private |
|
private |