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

Go to the SVN repository for this file.

1 /* $Id: id1_client.hpp 95876 2022-01-10 13:57:10Z grichenk $
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
43 
44 // generated classes
45 
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
51 {
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)
64  void Ask(const TRequest& request, TReply& reply)
65  { CID1Client_Base::Ask(request, reply); }
66 
67  void SetAllowDeadEntries(bool ok) { m_AllowDeadEntries = ok; }
68  bool GetAllowDeadEntries(void) { return m_AllowDeadEntries; }
69 
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 private:
80 
81  // Prohibit copy constructor and assignment operator
84 
85 };
86 
87 
88 
89 /////////////////// CID1Client inline methods
90 
91 // constructor
92 inline
94  : m_AllowDeadEntries(false)
95 {
96 }
97 
98 
99 /////////////////// end of CID1Client inline methods
100 
101 
102 END_objects_SCOPE // namespace ncbi::objects::
103 
105 
106 #endif // OBJECTS_ID1_ID1_CLIENT_HPP
107 /* Original file checksum: lines: 93, chars: 2368, CRC32: 45b6687e */
#define false
Definition: bool.h:36
CID1Client_Base –.
Definition: id1_client_.hpp:81
void SetAllowDeadEntries(bool ok)
Definition: id1_client.hpp:67
bool GetAllowDeadEntries(void)
Definition: id1_client.hpp:68
CID1Client & operator=(const CID1Client &value)
CID1Client(const CID1Client &value)
CID1Client_Base Tparent
Definition: id1_client.hpp:52
CID1Client(void)
Definition: id1_client.hpp:93
void Ask(const TRequest &request, TReply &reply)
Definition: id1_client.hpp:64
bool m_AllowDeadEntries
Definition: id1_client.hpp:79
@ID1server_back.hpp User-defined methods of the data storage class.
CID1server_maxcomplex –.
CID1server_request –.
char value[7]
Definition: config.c:431
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_ID1_EXPORT
Definition: ncbi_export.h:544
virtual CRef< CSeq_entry > AskGetsefromgi(const CID1server_maxcomplex &req, TReply *reply=0)
virtual void Ask(const TRequest &request, TReply &reply)
E_Choice
Choice variants.
Data storage class.
Modified on Mon Dec 11 02:38:15 2023 by modify_doxy.py rev. 669887