MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / process

Function process

src/dialog_selection.cpp:78–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76};
77
78std::set<AssDialogue*> process(std::string const& match_text, bool match_case, Mode mode, bool invert, bool comments, bool dialogue, int field_n, AssFile *ass) {
79 SearchReplaceSettings settings = {
80 match_text,
81 std::string(),
82 static_cast<SearchReplaceSettings::Field>(field_n),
83 SearchReplaceSettings::Limit::ALL,
84 match_case,
85 mode == Mode::REGEXP,
86 false,
87 false,
88 mode == Mode::EXACT
89 };
90
91 auto predicate = SearchReplaceEngine::GetMatcher(settings);
92
93 std::set<AssDialogue*> matches;
94 for (auto& diag : ass->Events) {
95 if (diag.Comment && !comments) continue;
96 if (!diag.Comment && !dialogue) continue;
97
98 if (invert != predicate(&diag, 0))
99 matches.insert(&diag);
100 }
101
102 return matches;
103}
104
105DialogSelection::DialogSelection(agi::Context *c) :
106wxDialog (c->parent, -1, _("Select"), wxDefaultPosition, wxDefaultSize, wxCAPTION)

Callers 1

ProcessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected