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

NCBI C++ ToolKit: src/connect/services/netcache_search.cpp Source File

48 using namespace

chrono;

79  size_t Key

()

const

{

return

m_Key; }

81  virtual

ostream&

Output

(ostream&)

const

= 0;

84  template

<ETerm term, EComparison comparison,

typename

TValue>

96 template

<ETerm term, EComparison comparison,

typename

TValue>

105

ostream& Output(ostream& os)

const override

;

115  case eKey

:

return "key"

;

116  case eSubkey

:

return "subkey"

;

117  case eCreated

:

return "fcr_epoch"

;

119  case eExpires

:

return "fexp_epoch"

;

123  case eSize

:

return "fsize"

;

124  default

:

return nullptr

;

130  switch

(comparison) {

134  default

:

return nullptr

;

138 template

<

typename

TValue>

141  return

to_string(

value

);

150 template

<ETerm term, EComparison comparison,

typename

TValue>

156 template

<ETerm term, EComparison comparison,

typename

TValue>

159 template

<ETerm term,

typename

TValue>

162  SMerge

(TValue& left,

const

TValue& right)

164  if

(left > right) left = right;

168 template

<ETerm term,

typename

TValue>

171  SMerge

(TValue& left,

const

TValue& right)

173  if

(left < right) left = right;

183  "Field '"

<<

s_Term

(

eKey

) <<

"' cannot be specified more than once"

);

187 template

<ETerm term, EComparison comparison,

typename

TValue>

190  auto

other =

dynamic_cast<

decltype(this)

>

(o);

196 template

<ETerm term, EComparison comparison,

typename

TValue>

211 template

<ETerm term, EComparison comparison,

typename

TValue>

214  auto

condition = SCondition::Create<term, comparison>(

value

);

218  result

.impl->conditions.emplace_back(condition);

222 template

<ETerm term, EComparison comparison,

typename

TValue>

226  result

.base = s_CreateBase<term, comparison>(

value

);

232  return

duration_cast<chrono::seconds>(d).count();

242  return

s_Create<eKey, eEqual>(v);

247  return

s_Create<eCreated, eGreaterOrEqual>(

s_GetSeconds

(v));

252  return

s_Create<eCreated, eLessThan>(

s_GetSeconds

(v));

257  return

s_Create<eCreatedAgo, eGreaterOrEqual>(

s_GetSeconds

(v));

262  return

s_Create<eCreatedAgo, eLessThan>(

s_GetSeconds

(v));

267  return

s_Create<eExpires, eGreaterOrEqual>(

s_GetSeconds

(v));

272  return

s_Create<eExpires, eLessThan>(

s_GetSeconds

(v));

277  return

s_Create<eExpiresIn, eGreaterOrEqual>(

s_GetSeconds

(v));

282  return

s_Create<eExpiresIn, eLessThan>(

s_GetSeconds

(v));

287  return

s_Create<eVersionExpires, eGreaterOrEqual>(

s_GetSeconds

(v));

292  return

s_Create<eVersionExpires, eLessThan>(

s_GetSeconds

(v));

297  return

s_Create<eVersionExpiresIn, eGreaterOrEqual>(

s_GetSeconds

(v));

302  return

s_Create<eVersionExpiresIn, eLessThan>(

s_GetSeconds

(v));

307  return

s_Create<eSize, eGreaterOrEqual>(v);

312  return

s_Create<eSize, eLessThan>(v);

317  if

(!

l

.impl) {

l

=

r

;

return

; }

318  if

(!

r

.impl)

return

;

320  auto

&

lc

=

l

.impl->conditions;

321  auto

& rc =

r

.impl->conditions;

322  auto

li =

lc

.begin();

323  auto

ri = rc.begin();

325  while

(li !=

lc

.end() && ri != rc.end()) {

329  if

(lp->Key() < rp->Key()) {

331

}

else if

(lp->Key() > rp->Key()) {

333  lc

.splice(li, rc, old_ri, ++ri);

341  if

(ri != rc.end()) {

342  lc

.splice(

lc

.end(), rc, ri, rc.end());

360  if

(!expression.

base

.

impl

)

return

os;

362  for

(

auto

& condition : expression.

base

.

impl

->conditions) {

363

os <<

" "

<< *condition;

480  size_t eq

=

data

.find(

"="

, pos);

482  if

(

eq

== string::npos) {

490  if

(pos == string::npos) pos =

data

.size();

494  return

make_pair(name,

value

);

499  for

(

size_t

pos = 0; pos <

m_Data

.size(); ) {

501  const auto

& name = field.first;

502  const auto

&

value

= field.second;

504  if

(name ==

"cr_time"

) {

506

}

else if

(name ==

"exp"

) {

508

}

else if

(name ==

"ver_dead"

) {

510

}

else if

(name ==

"size"

) {

514  "Unknown field '"

<< name <<

"' in response '"

<<

m_Data

<<

"'"

);

566  if

(!

base

.

impl

)

return

size_t();

NetCache internal exception.

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

The NCBI C++ standard methods for dealing with std::string.

const TValue & GetValue(void) const

Get a const reference to the current value.

#define NCBI_THROW_FMT(exception_class, err_code, message)

The same as NCBI_THROW but with message processed as output to ostream.

CFields operator|(CFields, CFields)

CExpression operator<(CREATED, time_point)

CExpression operator>=(CREATED, time_point)

CExpression operator&&(CExpression, CExpression)

CExpression operator==(KEY, string)

CExpression operator>(time_point, CREATED)

CExpression operator<=(time_point, CREATED)

static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)

Split a string into two pieces using the specified delimiters.

const struct ncbi::grid::netcache::search::fields::SIZE size

const struct ncbi::grid::netcache::search::fields::EXPIRES expires

const struct ncbi::grid::netcache::search::fields::CREATED created

const struct ncbi::grid::netcache::search::fields::KEY key

const struct ncbi::grid::netcache::search::fields::SUBKEY subkey

const struct ncbi::grid::netcache::search::fields::VERSION_EXPIRES version_expires

const size_t kLargestSize

CExpression s_Create(TValue value)

const char * s_Term(ETerm term)

string s_Value(TValue value)

chrono::system_clock::time_point time_point

void s_Merge(SExpression &l, SExpression &r)

pair< CTempString, CTempString > s_GetField(const string &data, size_t &pos)

chrono::system_clock::duration duration

CExpression operator+(CExpression l, CFields r)

SExpression s_CreateBase(TValue value)

chrono::seconds::rep s_GetSeconds(duration d)

const char * s_Comparison(EComparison comparison)

const chrono::seconds::rep kSmallestTimePoint

ostream & operator<<(ostream &os, const SCondition &c)

Magic spell ;-) needed for some weird compilers... very empiric.

const GenericPointer< typename T::ValueType > T2 value

NCBI C++ auxiliary debug macros.

bool eq(T x_, T y_, T round_)

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

string operator[](KEY) const

Output fields specification.

time_point operator[](CREATED)

static SBlobInfoImpl * Create(string data)

CNullable< time_point > m_Expires

CNullable< size_t > m_Size

CNullable< time_point > m_VersionExpires

SBlobInfoImpl(string key, string subkey, string data)

CNullable< time_point > m_Created

shared_ptr< SBlobInfoImpl > impl

ostream & Output(ostream &os) const override

void Merge(SCondition *) override

SConditionImpl(TValue value)

static SCondition * Create(TValue)

virtual void Merge(SCondition *)=0

virtual ostream & Output(ostream &) const =0

list< shared_ptr< SCondition > > conditions

shared_ptr< SExpressionImpl > impl

SMerge(string &, const string &)

SMerge(TValue &left, const TValue &right)

SMerge(TValue &left, const TValue &right)

void Merge(wxMenu &menu_1, const wxMenu &menu_2)

merges all items form menu_2 into menu_1, preserving the structure if possible


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