1 /* $Id: id1_client.hpp 553855 2017-12-22 14:56:49Z ucko $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Author: Aaron Ucko, NCBI
27 *
28 * File Description:
29 * ID1 network client
30 *
31 * Remark:
32 * This code was originally generated by application DATATOOL
33 * using specifications from the data definition file
34 * 'id1.asn'.
35 */
36
37 #ifndef OBJECTS_ID1_ID1_CLIENT_HPP
38 #define OBJECTS_ID1_ID1_CLIENT_HPP
39
40
41 // generated includes
42 #include <objects/id1/id1_client_.hpp>
43
44 // generated classes
45
46 BEGIN_NCBI_SCOPE
47
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49
50 class NCBI_ID1_EXPORT CID1Client : public CID1Client_Base
51 {
52 typedef CID1Client_Base Tparent;
53 public:
54 // constructor
55 CID1Client(void);
56 // destructor
57 ~CID1Client(void);
58
59 // overloaded to give explanations of error codes
60 void Ask(const TRequest& request, TReply& reply,
61 TReplyChoice::E_Choice wanted);
62 // ensure that the base class's other Ask remains available
63 // (not all compilers handle the appropriate "using" directive)
Ask(const TRequest & request,TReply & reply)64 void Ask(const TRequest& request, TReply& reply)
65 { CID1Client_Base::Ask(request, reply); }
66
SetAllowDeadEntries(bool ok)67 void SetAllowDeadEntries(bool ok) { m_AllowDeadEntries = ok; }
GetAllowDeadEntries(void)68 bool GetAllowDeadEntries(void) { return m_AllowDeadEntries; }
69
70 virtual CRef<CSeq_entry> AskGetsefromgi(const CID1server_maxcomplex& req,
71 TReply* reply = 0);
72 // Simplified interface for retrieving entries by gi or sequence id
73 CRef<CSeq_entry> FetchEntry(TGi gi, int max_complexity = 0);
74 CRef<CSeq_entry> FetchEntry(const CSeq_id& id, int max_complexity = 0);
75 CRef<CSeq_entry> FetchEntry(const string& id_string,
76 int max_complexity = 0);
77
78 protected:
79 void x_Disconnect(void);
80
81 private:
82 bool m_AllowDeadEntries;
83
84 // Prohibit copy constructor and assignment operator
85 CID1Client(const CID1Client& value);
86 CID1Client& operator=(const CID1Client& value);
87
88 };
89
90
91
92 /////////////////// CID1Client inline methods
93
94 // constructor
95 inline
CID1Client(void)96 CID1Client::CID1Client(void)
97 : m_AllowDeadEntries(false)
98 {
99 }
100
101
102 /////////////////// end of CID1Client inline methods
103
104
105 END_objects_SCOPE // namespace ncbi::objects::
106
107 END_NCBI_SCOPE
108
109 #endif // OBJECTS_ID1_ID1_CLIENT_HPP
110 /* Original file checksum: lines: 93, chars: 2368, CRC32: 45b6687e */
111