NCBI C++ ToolKit
GCClient_GetEquivalentAsse_.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 GCClient_GetEquivalentAsse_.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/genomecoll/gencoll_client.asn">gencoll_client.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/genomecoll/gencoll_client.def">gencoll_client.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_GENOMECOLL_GCCLIENT_GETEQUIVALENTASSE_BASE_HPP
42 #define OBJECTS_GENOMECOLL_GCCLIENT_GETEQUIVALENTASSE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_GencollClient
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CGCClient_GetEquivalentAssembliesRequest_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
80 
81  // type info
83 
84  enum EEquivalency {
85  eEquivalency_paired_strict = 1, ///< Paired assembly, if identical
86  eEquivalency_paired = 2, ///< Paired assembly, if exists, even if not identical
87  eEquivalency_same_coordinates = 3, ///< All assemblies with same major release and same type (Gb/Rs)
88  eEquivalency_all_types_same_coordinates = 4, ///< All assemblies with same major release, both Gb and Rs.
89  eEquivalency_major_release = 5 ///< Major release of assembly, same type
90  };
91 
92  /// Access to EEquivalency's attributes (values, names) as defined in spec
93  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EEquivalency)(void);
94 
95  // types
96  typedef string TAccession;
97  typedef int TEquivalency;
98 
99  // member index
100  enum class E_memberIndex {
101  e__allMandatory = 0,
102  e_accession,
104  };
106 
107  // getters
108  // setters
109 
110  /// Check if a value has been assigned to Accession data member.
111  ///
112  /// Data member Accession is mandatory;
113  /// its type is defined as 'typedef string TAccession'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetAccession(void) const;
118 
119  /// Check if it is safe to call GetAccession method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetAccession(void) const;
125 
126  /// Reset Accession data member.
127  void ResetAccession(void);
128 
129  /// Get the Accession member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const TAccession& GetAccession(void) const;
134 
135  /// Assign a value to Accession data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetAccession(const TAccession& value);
140  void SetAccession(TAccession&& value);
141 
142  /// Assign a value to Accession data member.
143  ///
144  /// @return
145  /// Reference to the data value.
146  TAccession& SetAccession(void);
147 
148  /// Check if a value has been assigned to Equivalency data member.
149  ///
150  /// Data member Equivalency is mandatory;
151  /// its type is defined as 'typedef int TEquivalency'
152  /// @return
153  /// - true, if a value has been assigned.
154  /// - false, otherwise.
155  bool IsSetEquivalency(void) const;
156 
157  /// Check if it is safe to call GetEquivalency method.
158  ///
159  /// @return
160  /// - true, if the data member is getatable.
161  /// - false, otherwise.
162  bool CanGetEquivalency(void) const;
163 
164  /// Reset Equivalency data member.
165  void ResetEquivalency(void);
166 
167  /// Get the Equivalency member data.
168  ///
169  /// @return
170  /// Copy of the member data.
171  TEquivalency GetEquivalency(void) const;
172 
173  /// Assign a value to Equivalency data member.
174  ///
175  /// @param value
176  /// Value to assign
178 
179  /// Assign a value to Equivalency data member.
180  ///
181  /// @return
182  /// Reference to the data value.
184 
185  /// Reset the whole object
186  virtual void Reset(void);
187 
188 
189 private:
190  // Prohibit copy constructor and assignment operator
193 
194  // data
196  string m_Accession;
198 };
199 
200 /* @} */
201 
202 
203 
204 
205 
206 ///////////////////////////////////////////////////////////
207 ///////////////////// inline methods //////////////////////
208 ///////////////////////////////////////////////////////////
209 inline
211 {
212  return ((m_set_State[0] & 0x3) != 0);
213 }
214 
215 inline
217 {
218  return IsSetAccession();
219 }
220 
221 inline
223 {
224  if (!CanGetAccession()) {
225  ThrowUnassigned(0);
226  }
227  return m_Accession;
228 }
229 
230 inline
232 {
233  m_Accession = value;
234  m_set_State[0] |= 0x3;
235 }
236 
237 inline
239 {
240  m_Accession = std::forward<CGCClient_GetEquivalentAssembliesRequest_Base::TAccession>(value);
241  m_set_State[0] |= 0x3;
242 }
243 
244 inline
246 {
247 #ifdef _DEBUG
248  if (!IsSetAccession()) {
250  }
251 #endif
252  m_set_State[0] |= 0x1;
253  return m_Accession;
254 }
255 
256 inline
258 {
259  return ((m_set_State[0] & 0xc) != 0);
260 }
261 
262 inline
264 {
265  return IsSetEquivalency();
266 }
267 
268 inline
270 {
272  m_set_State[0] &= ~0xc;
273 }
274 
275 inline
277 {
278  if (!CanGetEquivalency()) {
279  ThrowUnassigned(1);
280  }
281  return m_Equivalency;
282 }
283 
284 inline
286 {
288  m_set_State[0] |= 0xc;
289 }
290 
291 inline
293 {
294 #ifdef _DEBUG
295  if (!IsSetEquivalency()) {
296  memset(&m_Equivalency,UnassignedByte(),sizeof(m_Equivalency));
297  }
298 #endif
299  m_set_State[0] |= 0x4;
300  return m_Equivalency;
301 }
302 
303 ///////////////////////////////////////////////////////////
304 ////////////////// end of inline methods //////////////////
305 ///////////////////////////////////////////////////////////
306 
307 
308 
309 
310 
311 END_objects_SCOPE // namespace ncbi::objects::
312 
314 
315 
316 #endif // OBJECTS_GENOMECOLL_GCCLIENT_GETEQUIVALENTASSE_BASE_HPP
CGCClient_GetEquivalentAssembliesRequest_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
static string UnassignedString(void)
Definition: serialbase.hpp:175
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
bool CanGetEquivalency(void) const
Check if it is safe to call GetEquivalency method.
bool IsSetEquivalency(void) const
Check if a value has been assigned to Equivalency data member.
virtual void Reset(void)
Reset the whole object.
bool CanGetAccession(void) const
Check if it is safe to call GetAccession method.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TAccession & SetAccession(void)
Assign a value to Accession data member.
void ResetAccession(void)
Reset Accession data member.
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
CGCClient_GetEquivalentAssembliesRequest_Base(const CGCClient_GetEquivalentAssembliesRequest_Base &)
TEquivalency & SetEquivalency(void)
Assign a value to Equivalency data member.
void ResetEquivalency(void)
Reset Equivalency data member.
const TAccession & GetAccession(void) const
Get the Accession member data.
TEquivalency GetEquivalency(void) const
Get the Equivalency member data.
CGCClient_GetEquivalentAssembliesRequest_Base & operator=(const CGCClient_GetEquivalentAssembliesRequest_Base &)
@ eEquivalency_major_release
Major release of assembly, same type.
@ eEquivalency_paired
Paired assembly, if exists, even if not identical.
@ eEquivalency_all_types_same_coordinates
All assemblies with same major release, both Gb and Rs.
@ eEquivalency_same_coordinates
All assemblies with same major release and same type (Gb/Rs)
Modified on Fri Jan 05 07:24:12 2024 by modify_doxy.py rev. 669887