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

Go to the SVN repository for this file.

1 /* $Id$
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  */
27 
28 /// @file ID2_Request_Packet_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/id2/id2.asn">id2.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/id2/id2.def">id2.def</a>
36 ///
37 /// ATTENTION:
38 /// Don't edit or commit this file into CVS as this file will
39 /// be overridden (by DATATOOL) without warning!
40 
41 #ifndef OBJECTS_ID2_ID2_REQUEST_PACKET_BASE_HPP
42 #define OBJECTS_ID2_ID2_REQUEST_PACKET_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 
51 
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
55 #endif
56 BEGIN_objects_SCOPE // namespace ncbi::objects::
57 
58 
59 // forward declarations
60 class CID2_Request;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_ID2Access
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///*********************************************************************
73 /// request types
74 ///*********************************************************************
75 /// Requests are sent in packets to allow sending several requests at once
76 /// to avoid network latency, without possiblity of deadlock with server.
77 /// Server will not start sending replies until it will read the whole packet.
78 ///
79 /// CID2_Request_Packet_Base --
80 ///
81 
83 {
85 public:
86  // constructor
88  // destructor
89  virtual ~CID2_Request_Packet_Base(void);
90 
91  // type info
93 
94  // types
95  typedef list< CRef< CID2_Request > > Tdata;
96 
97  // getters
98  // setters
99 
100  /// Check if a value has been assigned to data member.
101  ///
102  /// Data member is mandatory;
103  /// its type is defined as 'typedef list< CRef< CID2_Request > > Tdata'
104  /// @return
105  /// - true, if a value has been assigned.
106  /// - false, otherwise.
107  bool IsSet(void) const;
108 
109  /// Check if it is safe to call Get method.
110  ///
111  /// @return
112  /// - true, if the data member is getatable.
113  /// - false, otherwise.
114  bool CanGet(void) const;
115 
116  /// Reset data member.
117  void Reset(void);
118 
119  /// Get the member data.
120  ///
121  /// @return
122  /// Reference to the member data.
123  const Tdata& Get(void) const;
124 
125  /// Assign a value to data member.
126  ///
127  /// @return
128  /// Reference to the data value.
129  Tdata& Set(void);
130 
131  /// Conversion operator to 'const Tdata' type.
132  operator const Tdata& (void) const;
133  /// Conversion operator to 'Tdata' type.
134  operator Tdata& (void);
135 
136 
137 
138 private:
139  // Prohibit copy constructor and assignment operator
142 
143  // data
144  Uint4 m_set_State[1];
145  list< CRef< CID2_Request > > m_data;
146 };
147 
148 /* @} */
149 
150 
151 
152 
153 
154 ///////////////////////////////////////////////////////////
155 ///////////////////// inline methods //////////////////////
156 ///////////////////////////////////////////////////////////
157 inline
159 {
160  return ((m_set_State[0] & 0x3) != 0);
161 }
162 
163 inline
165 {
166  return true;
167 }
168 
169 inline
171 {
172  return m_data;
173 }
174 
175 inline
177 {
178  m_set_State[0] |= 0x1;
179  return m_data;
180 }
181 
182 inline
183 CID2_Request_Packet_Base::operator const CID2_Request_Packet_Base::Tdata& (void) const
184 {
185  return m_data;
186 }
187 
188 inline
189 CID2_Request_Packet_Base::operator CID2_Request_Packet_Base::Tdata& (void)
190 {
191  m_set_State[0] |= 0x1;
192  return m_data;
193 }
194 
195 ///////////////////////////////////////////////////////////
196 ////////////////// end of inline methods //////////////////
197 ///////////////////////////////////////////////////////////
198 
199 
200 
201 
202 
203 END_objects_SCOPE // namespace ncbi::objects::
204 
206 
207 
208 #endif // OBJECTS_ID2_ID2_REQUEST_PACKET_BASE_HPP
********************************************************************* request types *****************...
CID2_Request –.
Definition: ID2_Request.hpp:66
Base class for all serializable objects.
Definition: serialbase.hpp:150
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#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_ID2_EXPORT
Definition: ncbi_export.h:552
bool IsSet(void) const
Check if a value has been assigned to data member.
CID2_Request_Packet_Base & operator=(const CID2_Request_Packet_Base &)
CID2_Request_Packet_Base(const CID2_Request_Packet_Base &)
list< CRef< CID2_Request > > m_data
Tdata & Set(void)
Assign a value to data member.
list< CRef< CID2_Request > > Tdata
bool CanGet(void) const
Check if it is safe to call Get method.
const Tdata & Get(void) const
Get the member data.
const TYPE & Get(const CNamedParameterList *param)
Modified on Wed Jun 19 17:02:31 2024 by modify_doxy.py rev. 669887