NCBI C++ ToolKit
MSSearch_.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 MSSearch_.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/omssa/omssa.asn">omssa.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/omssa/omssa.def">omssa.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_OMSSA_MSSEARCH_BASE_HPP
42 #define OBJECTS_OMSSA_MSSEARCH_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 CMSRequest;
61 class CMSResponse;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_OMSSA
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 /// holds both search requests and responses
74 ///
75 /// CMSSearch_Base --
76 ///
77 
79 {
81 public:
82  // constructor
83  CMSSearch_Base(void);
84  // destructor
85  virtual ~CMSSearch_Base(void);
86 
87  // type info
89 
90  // types
91  typedef list< CRef< CMSRequest > > TRequest;
92  typedef list< CRef< CMSResponse > > TResponse;
93 
94  // member index
95  enum class E_memberIndex {
96  e__allMandatory = 0,
97  e_request,
98  e_response
99  };
101 
102  // getters
103  // setters
104 
105  /// Check if a value has been assigned to Request data member.
106  ///
107  /// Data member Request is optional;
108  /// its type is defined as 'typedef list< CRef< CMSRequest > > TRequest'
109  /// @return
110  /// - true, if a value has been assigned.
111  /// - false, otherwise.
112  bool IsSetRequest(void) const;
113 
114  /// Check if it is safe to call GetRequest method.
115  ///
116  /// @return
117  /// - true, if the data member is getatable.
118  /// - false, otherwise.
119  bool CanGetRequest(void) const;
120 
121  /// Reset Request data member.
122  void ResetRequest(void);
123 
124  /// Get the Request member data.
125  ///
126  /// @return
127  /// Reference to the member data.
128  const TRequest& GetRequest(void) const;
129 
130  /// Assign a value to Request data member.
131  ///
132  /// @return
133  /// Reference to the data value.
134  TRequest& SetRequest(void);
135 
136  /// Check if a value has been assigned to Response data member.
137  ///
138  /// Data member Response is optional;
139  /// its type is defined as 'typedef list< CRef< CMSResponse > > TResponse'
140  /// @return
141  /// - true, if a value has been assigned.
142  /// - false, otherwise.
143  bool IsSetResponse(void) const;
144 
145  /// Check if it is safe to call GetResponse method.
146  ///
147  /// @return
148  /// - true, if the data member is getatable.
149  /// - false, otherwise.
150  bool CanGetResponse(void) const;
151 
152  /// Reset Response data member.
153  void ResetResponse(void);
154 
155  /// Get the Response member data.
156  ///
157  /// @return
158  /// Reference to the member data.
159  const TResponse& GetResponse(void) const;
160 
161  /// Assign a value to Response data member.
162  ///
163  /// @return
164  /// Reference to the data value.
165  TResponse& SetResponse(void);
166 
167  /// Reset the whole object
168  virtual void Reset(void);
169 
170 
171 private:
172  // Prohibit copy constructor and assignment operator
175 
176  // data
177  Uint4 m_set_State[1];
178  list< CRef< CMSRequest > > m_Request;
179  list< CRef< CMSResponse > > m_Response;
180 };
181 
182 /* @} */
183 
184 
185 
186 
187 
188 ///////////////////////////////////////////////////////////
189 ///////////////////// inline methods //////////////////////
190 ///////////////////////////////////////////////////////////
191 inline
193 {
194  return ((m_set_State[0] & 0x3) != 0);
195 }
196 
197 inline
199 {
200  return true;
201 }
202 
203 inline
205 {
206  return m_Request;
207 }
208 
209 inline
211 {
212  m_set_State[0] |= 0x1;
213  return m_Request;
214 }
215 
216 inline
218 {
219  return ((m_set_State[0] & 0xc) != 0);
220 }
221 
222 inline
224 {
225  return true;
226 }
227 
228 inline
230 {
231  return m_Response;
232 }
233 
234 inline
236 {
237  m_set_State[0] |= 0x4;
238  return m_Response;
239 }
240 
241 ///////////////////////////////////////////////////////////
242 ////////////////// end of inline methods //////////////////
243 ///////////////////////////////////////////////////////////
244 
245 
246 
247 
248 
249 END_objects_SCOPE // namespace ncbi::objects::
250 
252 
253 
254 #endif // OBJECTS_OMSSA_MSSEARCH_BASE_HPP
holds both search requests and responses
Definition: MSSearch_.hpp:79
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_OMSSA_EXPORT
Definition: ncbi_export.h:672
list< CRef< CMSResponse > > m_Response
Definition: MSSearch_.hpp:179
bool IsSetRequest(void) const
Check if a value has been assigned to Request data member.
Definition: MSSearch_.hpp:192
const TRequest & GetRequest(void) const
Get the Request member data.
Definition: MSSearch_.hpp:204
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetResponse(void) const
Check if a value has been assigned to Response data member.
Definition: MSSearch_.hpp:217
Uint4 m_set_State[1]
Definition: MSSearch_.hpp:177
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Definition: MSSearch_.hpp:100
bool CanGetRequest(void) const
Check if it is safe to call GetRequest method.
Definition: MSSearch_.hpp:198
const TResponse & GetResponse(void) const
Get the Response member data.
Definition: MSSearch_.hpp:229
list< CRef< CMSRequest > > TRequest
Definition: MSSearch_.hpp:91
list< CRef< CMSResponse > > TResponse
Definition: MSSearch_.hpp:92
TResponse & SetResponse(void)
Assign a value to Response data member.
Definition: MSSearch_.hpp:235
TRequest & SetRequest(void)
Assign a value to Request data member.
Definition: MSSearch_.hpp:210
CSerialObject Tparent
Definition: MSSearch_.hpp:80
list< CRef< CMSRequest > > m_Request
Definition: MSSearch_.hpp:178
CMSSearch_Base(const CMSSearch_Base &)
bool CanGetResponse(void) const
Check if it is safe to call GetResponse method.
Definition: MSSearch_.hpp:223
CMSSearch_Base & operator=(const CMSSearch_Base &)
Modified on Mon May 20 05:04:36 2024 by modify_doxy.py rev. 669887