NCBI C++ ToolKit
snpptis_impl.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef SRA__READER__SRA__IMPL__SNPPTIS__HPP
2 #define SRA__READER__SRA__IMPL__SNPPTIS__HPP
3 /* $Id: snpptis_impl.hpp 91050 2020-08-28 14:14:03Z vasilche $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Eugene Vasilchenko
29  *
30  * File Description:
31  * Access to primary SNP track service
32  *
33  */
34 
35 #include <corelib/ncbistd.hpp>
36 #include <corelib/ncbiobj.hpp>
37 
39 
40 #include <grpc++/grpc++.h>
43 
46 
48 {
49 public:
51  virtual ~CSnpPtisClient_Impl();
52 
53  virtual string GetPrimarySnpTrackForGi(TGi gi);
54  virtual string GetPrimarySnpTrackForAccVer(const string& acc_ver);
55 
56 private:
57 
58  typedef ncbi::grpcapi::dbsnp::primary_track::SeqIdRequestStringAccverUnion TRequest;
59 
60  string x_GetPrimarySnpTrack(const TRequest& request);
61 
63  float timeout;
64  float timeout_mul;
65  float timeout_inc;
66  float timeout_max;
67  float wait_time;
71  shared_ptr<grpc::Channel> channel;
72  unique_ptr<ncbi::grpcapi::dbsnp::primary_track::DbSnpPrimaryTrack::Stub> stub;
73 };
74 
77 
78 #endif // SRA__READER__SRA__IMPL__SNPPTIS__HPP
virtual string GetPrimarySnpTrackForAccVer(const string &acc_ver)
Definition: snpptis.cpp:183
shared_ptr< grpc::Channel > channel
virtual string GetPrimarySnpTrackForGi(TGi gi)
Definition: snpptis.cpp:173
ncbi::grpcapi::dbsnp::primary_track::SeqIdRequestStringAccverUnion TRequest
virtual ~CSnpPtisClient_Impl()
Definition: snpptis.cpp:168
string x_GetPrimarySnpTrack(const TRequest &request)
Definition: snpptis.cpp:194
unique_ptr< ncbi::grpcapi::dbsnp::primary_track::DbSnpPrimaryTrack::Stub > stub
Include a standard set of the NCBI C++ Toolkit most basic headers.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
BEGIN_NAMESPACE(objects)
END_NCBI_NAMESPACE
END_NAMESPACE(objects)
BEGIN_NCBI_NAMESPACE
Modified on Wed Apr 17 13:10:08 2024 by modify_doxy.py rev. 669887