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

NCBI C++ ToolKit: CUsageReportJob Class Reference

Search Toolkit Book for CUsageReportJob

CUsageReportJob:: More...

#include <connect/ncbi_usage_report.hpp>

enum   EState {
  eCreated , eQueued , eRunning , eCompleted ,
  eFailed , eCanceled , eRejected
}   Job state. More...
  enum   EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }   Control filling of newly allocated memory. More...
  typedef CObjectCounterLocker  TLockerType   Default locker type for CRef. More...
  typedef atomic< Uint8TCounter   Counter type is CAtomiCounter. More...
  typedef Uint8  TCount   Alias for value type of counter. More...
  enum   EJobState {
  eInvalid , eRunning , eCompleted , eFailed ,
  eCanceled , eSuspended
}   Job states (describe FSM) More...
    CUsageReportJob (void)   Default constructor. More...
  virtual  ~CUsageReportJob (void)   Destructor. More...
  EState  GetState ()   Return current job state. More...
  virtual void  OnStateChange (EState)   Callback for async reporting. More...
    CUsageReportJob (const CUsageReportJob &other)   Copy constructor. More...
  CUsageReportJoboperator= (const CUsageReportJob &other)   Copy assignment operator. More...
    CUsageReportJob (const CReportParams &params)   virtual EJobState  Run ()   Function that does all the useful work, called by the Engine. More...
  virtual CConstIRef< IAppJobProgressGetProgress ()   return progress object, the function shall be synchronized internally. More...
  virtual CRef< CObjectGetResult ()   Returns the Job Result. More...
  virtual CConstIRef< IAppJobErrorGetError ()   Returns IAppJobError object describing internal error that caused the Job to fail. More...
  virtual string  GetDescr () const   Returns a human readable description of the Job (optional) More...
  virtual void  RequestCancel ()   RequestCancel() is called to notify the Job that it shall exit Run() function ASAP. More...
  virtual bool  IsCanceled () const     CUsageReportParameters (void)   CUsageReportParametersAdd (const string &name, const string &value)   Add argument Name must contain only alphanumeric chars or '_'. More...
  CUsageReportParametersAdd (const string &name, const char *value)   template<typename TValue > CUsageReportParametersAdd (const string &name, TValue value)   string  ToString () const   Convert parameters to string. URL-encode all values. More...
    CUsageReportParameters (const CUsageReportParameters &other)   Copy constructor. More...
  CUsageReportParametersoperator= (const CUsageReportParameters &other)   Copy assignment operator. More...
    CObject (void)   Constructor. More...
    CObject (const CObject &src)   Copy constructor. More...
  virtual  ~CObject (void)   Destructor. More...
  CObjectoperator= (const CObject &src) THROWS_NONE   Assignment operator. More...
  bool  CanBeDeleted (void) const THROWS_NONE   Check if object can be deleted. More...
  bool  IsAllocatedInPool (void) const THROWS_NONE   Check if object is allocated in memory pool (not system heap) More...
  bool  Referenced (void) const THROWS_NONE   Check if object is referenced. More...
  bool  ReferencedOnlyOnce (void) const THROWS_NONE   Check if object is referenced only once. More...
  void  AddReference (void) const   Add reference to object. More...
  void  RemoveReference (void) const   Remove reference to object. More...
  void  ReleaseReference (void) const   Remove reference without deleting object. More...
  virtual void  DoNotDeleteThisObject (void)   Mark this object as not allocated in heap – do not delete this object. More...
  virtual void  DoDeleteThisObject (void)   Mark this object as allocated in heap – object can be deleted. More...
  void *  operator new (size_t size)   Define new operator for memory allocation. More...
  void *  operator new[] (size_t size)   Define new[] operator for 'array' memory allocation. More...
  void  operator delete (void *ptr)   Define delete operator for memory deallocation. More...
  void  operator delete[] (void *ptr)   Define delete[] operator for memory deallocation. More...
  void *  operator new (size_t size, void *place)   Define new operator. More...
  void  operator delete (void *ptr, void *place)   Define delete operator. More...
  void *  operator new (size_t size, CObjectMemoryPool *place)   Define new operator using memory pool. More...
  void  operator delete (void *ptr, CObjectMemoryPool *place)   Define delete operator. More...
  virtual void  DebugDump (CDebugDumpContext ddc, unsigned int depth) const   Define method for dumping debug information. More...
    CDebugDumpable (void)   virtual  ~CDebugDumpable (void)   void  DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const   void  DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const   void  DumpToConsole (void) const   virtual  ~IAppJob ()   virtual bool  BeforeRun ()   Function will be called on the main thread before execution of Run Should not do any lengthy work returns true to continue job execution on worker thread false to quit execution with status - failed. More...
 

CUsageReportJob::

Job to log usage information to applog through stat.

Extended version of CUsageReportParameters. Can be used the same way in regards of adding parameters, but also allow to be overloaded to control reporting status for asynchronous calls.

This is a base class, that DO NOTHING on failed or rejected reports. If you want some additional functionality you need to derive yours own class from it and override the OnStateChange() method and. For derived class you can also need to define a copy constructor. But in the case of primitive members only default copy constructor should works.

Note
This class is not MT safe by default, concurrent access to the same object may cause data races.
See also
CUsageReportParameters, CUsageReport

Definition at line 374 of file ncbi_usage_report.hpp.

◆ CUsageReportJob() ◆ GetDescr() virtual string CUsageReportJob::GetDescr ( ) const inlinevirtual ◆ GetError()

Returns IAppJobError object describing internal error that caused the Job to fail.

Result shall be returned only if the Job did fail.

Implements IAppJob.

Definition at line 82 of file usage_report_job.hpp.

◆ GetProgress()

return progress object, the function shall be synchronized internally.

the returned object should not be modified by the job (job shall create a new instance of Progress object on every GetProgress() invocation).

Implements IAppJob.

Definition at line 80 of file usage_report_job.hpp.

◆ GetResult()

Returns the Job Result.

Derive your own object from CObject and return it from your Job class. Result shall be returned only if Job finished succesfully.

Implements IAppJob.

Definition at line 81 of file usage_report_job.hpp.

◆ IsCanceled() virtual bool CUsageReportJob::IsCanceled ( ) const inlinevirtual ◆ IsEnabled() bool CUsageReportJob::IsEnabled ( void  ) static ◆ LoadSettings() void CUsageReportJob::LoadSettings ( ) static ◆ ReportUsage() ◆ RequestCancel() virtual void CUsageReportJob::RequestCancel ( ) inlinevirtual ◆ Run() ◆ SaveSettings() void CUsageReportJob::SaveSettings ( ) static ◆ SetEnabled() void CUsageReportJob::SetEnabled ( bool  enable = true ) static ◆ x_GetGbenchVersion() string CUsageReportJob::x_GetGbenchVersion ( ) staticprivate ◆ x_GetOS() string CUsageReportJob::x_GetOS ( ) staticprivate ◆ m_Canceled bool CUsageReportJob::m_Canceled private ◆ m_FailedAttempts volatile unsigned CUsageReportJob::m_FailedAttempts = 0 staticprivate ◆ m_IsEnabled bool CUsageReportJob::m_IsEnabled = true staticprivate ◆ m_URL ◆ m_VersionStringMutex std::mutex CUsageReportJob::m_VersionStringMutex staticprivate

The documentation for this class was generated from the following files:


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