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/qual__parse_8cpp_source.html below:

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

48  const string

& featKey,

49  const string

& featLocation,

50  const

vector<string>& qualLines) :

54

mFeatLocation(featLocation),

55

mCleanerUpper(featKey, featLocation),

90  bool

thereIsMore =

false

;

138  if

(! cleaned.starts_with(

'/'

) || cleaned.starts_with(

"/ "

)) {

144  auto

idxEqual = cleaned.find(

'='

, 1);

145  auto

maybeQualKey = cleaned.substr(1, idxEqual);

146  if

(idxEqual != string::npos) {

147

maybeQualKey.pop_back();

155

qualKey = maybeQualKey;

158  if

(idxEqual == string::npos) {

163  auto

tail = cleaned.substr(idxEqual + 1, string::npos);

172

thereIsMore =

false

;

175  if

(! tail.starts_with(

'\"'

)) {

178

thereIsMore = (qualKey ==

"anticodon"

) && ! tail.ends_with(

')'

);

182  if

(tail.ends_with(

'\"'

)) {

183

qualVal = tail.substr(1, tail.size() - 2);

185

thereIsMore =

false

;

189

qualVal = tail.substr(1, string::npos);

197  const string

& qualKey,

202  while

(thereIsMore) {

204

thereIsMore =

false

;

205  if

(qualKey !=

"anticodon"

) {

222  const string

& qualKey,

231  bool

thereShouldBeMore = thereIsMore;

233  if

(thereShouldBeMore && qualKey !=

"anticodon"

) {

242  if

(cleaned.ends_with(

'\"'

)) {

244

thereIsMore =

false

;

253  const string

& qualKey,

254  const string

& qualVal)

270  const string

& qualKey,

292  string

lastDataChunkSeen;

300  if

(qualData.empty() || line.empty()) {

304  if

(qualKey ==

"anticodon"

) {

309  auto

sizeAlready = qualData.size();

310  if

(sizeAlready < 2) {

315  if

(qualData[sizeAlready - 1] ==

'-'

&& qualData[sizeAlready - 2] !=

' '

) {

319  if

(qualData.ends_with(

"(EC"

) &&

'0'

<= line[0] && line[0] <=

'9'

) {

324  if

(qualData[sizeAlready - 1] ==

','

&& line[0] ==

'('

) {

330  auto

lastSeenSize = lastDataChunkSeen.size();

331  auto

recentBlank = lastDataChunkSeen.find(

' '

);

333  if

(recentBlank != string::npos) {

336  auto

pendingBlank = line.find(

' '

);

338  if

(pendingBlank > 2) {

340

}

else if

(pendingBlank == 1) {

341  auto

singleCharAllowed =

string

(

"+-"

).find(line[0]);

342  if

(singleCharAllowed != string::npos) {

367  const string

& qualKey)

370  if

(qualKey ==

"geo_loc_name"

) {

373  auto type

= objects::CSeqFeatData::GetQualifierType(qualKey);

374  return

(

type

!= objects::CSeqFeatData::eQual_bad);

380  const string

& qualVal)

383  int

countEscapedQuotes(0);

384  auto

nextEscapedQuote = qualVal.find(

"\"\""

);

385  while

(nextEscapedQuote != string::npos) {

386

++countEscapedQuotes;

387

nextEscapedQuote = qualVal.find(

"\"\""

, nextEscapedQuote + 2);

389  int

countAnyQuotes(0);

390  auto

nextAnyQuote = qualVal.find(

"\""

);

391  while

(nextAnyQuote != string::npos) {

393

nextAnyQuote = qualVal.find(

"\""

, nextAnyQuote + 1);

395  return

(0 == countEscapedQuotes % 4 &&

396

countAnyQuotes == 2 * countEscapedQuotes);

static void NoTextAfterEqualSign(const string &featKey, const string &featLocation, const string &qualKey)

static void UnbalancedQuotes(const string &qualKey)

static void UnexpectedData(const string &featKey, const string &featLocation)

static void UnknownQualifierKey(const string &featKey, const string &featLocation, const string &qualKey)

EFormat

The formats are checked in the same order as declared here.

bool CleanAndValidate(string &qualKey, string &qualVal)

void xQualValAppendLine(const string &qualKey, const string &line, string &qualData)

DATA::const_iterator mCurrent

static bool sIsLegalQual(const string &qualKey)

CQualParser(Parser::EFormat fmt, const string &featKey, const string &featLocation, const vector< string > &qualLines)

CQualCleanup mCleanerUpper

bool xParseQualifierCont(const string &qualKey, string &qualVal, bool &thereIsMore)

string mLastDataChunkForKey

virtual bool GetNextQualifier(string &qualKey, string &qualVal)

bool xParseQualifierTail(const string &qualKey, string &qualVal, bool &thereIsMore)

static bool sHasBalancedQuotes(const string &qualVal)

bool xParseQualifierHead(string &qualKey, string &qualVal, bool &thereIsMore)

bool xParseQualifierStart(bool silent, string &qualKey, string &qualVal, bool &thereIsMore)

const string & mFeatLocation

const string::size_type mMaxChunkSize

string mLastKeyForDataChunk

bool xValidateSyntax(const string &qualKey, const string &qualVal)

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

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

Truncate whitespace in a string (in-place)

static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.


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