1 #ifndef _PARSE_TEXT_OPTIONS_HPP_
2 #define _PARSE_TEXT_OPTIONS_HPP_
43 SIZE_TYPE start_search,
bool case_insensitive,
bool whole_word);
56 : m_MarkerType(eMarkerType_None),
60 void SetText(
const string&
val);
61 void SetDigits() { m_MarkerType = eMarkerType_Digits; }
62 void SetLetters() { m_MarkerType = eMarkerType_Letters; }
63 bool FindInText(
const string&
val,
size_t& pos,
size_t&
len,
size_t start_search,
bool case_insensitive,
bool whole_word)
const;
66 static void s_GetDigitsPosition(
const string&
str,
size_t& pos,
size_t&
len,
size_t start_search);
67 static void s_GetLettersPosition(
const string&
str,
size_t& pos,
size_t&
len,
size_t start_search);
79 : m_IncludeStartMarker(
false),
80 m_IncludeStopMarker(
false),
81 m_RemoveFromParsed(
false),
82 m_RemoveBeforePattern(
false),
83 m_RemoveAfterPattern(
false),
84 m_CaseInsensitive(
false),
108 string GetSelectedText(
const string&
input)
const;
109 void RemoveSelectedText(
string&
input,
bool remove_first_only =
true)
const;
void SetShouldRmvAfterPattern(bool val)
if true, removes the rhs delimiter from the parsed text
CParseTextMarker m_StartMarker
void SetIncludeStop(bool val)
void SetShouldRmvBeforePattern(bool val)
if true, removes the lhs delimiter from the parsed text
CParseTextMarker m_StopMarker
void SetIncludeStart(bool val)
bool m_RemoveAfterPattern
void SetStopText(const string &val)
bool m_RemoveBeforePattern
void SetCaseInsensitive(bool val)
bool m_IncludeStartMarker
bool ShouldRemoveFromParsed() const
void SetWholeWord(bool val)
void SetStartText(const string &val)
void SetShouldRemove(bool val)
if true, removes the parsed text from the parsed text
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char * str(char *buf, int n)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
NCBI_NS_STD::string::size_type SIZE_TYPE
#define NCBI_XOBJEDIT_EXPORT
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
SIZE_TYPE FindWithOptions(const string &str, const string &pattern, SIZE_TYPE start_search, bool case_insensitive, bool whole_word)