A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/utilref_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/flatfile/utilref.cpp Source File

57 #define THIS_FILE "utilref.cpp" 60 #define OTHER_MEDIUM 255 73  auto

it = tokens.before_begin();

74  for

(

auto

pt =

str

.begin(); pt !=

str

.end();) {

75  if

(

" \n\t\f~,"

sv.find(*pt) != string_view::npos) {

82  for

(; pt !=

str

.end(); ++pt) {

83

string_view sv(pt,

str

.end());

85  if

(sv.starts_with(d = delimeter) ||

86

sv.starts_with(d =

",\n"

sv) ||

87

sv.starts_with(d =

",~"

sv) ||

88

sv.starts_with(d =

" and "

sv)) {

89

it = tokens.insert_after(it, string_view(save_pt, pt));

96

it = tokens.insert_after(it, string_view(save_pt,

str

.end()));

108  for

(string::iterator it =

str

.begin(); it !=

str

.end(); ++it)

109  if

(*it !=

','

&& *it !=

'\t'

&& *it !=

' '

)

121  for

(

auto

vnp = beg; vnp != end; ++vnp) {

122

string_view p = *vnp;

123  if

(p.starts_with(

"and "

sv))

124

p.remove_prefix(

"and "

sv.size());

128  if

(author.

Empty

()) {

134  auto

& name = author->

SetName

().SetName();

135  auto

&

last

= name.SetLast();

136  auto i

=

last

.find(

'|'

);

137  if

(

i

!= string::npos) {

138  string

s =

last

.substr(

i

+ 1);

142

name.SetFirst(std::move(s));

147  string

& initials = author->

SetName

().SetName().SetInitials();

152  string

& suffix = author->

SetName

().SetName().SetSuffix();

158

auths->

SetNames

().SetStd().push_back(author);

167  while

(! token.empty() && token.back() ==

' '

)

168

token.remove_suffix(1);

175  auto

bptr = token.begin();

176  auto

eptr = token.end();

177

string_view::iterator auth;

180  for

(auth = bptr; auth < eptr && *auth !=

','

;)

187

namestd.

SetLast

(

string

(bptr, auth));

189  for

(auth = eptr - 1; auth > bptr && *auth !=

'.'

;)

193  if

(auth < eptr && *auth !=

'.'

)

194

namestd.

SetLast

(

string

(auth, eptr));

197

namestd.

SetLast

(

string

(token));

199  for

(auth = eptr - 1; auth > bptr && *auth !=

' '

;)

202  if

(*(auth - 1) ==

'.'

)

203  for

(auth--; auth > bptr && *auth !=

' '

;)

212

namestd.

SetLast

(

string

(bptr, auth));

256  if

(pt.empty() || pt.starts_with(

';'

))

259

string_view

tmp

(pt);

261  tmp

.remove_suffix(1);

262  if

(

tmp

.ends_with(

"et al"

)) {

279  for

(string_view q =

str

; ! q.empty();) {

280  auto

p = q.find(

';'

);

282  if

(p != string_view::npos) {

283

name = q.substr(0, p);

284

q.remove_prefix(p + 1);

291

author->

SetName

().SetConsortium(

string

(name));

294

auths->

SetNames

().SetStd().push_front(author);

296  while

(! q.empty()) {

298  if

(c ==

';'

|| c ==

' '

)

305  while

(! q.empty() && q.front() ==

' '

)

331  if

((*page1 >=

'a'

&& *page1 <=

'z'

) || (*page1 >=

'A'

&& *page1 <=

'Z'

)) {

332  for

(p = page1; (*p >=

'a'

&& *p <=

'z'

) || (*p >=

'A'

&& *p <=

'Z'

);)

335  if

((*page2 < 'a' || *page2 >

'z'

) && (*page2 < 'A' || *page2 >

'Z'

)) {

340  for

(q = page2; (*q >=

'a'

&& *q <=

'z'

) || (*q >=

'A'

&& *q <=

'Z'

);)

355  for

(page1 = p; *p >=

'0'

&& *p <=

'9'

;)

357  for

(page2 = q; *q >=

'0'

&& *q <=

'9'

;)

362  if

(*p !=

'\0'

|| *q !=

'\0'

) {

372  if

(*page1 < '0' || *page1 >

'9'

|| *page2 < '0' || *page2 >

'9'

) {

377  for

(p = page1; *p >=

'0'

&& *p <=

'9'

;)

379  for

(q = page2; *q >=

'0'

&& *q <=

'9'

;)

389  for

(page1 = p; (*p >=

'a'

&& *p <=

'z'

) || (*p >=

'A'

&& *p <=

'Z'

);)

391  for

(page2 = q; (*q >=

'a'

&& *q <=

'z'

) || (*q >=

'A'

&& *q <=

'Z'

);)

393  if

(*p !=

'\0'

|| *q !=

'\0'

|| !

StringEqu

(page1, page2)) {

414  if

(! pages || *pages ==

'\0'

)

418

title = (

char

*)

""

;

419  while

(*pages ==

' '

|| *pages ==

';'

|| *pages ==

'\t'

|| *pages ==

','

)

424  for

(s = pages; *s !=

'\0'

;)

426  for

(s--; *s ==

' '

|| *s ==

';'

|| *s ==

','

|| *s ==

'\t'

;)

432  for

(q = pages; (*q >=

'a'

&& *q <=

'z'

) || (*q >=

'A'

&& *q <=

'Z'

) ||

433

(*q >=

'0'

&& *q <=

'9'

);)

444  if

(p == pages || p[1] ==

'\0'

) {

450  if

(inpress && (*(p - 1) ==

' '

|| *(p - 1) ==

'\t'

||

451

p[1] ==

' '

|| p[1] ==

'\t'

))

454  for

(q = p + 1; *q >=

'0'

&& *q <=

'9'

;)

456  for

(p = pages; *p >=

'0'

&& *p <=

'9'

;)

458  if

(*p ==

'-'

&& *q ==

'\0'

) {

466

}

else if

(fps > lps) {

472  if

(er > 0 && (er & 01) != 01)

475

}

else if

(

i

== 1) {

493  if

(! year || *year ==

'\0'

) {

498  if

(year[0] <

'0'

|| year[0] >

'9'

|| year[1] <

'0'

|| year[1] >

'9'

||

499

year[2] <

'0'

|| year[2] >

'9'

|| year[3] <

'0'

|| year[3] >

'9'

) {

504  string

year_str(year, year + 4);

507  struct

tm* tm = localtime(&now);

514

}

else if

(

i

< 1950) {

516

}

else if

(

i

> tm->tm_year + 1900 + 2) {

532  bool

zero_year =

false

;

537

eptr = bptr +

len

- 1;

538  while

(*eptr ==

' '

|| *eptr ==

'\t'

|| *eptr ==

'.'

)

542  for

(s = eptr - 1; s >= bptr && *s !=

'('

;)

544  if

(*s ==

'('

&& s[1] ==

'0'

) {

546  for

(end_tit = bptr;

isdigit

((

int

)*end_tit) == 0;)

559

cit_gen->SetJournal().Set().push_back(journal_title);

560

cit_gen->SetCit(

"In press"

);

566

cit_gen->SetAuthors(*auth_list);

569

cit_gen->SetTitle(title->GetName());

@Auth_list.hpp User-defined methods of the data storage class.

@Name_std.hpp User-defined methods of the data storage class.

#define ERR_REFERENCE_LargePageRange

#define ERR_REFERENCE_UnusualPageNumber

#define ERR_REFERENCE_IllegPageRange

#define ERR_REFERENCE_YearPrecedes1950

#define ERR_REFERENCE_YearPrecedes1900

#define ERR_REFERENCE_EtAlInAuthors

#define ERR_REFERENCE_ImpendingYear

#define ERR_REFERENCE_IllegalDate

#define ERR_REFERENCE_IllegalAuthorName

#define ERR_REFERENCE_InvertPageRange

int fta_atoi(string_view sv)

bool fta_StartsWith(const char *s1, string_view s2)

bool StringEqu(const char *s1, const char *s2)

size_t StringLen(const char *s)

#define FtaErrPost(sev, level,...)

static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)

static const char * str(char *buf, int n)

void Reset(void)

Reset reference object.

bool NotEmpty(void) const THROWS_NONE

Check if CRef is not empty – pointing to an object and has a non-null value.

bool Empty(void) const THROWS_NONE

Check if CRef is empty – not pointing to any object, which means having a null value.

int32_t Int4

4-byte (32-bit) signed integer

char Char

Alias for char.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to int.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static string Sanitize(CTempString str, TSS_Flags flags=fSS_print)

Sanitize a string, allowing only specified classes of characters.

@ fAllowTrailingSymbols

Ignore trailing non-numerics characters.

@ eNocase

Case insensitive compare.

void SetName(TName &value)

Assign a value to Name data member.

const TName & GetName(void) const

Get the Name member data.

void SetNames(TNames &value)

Assign a value to Names data member.

void SetYear(TYear value)

Assign a value to Year data member.

void SetInitials(const TInitials &value)

Assign a value to Initials data member.

bool IsSetSuffix(void) const

Jr, Sr, III Check if a value has been assigned to Suffix data member.

TStd & SetStd(void)

Select the variant.

void SetLast(const TLast &value)

Assign a value to Last data member.

bool IsSetInitials(void) const

first + middle initials Check if a value has been assigned to Initials data member.

bool IsSetLast(void) const

Check if a value has been assigned to Last data member.

const TName & GetName(void) const

Get the variant data.

bool IsSetFirst(void) const

Check if a value has been assigned to First data member.

The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format

static const BitmapCharRec ch1

static const BitmapCharRec ch2

static const char delimiter[]

static Int4 check_mix_pages_range(char *pages)

void get_auth_from_toks(TTokenList::const_iterator beg, TTokenList::const_iterator end, ERefFormat format, CRef< CAuth_list > &auths)

TTokenList get_tokens(string_view str, string_view delimeter)

CRef< CDate > get_date(const Char *year)

static void RemoveSpacesAndCommas(string &str)

void get_auth(string_view pt, ERefFormat format, string_view jour, CRef< CAuth_list > &auths)

CRef< CAuthor > get_std_auth(string_view token, ERefFormat format)

Int4 valid_pages_range(char *pages, const Char *title, Int4 er, bool inpress)

void get_auth_consortium(string_view str, CRef< CAuth_list > &auths)

CRef< CCit_gen > get_error(char *bptr, CRef< CAuth_list > &auth_list, CRef< CTitle::C_E > &title)

std::forward_list< string_view > TTokenList


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4