libt3widget
|
Class holding the context of a find operation. More...
Public Member Functions | |
finder_t (void) | |
Create a new empty finder_t. More... | |
finder_t (const std::string *needle, int flags, const std::string *replacement=NULL) | |
Create a new finder_t for a specific search. More... | |
int | get_flags (void) |
Retrieve the flags set when setting the search context. More... | |
std::string * | get_replacement (const std::string *haystack) |
Retrieve the replacement string. More... | |
bool | match (const std::string *haystack, find_result_t *result, bool reverse) |
Try to find the previously set needle in a string. More... | |
finder_t & | operator= (finder_t &other) |
Assign the value of another finder_t to this finder_t. More... | |
void | set_context (const std::string *needle, int flags, const std::string *replacement=NULL) |
Set the search parameters. More... | |
virtual | ~finder_t (void) |
Destroy a finder_t instance. More... | |
Class holding the context of a find operation.
t3_widget::finder_t::finder_t | ( | void | ) |
Create a new empty finder_t.
t3_widget::finder_t::finder_t | ( | const std::string * | needle, |
int | flags, | ||
const std::string * | replacement = NULL |
||
) |
Create a new finder_t for a specific search.
May throw a const
char
pointer holding an error message. Caller of this constructor remains owner of passed objects.
|
virtual |
Destroy a finder_t instance.
int t3_widget::finder_t::get_flags | ( | void | ) |
Retrieve the flags set when setting the search context.
string * t3_widget::finder_t::get_replacement | ( | const std::string * | haystack | ) |
Retrieve the replacement string.
Returns a newly allocated string, for which the caller will have ownership.
bool t3_widget::finder_t::match | ( | const std::string * | haystack, |
find_result_t * | result, | ||
bool | reverse | ||
) |
Try to find the previously set needle
in a string.
void t3_widget::finder_t::set_context | ( | const std::string * | needle, |
int | flags, | ||
const std::string * | replacement = NULL |
||
) |
Set the search parameters.
May throw a const
char
pointer holding an error message. Caller of this function remains owner of passed objects.