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

STL-related And Other Template Utilities

enum   CConnTest::EStage {
  CConnTest::eNone , CConnTest::eDns , CConnTest::eHttp , CConnTest::eDispatcher ,
  CConnTest::eStatelessService , CConnTest::eFirewallConnPoints , CConnTest::eFirewallConnections , CConnTest::eStatefulService
}   Note that each stage has a previous one as a prerequisite, with the only exception for the stateful service (last check) that may work when forced into the stateless mode even if the firewall connections (in preceding check) have been found non-operational... More...
  enum   CSignal::ESignal {
  CSignal::eSignal_HUP = (1<<1) , CSignal::eSignal_INT = (1<<2) , CSignal::eSignal_QUIT = (1<<3) , CSignal::eSignal_ILL = (1<<4) ,
  CSignal::eSignal_FPE = (1<<5) , CSignal::eSignal_ABRT = (1<<6) , CSignal::eSignal_SEGV = (1<<7) , CSignal::eSignal_PIPE = (1<<8) ,
  CSignal::eSignal_TERM = (1<<9) , CSignal::eSignal_USR1 = (1<<10) , CSignal::eSignal_USR2 = (1<<11) , CSignal::eSignal_Any = 0xfffffff
}   enum   CRequestRateControlException::EErrCode { CRequestRateControlException::eNumRequestsMax , CRequestRateControlException::eNumRequestsPerPeriod , CRequestRateControlException::eMinTimeBetweenRequests }   Error types that CRequestRateControl can generate. More...
  enum   CRequestRateControl::EThrottleAction { CRequestRateControl::eSleep , CRequestRateControl::eErrCode , CRequestRateControl::eException , CRequestRateControl::eDefault }   What to do if exceeded the rate limits. More...
  enum   CRequestRateControl::EThrottleMode { CRequestRateControl::eContinuous , CRequestRateControl::eDiscrete }   Throttle mode. More...
    CConnTest::CConnTest (const STimeout *timeout=kDefaultTimeout, CNcbiOstream *output=0, SIZE_TYPE width=72)   Create test suite. More...
  void  CConnTest::SetWidth (SIZE_TYPE width=72)   void  CConnTest::SetOutput (CNcbiOstream *output=0)   void  CConnTest::SetTimeout (const STimeout *timeout=kDefaultTimeout)   void  CConnTest::SetDebugPrintout (EDebugPrintout debug_printout)   void  CConnTest::SetEmail (const string &email)   void  CConnTest::SetCanceledCallback (const ICanceled *canceled)   virtual  CConnTest::~CConnTest ()   virtual EIO_Status  CConnTest::Execute (EStage &stage, string *reason=0)   Execute the test suite from the very first (eHttp) up to and including the requested "stage". More...
  bool  CConnTest::CFWConnPoint::operator< (const CFWConnPoint &p) const   virtual EIO_Status  CConnTest::DnsOkay (string *reason)   User-redefinable checks for each stage. More...
  virtual EIO_Status  CConnTest::HttpOkay (string *reason)   virtual EIO_Status  CConnTest::DispatcherOkay (string *reason)   virtual EIO_Status  CConnTest::ServiceOkay (string *reason)   virtual EIO_Status  CConnTest::GetFWConnections (string *reason)   virtual EIO_Status  CConnTest::CheckFWConnections (string *reason)   virtual EIO_Status  CConnTest::StatefulOkay (string *reason)   virtual EIO_Status  CConnTest::ExtraCheckOnFailure (void)   Last resort check. More...
  virtual void  CConnTest::PreCheck (EStage stage, unsigned int step, const string &title)   User-defined rendering callbacks: PreCheck() and PostCheck(). More...
  virtual void  CConnTest::PostCheck (EStage stage, unsigned int step, EIO_Status status, const string &reason)   PostCheck gets called upon successful ("status" contains eIO_Success) or unsuccessful (otherwise) completion of any step, with "reason" having an explanation in either case. More...
  virtual EIO_Status  CConnTest::ConnStatus (bool failure, CConn_IOStream *io)   Helper function that assures to return eIO_Success if the predicate "failure" is false; and other code otherwise: either taken from the underlying CONN object, or eIO_Unknown as a fallback. More...
  const stringCConnTest::GetCheckPoint (void) const   Extended info of the last step IO. More...
  EIO_Status  CConnTest::x_CheckTrap (string *reason)   Pretect from runaway stage argument. More...
  string  CConnTest::x_TimeoutMsg (void)   Return verbal timeout suggestion. More...
  EIO_Status  CConnTest::x_GetFirewallConfiguration (const SConnNetInfo *net_info, bool fwbports)   Obtain and populate FWD connection points from NCBI. More...
  static bool  CConnTest::IsNcbiInhouseClient (void) THROWS_NONE   Return TRUE if the client is inside NCBI, FALSE otherwise. More...
    CMask::CMask (void)   Constructor. More...
  virtual  CMask::~CMask (void)   Destructor. More...
  void  CMask::Add (const string &mask)   Add an inclusion mask. More...
  void  CMask::AddExclusion (const string &mask)   Add an exclusion mask. More...
  void  CMask::Remove (const string &mask)   Remove an inclusion mask. More...
  void  CMask::RemoveExclusion (const string &mask)   Remove an exclusion mask. More...
  virtual bool  CMask::Match (CTempString str, NStr::ECase use_case=NStr::eCase) const =0   Match a string. More...
  bool  CMaskFileName::Match (CTempString str, NStr::ECase use_case=NStr::eCase) const   Match a string. More...
  static void  CSignal::TrapSignals (TSignalMask signals)   Sets interrupt signal handling. More...
  static TSignalMask  CSignal::Reset (void)   Reset the list of handled signal. More...
  static bool  CSignal::IsSignaled (TSignalMask signals=eSignal_Any)   Check that any of specified signals is received. More...
  static TSignalMask  CSignal::GetSignals (void)   Get signals state. More...
  static TSignalMask  CSignal::ClearSignals (TSignalMask signals=eSignal_Any)   Clear signals state. More...
  static bool  CSignal::Raise (ESignal signal)   Sends a signal to the current process. More...
  bool  p_equal_to< T >::operator() (const T *x, const T *y) const   bool  PPtrLess< T >::operator() (const T &x, const T &y) const   bool  pair_equal_to< Pair >::operator() (const Pair &x, const typename Pair::second_type &y) const   template<class X > X *  NotNull (X *object)   Check for not null value (after C malloc, strdup etc.). More...
  template<class Key , class Element > Element  GetMapElement (const map< Key, Element > &m, const Key &key, const Element &def=0)   Get map element (pointer) or NULL if absent. More...
  template<class Key , class Element > void  SetMapElement (map< Key, Element * > &m, const Key &key, Element *data)   Set map element – if data is null, erase the existing key. More...
  template<class Key , class Element > bool  InsertMapElement (map< Key, Element * > &m, const Key &key, Element *data)   Insert map element. More...
  template<class Key > string  GetMapString (const map< Key, string > &m, const Key &key)   Get string map element or "" if absent. More...
  template<class Key > void  SetMapString (map< Key, string > &m, const Key &key, const string &data)   Set string map element – if data is null erase the existing key. More...
  template<class Cnt > void  DeleteElements (Cnt &cnt)   Delete all elements from a container of pointers (list, vector, set, multiset); clear the container afterwards. More...
  template<class Key , class Element > void  DeleteElements (map< Key, Element * > &m)   Delete all elements from map containing pointers; clear container afterwards. More...
  template<class Key , class Element > void  DeleteElements (multimap< Key, Element * > &m)   Delete all elements from multimap containing pointers; clear container afterwards. More...
  template<class Result , class Source , class ToKey > Result &  AutoMap (unique_ptr< Result > &cache, const Source &source, const ToKey &toKey)   Retrieve the result from the result cache - if cache is empty, insert into cache from the supplied source. More...
  const stringCNameGetter< Value >::GetKey (const Value *value) const     CBestChoiceTracker< T, F >::CBestChoiceTracker (F func)   Constructor. More...
  void  CBestChoiceTracker< T, F >::operator() (const T &x)   Define application operator. More...
  const TCBestChoiceTracker< T, F >::GetBestChoice ()   Get best choice with lowest score. More...
  template<typename C , typename F > C::value_type  FindBestChoice (const C &container, F score_func)   Find the best choice (lowest score) for values in a container. More...
  template<class Iterator > BEGIN_STD_SCOPE bool  is_sorted (Iterator iter1, Iterator iter2)   is_sorted is provided by some implementations of the STL and may be included in future releases of all standard-conforming implementations This is provided here for future compatibility More...
  template<class Iterator , class Predicate > bool  is_sorted (Iterator iter1, Iterator iter2, Predicate pred)   virtual const char *  CRequestRateControlException::GetErrCodeString (void) const override   Translate from the error code value to its string representation. More...
    CRequestRateControlException::NCBI_EXCEPTION_DEFAULT (CRequestRateControlException, CCoreException)     CRequestRateControl::CRequestRateControl (unsigned int num_requests_allowed, CTimeSpan per_period=CTimeSpan(1, 0), CTimeSpan min_time_between_requests=CTimeSpan(0, 0), EThrottleAction throttle_action=eDefault, EThrottleMode throttle_mode=eContinuous)   Constructor. More...
  void  CRequestRateControl::Reset (unsigned int num_requests_allowed, CTimeSpan per_period=CTimeSpan(1, 0), CTimeSpan min_time_between_requests=CTimeSpan(0, 0), EThrottleAction throttle_action=eDefault, EThrottleMode throttle_mode=eContinuous)   Set new restriction for throttling mechanism. More...
  bool  CRequestRateControl::Approve (EThrottleAction action=eDefault)   Approve a request. More...
  CTimeSpan  CRequestRateControl::ApproveTime (void)   Get a time span in which request can be approved. More...
  static void  CRequestRateControl::Sleep (CTimeSpan sleep_time)   Sleep for CTimeSpan. More...
  void  CRequestRateControl::Lock ()   Lock/unlock functions for use by generic RAII guard CGuard. More...
  void  CRequestRateControl::Unlock ()   bool  CRequestRateControl::IsEnabled (void) const   Check if throttling is enabled. More...
  bool  CRequestRateControl::x_Approve (EThrottleAction action, CTimeSpan *sleeptime)   void  CRequestRateControl::x_CleanTimeLine (TTime now)   Remove from the list of approved requests all expared items. More...
  bool  CMaskRegexp::Match (CTempString str, NStr::ECase use_case=NStr::eCase) const   Match string. More...
  ◆ TSignalMask ◆ TTime ◆ TTimeLine ◆ EErrCode

Error types that CRequestRateControl can generate.

Enumerator eNumRequestsMax 

Maximum number of requests exceeded;.

eNumRequestsPerPeriod 

Number of requests per period exceeded;.

eMinTimeBetweenRequests 

The time between two consecutive requests is too short;.

Definition at line 61 of file request_control.hpp.

◆ ESignal Enumerator eSignal_HUP 

Hangup.

eSignal_INT 

Interrupt.

eSignal_QUIT 

Quit.

eSignal_ILL 

Illegal instruction.

eSignal_FPE 

Floating-point exception.

eSignal_ABRT 

Abort.

eSignal_SEGV 

Segmentation violation.

eSignal_PIPE 

Broken pipe.

eSignal_TERM 

Termination.

eSignal_USR1 

User defined signal 1.

eSignal_USR2 

User defined signal 2.

eSignal_Any 

Any/all signal(s) from the list above.

Definition at line 69 of file ncbi_signal.hpp.

◆ EStage

Note that each stage has a previous one as a prerequisite, with the only exception for the stateful service (last check) that may work when forced into the stateless mode even if the firewall connections (in preceding check) have been found non-operational...

Enumerator eNone 

Zero placeholder.

eDns 

Check host names.

eHttp 

Check whether HTTP works.

eDispatcher 

Check whether NCBI dispatcher works.

eStatelessService 

Check whether simplest NCBI service works.

eFirewallConnPoints 

Obtain all FW ports for stateful services.

eFirewallConnections 

Check all FW ports, falling back if needed.

eStatefulService 

Check whether NCBI stateful service works.

Definition at line 57 of file ncbi_conn_test.hpp.

◆ EThrottleAction

What to do if exceeded the rate limits.

Enumerator eSleep 

Sleep till the rate requirements are met & return.

eErrCode 

Return immediately with err code == FALSE.

eException 

Throw an exception.

eDefault 

in c-tor – eSleep; in Approve() – value set in c-tor

Definition at line 93 of file request_control.hpp.

◆ EThrottleMode

Throttle mode.

In case if number of requests and time period are specified, it is possible to select between two modes for request throttler. First mode is eContinuous. It use internal time line to check number of requests in the past period of time, using current time as ending point for that period. Starting point determinates with ordinary subtraction of "per_period" time, specified in object's constructor, from current time. So the controlled time frame moves continuously in time. Contrary to continuos mode, eDiscrete mode have fixed starting point for period of time, where throttler checks number of incoming requests. First time period starts when CRequestRateControl object creates. Each next period starts with interval of "per_period", or from first approved request in case of long period of inactivity. When each new period starts, the throttler drops all restrictions, and starts to count number of allowed requests per period from zero. Usually eDiscrete mode is a little bit faster and less memory consuming.

Enumerator eContinuous 

Uses float time frame to check number of requests.

eDiscrete 

Uses fixed time frame to check number of requests.

Definition at line 118 of file request_control.hpp.

◆ Add() ◆ AddExclusion() ◆ Approve() ◆ ApproveTime() CTimeSpan CRequestRateControl::ApproveTime ( void  ) inline

Get a time span in which request can be approved.

You should call this method until it returns zero time span, otherwise you should sleep (using Sleep() method) for indicated time.

Returns
Returns time to wait until actual request, zero if can proceed immediately. If you use this method with absolute limitation (no time period and no minimum between requests) and the limitation is exhausted it will throw an exception.
See also
Reset, Approve

Definition at line 245 of file request_control.hpp.

References CRequestRateControl::eSleep, and CRequestRateControl::x_Approve().

◆ AutoMap()

template<class Result , class Source , class ToKey >

Result& AutoMap ( unique_ptr< Result > &  cache, const Source &  source, const ToKey &  toKey  ) inline

Retrieve the result from the result cache - if cache is empty, insert into cache from the supplied source.

Definition at line 183 of file ncbiutil.hpp.

References i, and rapidjson::source.

◆ CBestChoiceTracker()

template<typename T , typename F >

◆ CConnTest()

Create test suite.

Parameters
timeout non-NULL pointer to a finite timeout, or kInfiniteTimeout (NULL); or kDefaultTimeout (which is DEF_CONN_TIMEOUT seconds). out test results get posted to the stream pointed to by this parameter; no output is produced if "out" is NULL. width page width for output (in characters)
See also
DEF_CONN_TIMEOUT

Definition at line 84 of file ncbi_conn_test.cpp.

References CConnTest::SetTimeout().

◆ CheckFWConnections()

Definition at line 1016 of file ncbi_conn_test.cpp.

References _ASSERT, conn, CONN_FWD_URL, CONN_Read(), CONN_SetTimeout(), CONN_Wait(), ConnNetInfo_Create(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, CConnTest::eFirewallConnections, eFWMode_Adaptive, eFWMode_Fallback, eIO_Close, eIO_Interrupt, eIO_InvalidArg, eIO_NotSupported, eIO_Read, eIO_ReadPlain, eIO_Success, eIO_Timeout, eIO_Unknown, ctll::empty(), first(), fProxy_Http, fSOCK_LogDefault, AutoPtr< X, Del >::get(), CConn_IOStream::GetCONN(), CConn_IOStream::GetSocket(), CSocketAPI::HostPortToString(), if(), ITERATE, kCanceled, kEmptyStr, kFWSign, CConnTest::m_Canceled, CConnTest::m_CheckPoint, CConnTest::m_DebugPrintout, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_FwdFB, CConnTest::m_HttpProxy, CConnTest::m_Stateless, CConnTest::m_Timeout, n, NON_CONST_ITERATE, CConstRef< C, Locker >::NotNull(), CSocketAPI::ntoa(), poll, CSocketAPI::Poll(), CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_FIREWALL, REG_CONN_HTTP_PROXY_LEAK, REG_CONN_STATELESS, AutoPtr< X, Del >::reset(), SERV_AddFirewallPort(), SERV_InitFirewallPorts(), SERV_PrintFirewallPorts(), CConn_IOStream::SetCanceledCallback(), CConn_IOStream::SetTimeout(), st(), CConn_IOStream::Status(), CConnTest::CFWConnPoint::status, util::strcmp(), string, NStr::strncasecmp(), NStr::UIntToString(), and CConnTest::x_TimeoutMsg().

Referenced by CConnTest::Execute().

◆ ClearSignals() ◆ CMask() ◆ ConnStatus()

Helper function that assures to return eIO_Success if the predicate "failure" is false; and other code otherwise: either taken from the underlying CONN object, or eIO_Unknown as a fallback.

Also, it sets the m_CheckPoint member to contain the connection description if available (retrievable with GetCheckPoint()).

Definition at line 158 of file ncbi_conn_test.cpp.

References eIO_Open, eIO_Read, eIO_Success, eIO_Unknown, eIO_Write, failure, CConn_IOStream::GetCONN(), CConn_IOStream::GetDescription(), CConn_IOStream::GetType(), kEmptyStr, CConnTest::m_CheckPoint, CConn_IOStream::Status(), and text().

Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_GetFirewallConfiguration().

◆ CRequestRateControl() ◆ DeleteElements() [1/3]

template<class Cnt >

void DeleteElements ( Cnt &  cnt ) inline ◆ DeleteElements() [2/3]

template<class Key , class Element >

◆ DeleteElements() [3/3]

template<class Key , class Element >

◆ DispatcherOkay()

Definition at line 592 of file ncbi_conn_test.cpp.

References buf, ConnNetInfo_Create(), ConnNetInfo_SetupStandardArgs(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, CConnTest::eDispatcher, eIO_Interrupt, eIO_NotSupported, eIO_Success, eIO_Timeout, eURL_Https, NStr::FindNoCase(), AutoPtr< X, Del >::get(), HELP_EMAIL, kCanceled, kEmptyStr, kTestService, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_Timeout, NPOS, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_HOST, REG_CONN_PATH, REG_CONN_PORT, s_Adjust(), s_Cleanup(), s_SvcHeader(), CConn_IOStream::SetCanceledCallback(), str(), and CConnTest::x_TimeoutMsg().

Referenced by CConnTest::Execute().

◆ DnsOkay()

User-redefinable checks for each stage.

Every check must include at least one call of PreCheck() followed by PostCheck() with parameter "step" set to 0 (meaning the "main" check); and as many as necessary optional substeps (nested or going back to back) enumerated with "step". A check returning eIO_Success means that its main check with all substeps have successfully passed. Otherwise, it is a failing check that can return an explanation via the "reason" pointer (if non-NULL) or at least clear the string.

Definition at line 383 of file ncbi_conn_test.cpp.

References ConnNetInfo_Create(), CConnTest::eDns, eIO_Success, eIO_Unknown, eOn, CSocketAPI::gethostbyname(), CConnTest::m_DebugPrintout, NCBI_WWW, CConnTest::PostCheck(), CConnTest::PreCheck(), result, and string.

Referenced by CConnTest::Execute().

◆ Execute()

Execute the test suite from the very first (eHttp) up to and including the requested "stage".

It is expected that the call advances to the next check only if the previous one was successful (or conditionally successful, meaning even though it may have formally failed, it still returned eIO_Success and created favorable preconditions for the following check to likely succeed).

Parameters
stage the last stage requested or performed, when the call returns reason a pointer to a string to get a failure explanation
Returns
eIO_Success if all requested tests completed successfully; other code if not, and then also return an explanatory message at "*reason" (if "reason" passed non-NULL).

NOTE that "*reason" may contain non-empty string when the call completes successfully. Always check return code, instead of making any assumption on the contents of "*reason".

Note
Running the test for a firewall mode client will globally modify the behavior of service-related stateful data retrievals. That is, when the test is complete, only the safest route found operational will be used to connect to NCBI for the life of the program. Re-running the test may reset these results and, thus, is highly unrecommended!

Definition at line 103 of file ncbi_conn_test.cpp.

References check, CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::DnsOkay(), CConnTest::eHttp, eIO_Interrupt, eIO_InvalidArg, eIO_Success, CConnTest::eNone, CConnTest::ExtraCheckOnFailure(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::m_CheckPoint, CConnTest::m_End, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_HttpProxy, CConnTest::m_Stateless, NULL, CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_CheckTrap().

Referenced by CConnTestThread::Main().

◆ ExtraCheckOnFailure() EIO_Status CConnTest::ExtraCheckOnFailure ( void  ) protectedvirtual

Last resort check.

Definition at line 281 of file ncbi_conn_test.cpp.

References _ASSERT, conn, CONN_Wait(), ConnNetInfo_Create(), eDebugPrintout_Data, eIO_Interrupt, eIO_Read, eIO_Success, eIO_Timeout, eIO_Unknown, CConnTest::eNone, ERASE_ITERATE, eReqMethod_Head, eURL_Http, eURL_Https, AutoPtr< X, Del >::get(), CDeadline::GetExpirationTime(), CDeadline::IsExpired(), kEmptyStr, kMicroSecondsPerSecond, kNanoSecondsPerSecond, kTimeout, CConnTest::m_Canceled, CConnTest::m_CheckPoint, CConnTest::m_Timeout, n, NCBI_WWW, NCBI_WWW_BEMD, CConnTest::PostCheck(), CConnTest::PreCheck(), AutoPtr< X, Del >::reset(), s_Adjust(), s_AnyHeader(), s_Cleanup(), STimeoutTag::sec, STimeoutTag::usec, and VECTOR_ERASE.

Referenced by CConnTest::Execute().

◆ FindBestChoice()

template<typename C , typename F >

C::value_type FindBestChoice ( const Ccontainer, F  score_func  ) inline

Find the best choice (lowest score) for values in a container.

Container and scoring functions are specified as template parameters.

Definition at line 250 of file ncbiutil.hpp.

References C, ITERATE, and T.

Referenced by CFeatGapInfo::AdjustForRelevantGapIntervals(), CSourceModParser::ApplyAllMods(), BOOST_AUTO_TEST_CASE(), CAutoDefFakePromoterClause::CAutoDefFakePromoterClause(), CAutoDefPromoterAnd5UTRClause::CAutoDefPromoterAnd5UTRClause(), ChangeSeqId(), COligoSpecificityTemplate::COligoSpecificityTemplate(), Convert_Bioseq_Seq_id(), Convert_Seq_entry_Seq_id(), Convert_Seq_entry_Seq_loc(), Convert_SeqSubmit_Seq_id(), CBlastDBExtractor::ExtractAccession(), CBlastDBExtractor::ExtractFasta(), CBlastDBExtractor::ExtractLinksInteger(), CBlastDBExtractor::ExtractMembershipInteger(), CBlastDBExtractor::ExtractSeqId(), CGBSeqFormatter::FormatFeature(), CHTMLFormatterEx::FormatLocation(), CSeqFastaReader::GenerateID(), CAlnReader::GenerateID(), CTextAlnReader::GenerateID(), GetBestBioseqLabel(), CShowBlastDefline::GetBioseqHandleDeflineAndId(), CBioseq::GetLabel(), CAlignFormatUtil::GetLinkoutUrl(), CBioseq::GetLocalId(), CBioseq::GetNonLocalId(), CSequenceUpdater::GetRevCompReport(), CShowBlastDefline::GetSeqIdListString(), CAlignFormatUtil::GetSeqLinkoutInfo(), GetSequenceLengthAndId(), CSeq_id::GetStringDescr(), CVDBBlastUtil::GetVDBSeqIdFromOID(), CFastaReader::ParseDefLine(), CFastaReader::PostProcessIDs(), CSeqFastaReader::PostProcessIDs(), CGlimmerReader::Read(), CFastaIdsResolver::ResolveSeqId(), CSplignApp::Run(), s_AddOtherRelatedInfoLinks(), s_ConfigureDeflineTitle(), s_ConvertBioseqs2TSeqLocVector(), s_ConvertSubjects2TSeqLocVector(), s_DeflineCompare(), s_ExtractQueryIdsFromBioseqSet(), s_FindBestChoiceForDbsource(), s_FixBioseqDeltas(), s_GetBestIDForURL(), s_GetDeflineIdString(), s_GetFullLinkoutUrl(), s_GetIdLabel(), s_GetSeqIdListString(), s_LimitDeflines(), s_ModifySeqAlnWithFilteredSeqIDs(), s_SeqAlignToXMLHit(), s_SetCloneInfo(), s_UseFastaReaderDeflines(), SeqDB_SimplifyAccession(), CIgBlastTabularInfo::SetAirrFormatData(), CSearch< LEGACY, NHITS >::SetResult(), CAliToSeq_align::StringToSeq_id(), CBlastDB_FastaFormatter::Write(), CSeq_id::WriteAsFasta(), CId1FetchApp::WriteQualityScores(), CAsn2FlatApp::x_AddSNPAnnots(), CBlastFormat::x_CreateSubjectBioseq(), CDisplaySeqalign::x_DisplaySequenceIDForQueryAnchored(), CImportFeatTable::x_DoImportCDS(), CRemoteBlast::x_ExtractQueryIds(), CBlastFastaInputSource::x_FastaToSeqLoc(), CShowBlastDefline::x_FillDeflineAndId(), CDisplaySeqalign::x_FillSeqid(), CDBSourceItem::x_GatherInfo(), CAlnGraphic::x_GetAlnInfo(), CFastaOstream::x_GetBestId(), CDisplaySeqalign::x_GetDumpgnlLink(), CAutoDef::x_GetFeatureClauses(), x_GetId(), CVecscreenRun::CFormatter::x_GetIdsAndTitlesForSeqAlign(), CFeatModApply::x_GetWholeSeqLoc(), CDisplaySeqalign::x_InitAlignParams(), CBlastKmerResults::x_InitScoreVec(), CCompareWithBiosample::x_LoadData(), CDisplaySeqalign::x_PrepareDynamicFeatureInfo(), CDisplaySeqalign::x_PrintDefLine(), CSequenceUpdater::x_RemoveNewIDInFeature(), COligoSpecificityCheck::x_SavePrimerInfo(), CBlastDBExtractor::x_SetGi2AccMap(), and CBlastDBExtractor::x_SetGi2SeqIdMap().

◆ GetBestChoice()

template<typename T , typename F >

◆ GetCheckPoint() ◆ GetErrCodeString() const char * CRequestRateControlException::GetErrCodeString ( void  ) const overridevirtual ◆ GetFWConnections()

Definition at line 806 of file ncbi_conn_test.cpp.

References _ASSERT, _TROUBLE, CONN_FWD_PORT_MAX, CONN_FWD_PORT_MIN, CONN_FWD_URL, CONN_PORT_HTTPS, CONN_PORT_SSH, ConnNetInfo_Create(), ConnNetInfo_OverrideUserHeader(), ConnNetInfo_SetupStandardArgs(), DEF_CONN_REG_SECTION, CConnTest::eFirewallConnPoints, eFWMode_Adaptive, eFWMode_Fallback, eFWMode_Firewall, eIO_Interrupt, eIO_Success, eIO_Timeout, eIO_Unknown, ctll::empty(), eReqMethod_Post, eURL_Https, fProxy_Http, AutoPtr< X, Del >::get(), HELP_EMAIL, CSocketAPI::HostPortToString(), ITERATE, kCanceled, CConnTest::m_DebugPrintout, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_FwdFB, CConnTest::m_HttpProxy, CConnTest::m_Stateless, CConnTest::m_Timeout, NCBI_AS_STRING, NCBI_FWD_BEMD, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_FIREWALL, SERV_PrintFirewallPorts(), util::strcmp(), NStr::UInt8ToString(), NStr::UIntToString(), CConnTest::x_GetFirewallConfiguration(), x_Large(), and CConnTest::x_TimeoutMsg().

Referenced by CConnTest::Execute().

◆ GetKey() ◆ GetMapElement()

template<class Key , class Element >

◆ GetMapString() ◆ GetSignals() ◆ HttpOkay()

Definition at line 426 of file ncbi_conn_test.cpp.

References _ASSERT, NStr::CompareNocase(), ConnNetInfo_Create(), ConnNetInfo_SetArgs(), ConnNetInfo_SetUserHeader(), CConnTest::ConnStatus(), DEF_CONN_HOST, DEF_CONN_REG_SECTION, CConnTest::eHttp, eIO_Interrupt, eIO_NotSupported, eIO_Success, eIO_Timeout, eIO_Unknown, eURL_Http, fHTTP_AdjustOnRedirect, fProxy_Http, fProxy_Https, AutoPtr< X, Del >::get(), kCanceled, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_HttpProxy, SAuxData::m_Redirect, CConnTest::m_Timeout, n, NCBI_WWW, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_HOST, REG_CONN_HTTP_PROXY_SKIP, REG_CONN_PASS, REG_CONN_PORT, REG_CONN_USER, s_Adjust(), s_Cleanup(), s_GoodHeader(), CConn_IOStream::SetCanceledCallback(), string, NStr::UIntToString(), and CConnTest::x_TimeoutMsg().

Referenced by CConnTest::Execute().

◆ InsertMapElement()

template<class Key , class Element >

◆ is_sorted() [1/2]

template<class Iterator >

◆ is_sorted() [2/2]

template<class Iterator , class Predicate >

bool is_sorted ( Iterator  iter1, Iterator  iter2, Predicate  pred  ) ◆ IsEnabled() bool CRequestRateControl::IsEnabled ( void  ) const inline ◆ IsNcbiInhouseClient() bool CConnTest::IsNcbiInhouseClient ( void  ) static ◆ IsSignaled()

Check that any of specified signals is received.

Parameters
signals The set of signals to check.
Returns
TRUE if any of specified signals is set, FALSE otherwise.
See also
TrapSignals, GetSignals, ClearSignals

Referenced by SBlobInserter::operator()(), SBlobCopier::operator()(), CNgAligner::x_Align_Impl(), CPrimeCacheApplication::x_CacheSeqEntry(), CAsnSubCacheCreateApplication::x_FetchMissingBlobs(), CPrimeCacheApplication::x_Process_Fasta(), CInstancedAligner::x_RunAligner(), and CPrimeCacheApplication::x_SplitAndCacheSeqEntry().

◆ Lock() void CRequestRateControl::Lock ( void  ) inline ◆ Match() [1/3] ◆ Match() [2/3]

Match string.

Parameters
str String to match. use_case Whether to do a case sensitive compare (eCase – default), or a case-insensitive compare (eNocase).
Returns
Return TRUE if string 'str' matches to one of inclusion masks and not matches none of exclusion masks, or match masks are not specified. Otherwise return FALSE.
See also
NStr::MatchesMask, CMask

Implements CMask.

Definition at line 37 of file mask_regexp.cpp.

References NStr::eNocase, CRegexp::fCompile_default, CRegexp::fCompile_ignore_case, CRegexp::IsMatch(), ITERATE, CMask::m_Exclusions, CMask::m_Inclusions, and str().

◆ Match() [3/3] ◆ NCBI_EXCEPTION_DEFAULT() ◆ NotNull()

template<class X >

X* NotNull ( X *  object ) inline ◆ operator()() [1/4] ◆ operator()() [2/4]

template<typename T , typename F >

◆ operator()() [3/4] ◆ operator()() [4/4] ◆ operator<() ◆ PostCheck()

PostCheck gets called upon successful ("status" contains eIO_Success) or unsuccessful (otherwise) completion of any step, with "reason" having an explanation in either case.

Successful completion expected to supply only a single line via the "reason" parameter; while a failing check can supply multiple lines (as an extended detailed explanation) separated with '
'. The default callback does the following: For a succeeding check it prints contents of "reason" and returns; For a failing check, it prints the word "FAILED" followed by textual representation of "status" and the return value of GetCheckPoint() if non-empty. It then prints each line of explanation (taken from "reason") as a numbered list of justified paragraphs. If there is only a single line results, it won't be enumerated. Each PostCheck() is expected to set the m_End member to "true", so that the nested or back-to-back substeps can be distiguished by the order of encounter of the m_End's values.

Definition at line 1509 of file ncbi_conn_test.cpp.

References buf, eIO_Success, NStr::EndsWith(), ERASE_ITERATE, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CConnTest::GetCheckPoint(), IO_StatusStr(), ITERATE, NStr::Justify(), kParIndent, CConnTest::m_End, CConnTest::m_Output, CConnTest::m_Width, n, NcbiEndl, NON_CONST_ITERATE, NStr::Split(), stmt, str(), string, and NStr::TruncateSpacesInPlace().

Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::DnsOkay(), CConnTest::ExtraCheckOnFailure(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_CheckTrap().

◆ PreCheck()

User-defined rendering callbacks: PreCheck() and PostCheck().

Each callback receives a stage enumerator and a step within. At least one step (0) is required and denotes the main check. PreCheck gets called before the step starts, with the "title" containing either: a single-lined step title; or a multi-lined step description: the first line being the actual title, and remaining lines – a verbal explanation. Lines are separated with '
', and normally do not have any ending punctuation (but may be capitalized). The default callback does the following: For the single-lined titles, it outputs the title into the output stream (if provided in ctor), and then puts the ellipsis (...) without an ending newline; For the multi-lined description, the title is printed on the first line, and then each line of the description follows as a justified paragraph. Last paragraph ends with a new line. Each PreCheck() is expected to reset the m_End member to "false".

Definition at line 1470 of file ncbi_conn_test.cpp.

References NStr::EndsWith(), ERASE_ITERATE, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, ITERATE, NStr::Justify(), kEmptyStr, kParIndent, CConnTest::m_End, CConnTest::m_Output, CConnTest::m_Width, NcbiEndl, NcbiFlush, NON_CONST_ITERATE, ncbi::grid::netcache::search::fields::size, NStr::Split(), stmt, str(), and NStr::TruncateSpacesInPlace().

Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::DnsOkay(), CConnTest::ExtraCheckOnFailure(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), CConnTest::StatefulOkay(), and CConnTest::x_CheckTrap().

◆ Raise() ◆ Remove() ◆ RemoveExclusion() ◆ Reset() [1/2]

Set new restriction for throttling mechanism.

Zero values for time spans 'per_period' or 'min_time_between_requests' means no rate restriction for that throttling mechanism, respectively.

Parameters
num_requests_allowed Maximum number of allowed requests per 'per_period'. Can be kNoLimit for unlimited number of requests (throttler is disabled, Approve() always returns TRUE). per_period Time span in which only 'num_requests_allowed' requests can be approved. min_time_between_requests Minimum time between two succesful consecutive requests. throttle_action Set throttle action by default. The eDefault means eSleep here. throttle_mode Set throttle action by default. The eDefault means eSleep here. For backward compatibility, use eContinuous mode by default.
See also
Approve, ApproveTime

Definition at line 59 of file request_control.cpp.

References CRequestRateControl::eDefault, CRequestRateControl::eSleep, CTimeSpan::GetAsDouble(), CRequestRateControl::m_LastApproved, CRequestRateControl::m_MinTimeBetweenRequests, CRequestRateControl::m_Mode, CRequestRateControl::m_NumRequests, CRequestRateControl::m_NumRequestsAllowed, CRequestRateControl::m_PerPeriod, CRequestRateControl::m_StopWatch, CRequestRateControl::m_ThrottleAction, CRequestRateControl::m_TimeLine, and CStopWatch::Restart().

Referenced by CRequestRateControl::CRequestRateControl().

◆ Reset() [2/2]

Reset the list of handled signal.

Default signal handlers will be used for all handled signals (SIG_DFL).

Returns
List of handled signals before reset.
See also
TrapSignals, GetSignals
◆ ServiceOkay()

Definition at line 649 of file ncbi_conn_test.cpp.

References NStr::Compare(), NStr::CompareNocase(), ConnNetInfo_Create(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, eIO_Interrupt, eIO_Success, eIO_Timeout, CConnTest::eStatelessService, free(), fSERV_Stateless, AutoPtr< X, Del >::get(), HELP_EMAIL, kBounceService, kCanceled, kTestService, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_Timeout, NcbiEndl, CConnTest::PostCheck(), CConnTest::PreCheck(), REG_CONN_DISPD_DISABLE, REG_CONN_SERVICE_NAME, SERV_Close(), SERV_GetNextInfo(), SERV_MapperName(), SERV_OpenSimple(), SERV_ServiceName(), CConn_IOStream::SetCanceledCallback(), str(), NStr::ToUpper(), true, x_Large(), and CConnTest::x_TimeoutMsg().

Referenced by CConnTest::Execute().

◆ SetCanceledCallback() ◆ SetDebugPrintout() ◆ SetEmail() ◆ SetMapElement()

template<class Key , class Element >

◆ SetMapString() ◆ SetOutput() ◆ SetTimeout() ◆ SetWidth() void CConnTest::SetWidth ( SIZE_TYPE  width = 72 ) inline ◆ Sleep() void CRequestRateControl::Sleep ( CTimeSpan  sleep_time ) static ◆ StatefulOkay()

Definition at line 1329 of file ncbi_conn_test.cpp.

References NStr::CompareNocase(), ConnNetInfo_Create(), CConnTest::ConnStatus(), DEF_CONN_REG_SECTION, CTime::eCurrent, eFWMode_Fallback, eIO_Interrupt, eIO_Success, eIO_Timeout, CTime::eLocal, CConnTest::eStatefulService, NStr::fConvErr_NoThrow, fProxy_Http, free(), fSERV_Any, AutoPtr< X, Del >::get(), CTime::GetTimeT(), HELP_EMAIL, i, kCanceled, kEchoService, kFWSign, CConnTest::m_Canceled, CConnTest::m_DebugPrintout, CConnTest::m_Fwd, CConnTest::m_HttpProxy, CConnTest::m_Stateless, CConnTest::m_Timeout, n, NStr::NumericToString(), CConnTest::PostCheck(), CConnTest::PreCheck(), CStreamUtils::Readsome(), REG_CONN_SERVICE_NAME, REG_CONN_STATELESS, rnd(), seed, SERV_Close(), SERV_GetNextInfo(), SERV_OpenSimple(), SERV_ServiceName(), CConn_IOStream::SetCanceledCallback(), CTime::SetTimeT(), ncbi::grid::netcache::search::fields::size, str(), NStr::strncasecmp(), NStr::ToUpper(), ud(), NStr::UIntToString(), x_Large(), and CConnTest::x_TimeoutMsg().

Referenced by CConnTest::Execute().

◆ TrapSignals() ◆ Unlock() ◆ x_Approve()

Definition at line 85 of file request_control.cpp.

References _ASSERT, CRequestRateControl::eContinuous, CRequestRateControl::eDefault, CRequestRateControl::eDiscrete, CRequestRateControl::eErrCode, CRequestRateControl::eException, CStopWatch::Elapsed(), CRequestRateControl::eSleep, int, CRequestRateControl::kNoLimit, CRequestRateControl::m_LastApproved, CRequestRateControl::m_MinTimeBetweenRequests, CRequestRateControl::m_Mode, CRequestRateControl::m_NumRequests, CRequestRateControl::m_NumRequestsAllowed, CRequestRateControl::m_PerPeriod, CRequestRateControl::m_StopWatch, CRequestRateControl::m_ThrottleAction, CRequestRateControl::m_TimeLine, NCBI_THROW, CRequestRateControl::Sleep(), st(), and CRequestRateControl::x_CleanTimeLine().

Referenced by CRequestRateControl::Approve(), and CRequestRateControl::ApproveTime().

◆ x_CheckTrap() ◆ x_CleanTimeLine() void CRequestRateControl::x_CleanTimeLine ( TTime  now ) private ◆ x_GetFirewallConfiguration()

Obtain and populate FWD connection points from NCBI.

Definition at line 744 of file ncbi_conn_test.cpp.

References CConnTest::CFWConnPoint::addr, NStr::Compare(), NStr::CompareNocase(), CONN_FWD_PORT_MAX, CONN_FWD_PORT_MIN, ConnNetInfo_GetValueInternal(), CConnTest::ConnStatus(), eFWMode_Fallback, eFWMode_Firewall, eIO_InvalidArg, eIO_NotSupported, eIO_Success, SConnNetInfo::firewall, kEmptyStr, CConnTest::m_Canceled, CConnTest::m_Firewall, CConnTest::m_Fwd, CConnTest::m_FwdFB, CConnTest::m_Timeout, NcbiEndl, CConnTest::CFWConnPoint::port, s_Adjust(), s_Cleanup(), s_GoodHeader(), SERV_IsFirewallPort(), CConn_IOStream::SetCanceledCallback(), NStr::SplitInTwo(), CConnTest::CFWConnPoint::status, and CSocketAPI::StringToHostPort().

Referenced by CConnTest::GetFWConnections().

◆ x_TimeoutMsg() string CConnTest::x_TimeoutMsg ( void  ) private

Return verbal timeout suggestion.

Definition at line 143 of file ncbi_conn_test.cpp.

References kEmptyStr, CConnTest::m_Timeout, n, result, STimeoutTag::sec, and STimeoutTag::usec.

Referenced by CConnTest::CheckFWConnections(), CConnTest::DispatcherOkay(), CConnTest::GetFWConnections(), CConnTest::HttpOkay(), CConnTest::ServiceOkay(), and CConnTest::StatefulOkay().

◆ ~CConnTest() ◆ ~CMask() virtual CMask::~CMask ( void  ) inlinevirtual ◆ addr ◆ kNoLimit ◆ m_Canceled ◆ m_CheckPoint string CConnTest::m_CheckPoint private ◆ m_DebugPrintout ◆ m_Email ◆ m_End ◆ m_Exclusions list<string> CMask::m_Exclusions protected ◆ m_Firewall bool CConnTest::m_Firewall protected ◆ m_Func

template<typename T , typename F >

◆ m_Fwd ◆ m_FwdFB ◆ m_HttpProxy bool CConnTest::m_HttpProxy protected ◆ m_Inclusions list<string> CMask::m_Inclusions protected ◆ m_LastApproved TTime CRequestRateControl::m_LastApproved private ◆ m_MinTimeBetweenRequests TTime CRequestRateControl::m_MinTimeBetweenRequests private ◆ m_Mode ◆ m_NumRequests unsigned int CRequestRateControl::m_NumRequests private ◆ m_NumRequestsAllowed unsigned int CRequestRateControl::m_NumRequestsAllowed private ◆ m_Output ◆ m_PerPeriod TTime CRequestRateControl::m_PerPeriod private ◆ m_Score

template<typename T , typename F >

◆ m_Stateless bool CConnTest::m_Stateless protected ◆ m_StopWatch ◆ m_ThrottleAction ◆ m_TimeLine ◆ m_Timeout ◆ m_Value

template<typename T , typename F >

◆ m_Width ◆ port unsigned short CConnTest::CFWConnPoint::port ◆ status ◆ x_Timeout

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