NCBI C++ ToolKit
String_constraint.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: String_constraint.cpp 98741 2022-12-29 18:00:10Z gotvyans $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: J. Chen
27  *
28  * File Description:
29  * Evaluate if a string and an object match to CString_constraint
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using the following specifications:
34  * 'macro.asn'.
35  */
36 
37 #include <ncbi_pch.hpp>
42 
44 BEGIN_objects_SCOPE // namespace ncbi::objects::
45 
46 
47 const vector<string> CString_constraint::s_WeaselWords = {
48  "candidate",
49  "hypothetical",
50  "novel",
51  "possible",
52  "potential",
53  "predicted",
54  "probable",
55  "putative",
56  "uncharacterized",
57  "unique"
58 };
59 
60 
61 namespace
62 {
63  bool x_IsWordCharacter(char c) {
64  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == '-';
65  }
66  // split on spaces and punctuation
67  void x_Split(const string& s, vector<string>& v)
68  {
69  size_t i;
70  int n = -1;
71  for (i = 0; i < s.length(); i++) {
72  if (s[i] == ' ') { // assuming that tabs and other empty space characters are addressed before
73  if (n != -1) {
74  v.push_back(s.substr(n, i - n));
75  n = -1;
76  }
77  }
78  else if (x_IsWordCharacter(s[i])) {
79  if (n == -1) {
80  n = i;
81  }
82  else if (!x_IsWordCharacter(s[n])) {
83  v.push_back(s.substr(n, i - n));
84  n = i;
85  }
86  }
87  else {
88  if (n == -1) {
89  n = i;
90  }
91  else if (x_IsWordCharacter(s[n])) {
92  v.push_back(s.substr(n, i - n));
93  n = i;
94  }
95  }
96  }
97  if (n != -1) {
98  v.push_back(s.substr(n, i - n));
99  }
100  }
101 
102  string x_Assemble(vector<string>& v, vector<bool>& skip)
103  {
104  bool first = true;
105  string s;
106  for (size_t i = 0; i < v.size(); i++) {
107  if (!skip[i]) {
108  if (!first && x_IsWordCharacter(v[i][0])) {
109  s += ' ';
110  }
111  s += v[i];
112  first = false;
113  }
114  }
115  return s;
116  }
117 
118 
119  // El sueno de la razon produce monstruos
120  CTempString x_StripUnimportantCharacters(string& storage, const CTempString& str, bool strip_space, bool strip_punct)
121  {
122  if (str.empty()) {
123  return kEmptyStr;
124  }
125  if (!strip_space && !strip_punct)
126  return str;
127 
128  bool has_stripped = false;
130  const char* s = str.data();
131  for (; i < str.size(); i++, s++)
132  {
133  if ((strip_space && isspace(*s)) || (strip_punct && ispunct(*s)))
134  {
135  if (!has_stripped) // first occurence
136  {
137  storage.reserve(str.size()-1); // at least one symbol will be removed
138  storage.clear();
139  storage.append(str.data(), i);
140  has_stripped = true;
141  }
142  }
143  else
144  {
145  if (has_stripped)
146  storage.push_back(*s);
147  }
148  }
149 
150  if (has_stripped)
151  return storage;
152  else
153  return str;
154  }
155 
156  inline
157  bool x_DisallowCharacter(const char ch, bool disallow_slash)
158  {
159  if (isalpha(Uint1(ch)) || isdigit(Uint1(ch)) || ch == '_' || ch == '-') return true;
160  else if (disallow_slash && ch == '/') return true;
161  else return false;
162  }
163 
164 }
165 
166 
168 {
169  m_noweasel_start = 0;
170  const auto& callback = [&](size_t n, size_t p) {
173  m_noweasel_start = p;
174  m_weaselmask |= (1 << n);
175  }
176  }
177  else { // space
178  if (p == m_noweasel_start) {
179  m_noweasel_start = p + 1;
180  }
181  }
182  };
183 
184 // Including state machine
185 #include "weasel.inc"
186 
187  static const TLocalFSM s_FSM{s_compact, s_hits_init_1, s_hits_init_2, s_states, nullptr};
188 
189  CMultipatternSearch::Search(this->m_original, s_FSM, callback);
190 }
191 
192 
194 {
195 }
196 
197 
199 {
200 }
201 
202 
204 {
205  if (GetIs_all_caps() ||
206  GetIs_all_lower() ||
207  GetIs_all_punct() ||
208  GetIs_first_cap() ||
210  return false;
211  } else if (!CanGetMatch_text() || GetMatch_text().empty()) {
212  return true;
213  }
214 
215  return false;
216 }
217 
219 {
221 }
222 
224 {
226 }
227 
229 {
231  for (unsigned i=0; i< match.size(); i++) {
232  if (!ispunct(match[i])) return false;
233  }
234  return true;
235 }
236 
237 bool CString_constraint::x_IsSkippable(const char ch) const
238 {
239  if (ispunct(ch) && GetIgnore_punct()) {
240  return true;
241  } else if (isspace(ch) && GetIgnore_space()) {
242  return true;
243  } else {
244  return false;
245  }
246 }
247 
249 {
250  for (CTempString::size_type i = 0; i < match.size(); i++) {
251  if (!x_IsSkippable(match[i])) {
252  return false;
253  }
254  }
255  return true;
256 }
257 
259 {
261  // ignore punctuation and spaces at the beginning of the phrase
262  CTempString::const_iterator it = str.begin();
263  while (it != str.end() && !isalpha((unsigned char) (*it))) {
264  if (isdigit( (unsigned char) (*it))) {
265  return false;
266  }
267  ++it;
268  }
269 
270  if (it != str.end()) {
271  return isalpha((unsigned char) (*it)) && isupper((unsigned char) (*it));
272  }
273  return false;
274 }
275 
277 {
279  bool first(true);
280  bool rval(true);
281  for (size_t i = 0; i < str.size() && rval; ++i) {
282  if (isalpha( (unsigned char) str[i])) {
283  if (first) {
284  rval = rval && isupper( (unsigned char) str[i] );
285  first = false;
286  }
287  } else if ( str[i] == '-' ){
288  // hyphenated words are considered as one composed word
289  if ((i > 0 && !isalpha( (unsigned char) str[i - 1])) ||
290  (i + 1 < str.size() && !isalpha( (unsigned char) str[i + 1] )))
291  first = true;
292  } else if (isdigit( (unsigned char) str[i])){
293  if (i + 1 < str.size() && isalpha( (unsigned char) str[i + 1])) {
294  rval = false;
295  }
296  } else {
297  first = true;
298  }
299  }
300  return rval;
301 }
302 
303 bool CString_constraint::x_IsWholeWordMatch(const CTempString& start, size_t found, size_t match_len, bool disallow_slash) const
304 {
305  size_t after_idx;
306  if (!match_len) {
307  return true;
308  }
309  else if (start.empty() || found == string::npos) {
310  return false;
311  }
312  else {
313  if (found) {
314  if (x_DisallowCharacter (start[found-1], disallow_slash)) {
315  return false;
316  }
317  }
318  after_idx = found + match_len;
319  if (after_idx < start.size() && x_DisallowCharacter(start[after_idx], disallow_slash)) {
320  return false;
321  }
322  }
323  return true;
324 }
325 
326 
327 bool CString_constraint :: x_PartialCompare(const string& str, const string& pattern, char prev_char, size_t & match_len) const
328 {
329  // check for synonyms to skip
330  if (IsSetIgnore_words()) {
332  vector<size_t> match_lens = (*word)->GetMatchLens(str, pattern, prev_char);
333  if (match_lens.size() > 0) {
334  size_t word_len = (*word)->GetWord().length();
335  ITERATE(vector<size_t>, len, match_lens) {
336  size_t this_match = 0;
337  char this_prev_char = 0;
338  if (*len > 0) {
339  this_prev_char = str.c_str()[(*len) - 1];
340  } else {
341  this_prev_char = prev_char;
342  }
343  bool require_end = false;
345  require_end = true;
346  }
347  if (x_PartialCompare(str.substr(*len), pattern.substr(word_len), this_prev_char, this_match) &&
348  (!require_end || this_match == str.substr(*len).length())) {
349  match_len += *len;
350  match_len += this_match;
351  return true;
352  }
353  }
354  }
355  }
356  }
357 
358  if (pattern.length() == 0) {
359  return true;
360  }
361 
362  if (str.length() == 0) {
363  if (x_IsAllSkippable(pattern)) {
364  return true;
365  }
366  // special case: can continue if the next character is a space, might have words to ignore
367  if (isspace(pattern[0])) {
368  return x_PartialCompare(str, pattern.substr(1), ' ', match_len);
369  } else {
370  return false;
371  }
372  }
373  if (GetIgnore_space()) {
374  if (isspace(Uint1(str[0]))) {
375  match_len++;
376  return x_PartialCompare(str.substr(1), pattern, str[0], match_len);
377  } else if (isspace(Uint1(pattern[0]))) {
378  return x_PartialCompare(str, pattern.substr(1), prev_char, match_len);
379  }
380  }
381  if (GetIgnore_punct()) {
382  if (ispunct(Uint1(str[0]))) {
383  match_len++;
384  return x_PartialCompare(str.substr(1), pattern, str[0], match_len);
385  } else if (ispunct(Uint1(pattern[0]))) {
386  return x_PartialCompare(str, pattern.substr(1), prev_char, match_len);
387  }
388  }
389  if (str[0] == pattern[0]) {
390  match_len++;
391  return x_PartialCompare(str.substr(1), pattern.substr(1), str[0], match_len);
392  } else if ((!IsSetCase_sensitive() || !GetCase_sensitive()) &&
393  tolower(Uint1(str[0])) == tolower(Uint1(pattern[0]))) {
394  match_len++;
395  return x_PartialCompare(str.substr(1), pattern.substr(1), str[0], match_len);
396  }
397 
398  return false;
399 }
400 
401 
402 bool CString_constraint :: x_AdvancedStringCompare(const string& str, const string& str_match, const char prev_char, size_t * ini_target_match_len) const
403 {
404  bool rval = false;
405  size_t match_len = 0;
406  if (x_PartialCompare(str, str_match, prev_char, match_len)) {
407  if (ini_target_match_len != NULL) {
408  *ini_target_match_len = match_len;
409  }
410  rval = true;
411  }
412 
413  return rval;
414 }
415 
416 bool CString_constraint::x_AdvancedStringMatch(const string& str, const string& tmp_match) const
417 {
418  bool rval = false;
419  string match_text = CanGetMatch_text() ? tmp_match : kEmptyStr;
420 
421  size_t match_len = 0;
422 
423  if (x_AdvancedStringCompare (str, match_text, 0, &match_len) && (GetMatch_location() != eString_location_equals || match_len == str.length())) {
424  return true;
425  }
427  return false;
428  }
429  else {
430  size_t pos = 1;
431  size_t len = str.size();
432  while (!rval && pos < len) {
433  if (GetWhole_word()) {
434  while (pos < len && isalpha (Uint1(str[pos-1]))) pos++;
435  }
436  if (pos < len) {
437  size_t sub_match_len = 0;
438  if (x_AdvancedStringCompare (str.substr(pos), match_text, 0, &sub_match_len)) {
439  if (sub_match_len < len - pos && GetMatch_location() == eString_location_ends) {
440  pos++;
441  }
442  else {
443  rval = true;
444  }
445  }
446  else {
447  pos++;
448  }
449  }
450  }
451  }
452  return rval;
453 }
454 
455 
457 {
458  if (CanGetMatch_text() && m_match.original().original().empty()) {
460  }
461  if (m_match.original().original().empty()) {
462  return "";
463  }
464  if (e_case == e_automatic) {
466  }
467  switch (e_case) {
468  case e_automatic:
469  case e_original:
470  return m_match.original().original();
471  case e_lowercase:
472  return m_match.original().lowercase();
473  case e_uppercase:
474  return m_match.original().uppercase();
475  }
476  return {};
477 }
478 
479 
481 {
482  if (m_match.original().original().empty()) {
484  }
485 
486  if (e_case == e_automatic) {
488  }
489  if (GetIgnore_weasel() && !(m_match.GetWeaselMask() & s.GetWeaselMask())) {
490  switch (e_case) {
491  case e_automatic:
492  case e_original:
493  return s.GetNoweasel();
494  case e_lowercase:
495  return s.GetNoweaselLC();
496  case e_uppercase:
497  return s.GetNoweaselUC();
498  }
499  }
500  else {
501  switch (e_case) {
502  case e_automatic:
503  case e_original:
504  return s.original().original();
505  case e_lowercase:
506  return s.original().lowercase();
507  case e_uppercase:
508  return s.original().uppercase();
509  }
510  }
511  return {};
512 }
513 
514 
516 {
518  if (loc == eString_location_equals) {
519  return search == pattern;
520  }
521  SIZE_TYPE found = search.find(pattern);
522  if (found == NPOS) {
523  return false;
524  }
525  else if (loc == eString_location_starts) {
526  return found == 0 && (!GetWhole_word() || x_IsWholeWordMatch(search, found, pattern.size()));
527  }
528  else if (loc == eString_location_contains) {
529  CTempString next_guess = search.substr(found + 1);
530  return (!GetWhole_word() || x_IsWholeWordMatch(search, found, pattern.size())) ? true : x_MatchFound(next_guess, pattern);
531  }
532  else if (loc == eString_location_ends) {
533  CTempString next_guess = search.substr(found + 1);
534  return found + pattern.size() == search.size() && (!GetWhole_word() || x_IsWholeWordMatch(search, found, pattern.size())) ? true : x_MatchFound(next_guess, pattern);
535  }
536  return false;
537 }
538 
539 
541 {
542  if (str.original().original().empty()) {
543  return false;
544  }
545 
546  // bool rval(false);
547  if (Empty()) {
548  return true;
549  }
550 
551  if (GetIs_all_caps() && !x_IsAllCaps(str)) {
552  return false;
553  }
554  else if (GetIs_all_lower() && !x_IsAllLowerCase(str)) {
555  return false;
556  }
557  else if (GetIs_all_punct() && !x_IsAllPunctuation(str)) {
558  return false;
559  }
560  else if (GetIs_first_cap() && !x_IsFirstCap(str)) {
561  return false;
562  }
563  else if (GetIs_first_each_cap() && !x_IsFirstEachCap(str)) {
564  return false;
565  }
566  else {
568  cout << "eString_location_inlist is not supported!\n";
569  return false;
570  }
571 
574 
575  unsigned mask = GetIgnore_weasel() ? m_match.GetWeaselMask() : 0;
576  unsigned str_mask = GetIgnore_weasel() ? str.GetWeaselMask() : 0;
577 
578  if ((mask & str_mask) != mask) {
579  return false; // shortcut
580  }
581 
583  if (mask) {
584  cout << pattern << " <===> " << search << "\nSelf-weasel case with ignored words is not supported!\n";
585  return false;
586  }
587  return x_AdvancedStringMatch(search, pattern);
588  }
589  else {
590  string s_search, p_search;
592  search = x_StripUnimportantCharacters(s_search, search, GetIgnore_space(), GetIgnore_punct());
593  pattern = x_StripUnimportantCharacters(p_search, pattern, GetIgnore_space(), GetIgnore_punct());
594  }
595 
596  if (!mask) { // no self-weasel
597  return x_MatchFound(search, pattern);
598  }
599 
600  // clinical case
601  vector<string> v;
602  x_Split(search, v);
603  vector<bool> skip(v.size(), false);
604  vector<size_t> test;
605  for (size_t i = 0; i < v.size(); i++) {
606  for (size_t k = 0; k < CString_constraint::s_WeaselWords.size(); k++) {
607  unsigned m = (1 << k);
608  if (m & str_mask) {
609  string lower = v[i];
610  NStr::ToLower(lower);
611  if (lower == CString_constraint::s_WeaselWords[k]) {
612  if (m & mask) {
613  test.push_back(i);
614  }
615  skip[i] = true;
616  }
617  }
618  }
619  }
620  // combinatorics
621  while (true) {
622  string guess = x_Assemble(v, skip);
623  CTempString next_guess = guess; // Using CTempString everywhere was a bad idea...
624  if (x_MatchFound(next_guess, pattern)) {
625  return true;
626  }
627  for (size_t i = 0; i < test.size(); i++) {
628  if (skip[test[i]]) {
629  skip[test[i]] = false;
630  break;
631  }
632  else {
633  skip[test[i]] = true;
634  if (i == test.size() - 1) {
635  return false;
636  }
637  }
638  }
639  }
640  }
641  }
642  return false;
643 }
644 
646 {
648  return GetNot_present() ? (!rval) : rval;
649 }
650 
651 bool CString_constraint::x_ReplaceContains(string& val, const string& replace) const
652 {
653  bool rval = false;
654 
655  size_t offset = 0;
656  while (offset < val.length()) {
657  size_t match_len = 0;
659  offset == 0 ? 0 : val.c_str()[offset - 1],
660  &match_len)) {
661  val = val.substr(0, offset) + replace + val.substr(offset + match_len);
662  rval = true;
663  offset += replace.length();
664  } else {
665  offset++;
666  }
667  }
668  return rval;
669 }
670 
671 
672 bool CString_constraint::ReplaceStringConstraintPortionInString(string& result, const CMatchString& str, const string& replace) const
673 {
674  bool rval = false;
675 
676  const string& val = str;
677 
678  if (val.empty()) {
679  if (Empty() || (IsSetNot_present() && GetNot_present())) {
680  result = replace;
681  rval = true;
682  }
683  } else if (Empty()) {
684  result = replace;
685  rval = true;
686  } else {
687  if (IsSetMatch_location()) {
688  switch (GetMatch_location()) {
691  result = replace;
692  rval = true;
693  break;
695  {{
696  size_t match_len = 0;
697  if (x_AdvancedStringCompare(val, GetMatch_text(), 0, &match_len)) {
698  result = replace;
699  result.append(val.data()+match_len, val.length()-match_len);
700  rval = true;
701  }
702  }}
703  break;
705  result = val;
706  rval = x_ReplaceContains(result, replace);
707  break;
709  {{
710  size_t offset = 0;
711  while (!rval && offset < val.length()) {
712  size_t match_len = 0;
713  if (x_AdvancedStringCompare(val.substr(offset),
714  GetMatch_text(),
715  (offset == 0 ? 0 : val.c_str()[offset - 1]),
716  &match_len)
717  && offset + match_len == val.length()) {
718  result = val.substr(0, offset) + replace;
719  rval = true;
720  } else {
721  offset++;
722  }
723  }
724  }}
725  break;
726  }
727  } else {
728  result = val;
729  rval = x_ReplaceContains(result, replace);
730  }
731  }
732  return rval;
733 }
734 
735 END_objects_SCOPE // namespace ncbi::objects::
User-defined methods of the data storage class.
ncbi::TMaskedQueryRegions mask
const string & uppercase() const
const string & original() const
const string & lowercase() const
CTempString GetNoweaselLC() const
CTempString GetNoweasel() const
CTempString GetNoweaselUC() const
CTempString::size_type m_noweasel_start
CAutoLowerCase m_original
void x_PopWeasel() const
unsigned GetWeaselMask() const
const CAutoLowerCase & original() const
void Search(const char *input, VoidCall1 found_callback) const
CTempString x_GetCompareString(const CMatchString &s, ECase e_case=e_automatic) const
bool x_IsAllSkippable(const CTempString &str) const
bool x_IsWholeWordMatch(const CTempString &start, size_t found, size_t match_len, bool disallow_slash=false) const
CTempString x_GetConstraintString(ECase e_case=e_automatic) const
bool x_MatchFound(CTempString &search, CTempString &pattern) const
bool x_IsFirstCap(const CMatchString &str) const
bool ReplaceStringConstraintPortionInString(string &result, const CMatchString &str, const string &replace) const
bool x_IsAllLowerCase(const CMatchString &str) const
bool x_IsAllPunctuation(const CMatchString &str) const
bool x_ReplaceContains(string &val, const string &replace) const
bool Match(const CMatchString &str) const
bool x_DoesSingleStringMatchConstraint(const CMatchString &str) const
bool x_IsAllCaps(const CMatchString &str) const
bool x_IsFirstEachCap(const CMatchString &str) const
bool x_AdvancedStringCompare(const string &str, const string &str_match, const char prev_char, size_t *ini_target_match_len=0) const
bool x_IsSkippable(const char ch) const
static const vector< string > s_WeaselWords
bool x_AdvancedStringMatch(const string &str, const string &tmp_match) const
bool x_PartialCompare(const string &str, const string &pattern, char prev_char, size_t &match_len) const
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
uint8_t Uint1
1-byte (8-bit) unsigned integer
Definition: ncbitype.h:99
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
#define kEmptyStr
Definition: ncbistr.hpp:123
#define NPOS
Definition: ncbistr.hpp:133
const char * const_iterator
Definition: tempstr.hpp:71
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
Definition: tempstr.hpp:334
size_t size_type
Definition: tempstr.hpp:70
CTempString substr(size_type pos) const
Obtain a substring from this string, beginning at a given offset.
Definition: tempstr.hpp:776
size_type find(const CTempString match, size_type pos=0) const
Find the first instance of the entire matching string within the current string, beginning at an opti...
Definition: tempstr.hpp:655
size_type size(void) const
Return the length of the represented array.
Definition: tempstr.hpp:327
static string & ToLower(string &str)
Convert string to lower case – string& version.
Definition: ncbistr.cpp:405
TCase_sensitive GetCase_sensitive(void) const
Get the Case_sensitive member data.
const TIgnore_words & GetIgnore_words(void) const
Get the Ignore_words member data.
bool IsSetMatch_location(void) const
Check if a value has been assigned to Match_location data member.
TIs_first_each_cap GetIs_first_each_cap(void) const
Get the Is_first_each_cap member data.
TIgnore_space GetIgnore_space(void) const
Get the Ignore_space member data.
TMatch_location GetMatch_location(void) const
Get the Match_location member data.
bool IsSetCase_sensitive(void) const
Check if a value has been assigned to Case_sensitive data member.
TIs_all_caps GetIs_all_caps(void) const
Get the Is_all_caps member data.
TIs_first_cap GetIs_first_cap(void) const
Get the Is_first_cap member data.
bool IsSetNot_present(void) const
Check if a value has been assigned to Not_present data member.
TWhole_word GetWhole_word(void) const
Get the Whole_word member data.
TIgnore_weasel GetIgnore_weasel(void) const
Get the Ignore_weasel member data.
TIgnore_punct GetIgnore_punct(void) const
Get the Ignore_punct member data.
EString_location
simple constraints
const TMatch_text & GetMatch_text(void) const
Get the Match_text member data.
TNot_present GetNot_present(void) const
Get the Not_present member data.
list< CRef< CWord_substitution > > Tdata
TIs_all_punct GetIs_all_punct(void) const
Get the Is_all_punct member data.
TIs_all_lower GetIs_all_lower(void) const
Get the Is_all_lower member data.
bool CanGetMatch_text(void) const
Check if it is safe to call GetMatch_text method.
bool CanGetIgnore_words(void) const
Check if it is safe to call GetIgnore_words method.
bool IsSetIgnore_words(void) const
Check if a value has been assigned to Ignore_words data member.
@ eString_location_inlist
@ eString_location_equals
@ eString_location_contains
@ eString_location_starts
@ eString_location_ends
int i
yy_size_t n
int len
const TYPE & Get(const CNamedParameterList *param)
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
int isalpha(Uchar c)
Definition: ncbictype.hpp:61
int isspace(Uchar c)
Definition: ncbictype.hpp:69
int tolower(Uchar c)
Definition: ncbictype.hpp:72
int isdigit(Uchar c)
Definition: ncbictype.hpp:64
int ispunct(Uchar c)
Definition: ncbictype.hpp:68
int isupper(Uchar c)
Definition: ncbictype.hpp:70
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)
Definition: pcre_exec.c:513
int offset
Definition: replacements.h:160
static const char * str(char *buf, int n)
Definition: stats.c:84
int test(int srctype, const void *srcdata, int srclen, int dsttype, int dstlen)
Definition: t0019.c:43
else result
Definition: token2.c:20
Modified on Mon Feb 26 04:04:41 2024 by modify_doxy.py rev. 669887