30 #ifndef _STRING_CONSTRAINT_H_
31 #define _STRING_CONSTRAINT_H_
73 eMatchType_Contains = 0,
82 bool ignore_case =
false,
83 bool ignore_space =
false,
84 bool negation =
false)
85 : m_MatchText(match_text),
86 m_MatchType(match_type),
87 m_IgnoreCase(ignore_case),
88 m_IgnoreSpace(ignore_space),
89 m_NotPresent(negation) {}
98 bool DoesTextMatch(
const string&
text);
99 bool DoesListMatch(
const vector<string>& vals);
103 void SetMatchText(
const string& match_text) { m_MatchText = match_text; }
105 bool IsInRange(
const string&
str,
const string &
tmp);
const string & GetMatchText()
EMatchType GetMatchType()
CStringConstraint(const string &match_text, EMatchType match_type=eMatchType_Contains, bool ignore_case=false, bool ignore_space=false, bool negation=false)
void SetIgnoreSpace(bool val)
void SetIgnoreCase(bool val)
void SetNegation(bool val)
void SetMatchType(EMatchType match_type)
void SetMatchText(const string &match_text)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#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.
#define NCBI_XOBJEDIT_EXPORT
static void text(MDB_val *v)
static const char * str(char *buf, int n)
@ eExistingText_append_semi
@ eExistingText_append_space
@ eExistingText_prefix_colon
@ eExistingText_append_none
@ eExistingText_leave_old
@ eExistingText_prefix_none
@ eExistingText_prefix_space
@ eExistingText_append_colon
@ eExistingText_prefix_comma
@ eExistingText_append_comma
@ eExistingText_prefix_semi
@ eExistingText_replace_old
bool AddValueToString(string &str, const string &value, EExistingText existing_text)
Add text to an existing string, using the "existing_text" directive to combine new text with existing...