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

Go to the SVN repository for this file.

1 #ifndef READER_ID2__HPP_INCLUDED
2 #define READER_ID2__HPP_INCLUDED
3 
4 /* $Id: reader_id2.hpp 63636 2014-07-16 15:38:41Z vasilche $
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 * Author: Eugene Vasilchenko
28 *
29 * File Description: Data reader from ID2
30 *
31 */
32 
35 #include <map>
36 
39 
41 class CID2_Reply;
42 
44 {
45 public:
46  CId2Reader(int max_connections = 0);
47  CId2Reader(const TPluginManagerParamTree* params,
48  const string& driver_name);
49  ~CId2Reader();
50 
51  int GetMaximumConnectionsLimit(void) const;
52 
53 protected:
54  virtual void x_AddConnectionSlot(TConn conn);
55  virtual void x_RemoveConnectionSlot(TConn conn);
56  virtual void x_DisconnectAtSlot(TConn conn, bool failed);
57  virtual void x_ConnectAtSlot(TConn conn);
58  virtual string x_ConnDescription(TConn conn) const;
59 
60  virtual void x_SendPacket(TConn conn, const CID2_Request_Packet& packet);
61  virtual void x_ReceiveReply(TConn conn, CID2_Reply& reply);
62 
63  string x_ConnDescription(CConn_IOStream& stream) const;
64  CConn_IOStream* x_GetCurrentConnection(TConn conn) const;
65  CConn_IOStream* x_GetConnection(TConn conn);
66  void x_InitConnection(CConn_IOStream& stream, TConn conn);
67 
68 protected:
70 
73 };
74 
75 
78 
79 #endif // READER_ID2__HPP_INCLUDED
Base class, inherited from "std::iostream", does both input and output, using the specified CONNECTOR...
CID2_Reply –.
Definition: ID2_Reply.hpp:66
CID2_Request_Packet –.
virtual void x_ReceiveReply(TConn conn, CID2_Reply &reply)=0
virtual void x_SendPacket(TConn conn, const CID2_Request_Packet &packet)=0
virtual string x_ConnDescription(TConn conn) const =0
map< TConn, CReaderServiceConnector::SConnInfo > TConnections
Definition: reader_id2.hpp:71
CReaderServiceConnector m_Connector
Definition: reader_id2.hpp:69
TConnections m_Connections
Definition: reader_id2.hpp:72
virtual void x_DisconnectAtSlot(TConn conn, bool failed)
Definition: reader.cpp:458
virtual void x_ConnectAtSlot(TConn conn)=0
unsigned TConn
Definition: reader.hpp:87
virtual int GetMaximumConnectionsLimit(void) const
Definition: reader.cpp:266
virtual void x_AddConnectionSlot(TConn conn)=0
virtual void x_RemoveConnectionSlot(TConn conn)=0
definition of a Culling tree
Definition: ncbi_tree.hpp:100
static CS_CONNECTION * conn
Definition: ct_dynamic.c:25
int failed
Definition: dbmorecmds.c:10
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_XREADER_ID2_EXPORT
Definition: ncbi_export.h:1387
Modified on Sun Jun 23 05:17:13 2024 by modify_doxy.py rev. 669887