NCBI C++ ToolKit
ID2S_Bioseqs_Info_.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 ID2S_Bioseqs_Info_.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/seqsplit/seqsplit.asn">seqsplit.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqsplit/seqsplit.def">seqsplit.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_SEQSPLIT_ID2S_BIOSEQS_INFO_BASE_HPP
42 #define OBJECTS_SEQSPLIT_ID2S_BIOSEQS_INFO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
56 class CID2S_Bioseq_Ids;
57 class CID2S_Bioseq_Info;
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_Seq_split
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CID2S_Bioseqs_Info_Base --
71 ///
72 
74 {
76 public:
77  // constructor
79  // destructor
80  virtual ~CID2S_Bioseqs_Info_Base(void);
81 
82  // type info
84 
85  // types
88 
89  // member index
90  enum class E_memberIndex {
91  e__allMandatory = 0,
92  e_info,
93  e_bioseqs
94  };
96 
97  // getters
98  // setters
99 
100  /// Check if a value has been assigned to Info data member.
101  ///
102  /// Data member Info is mandatory;
103  /// its type is defined as 'typedef CID2S_Bioseq_Info TInfo'
104  /// @return
105  /// - true, if a value has been assigned.
106  /// - false, otherwise.
107  bool IsSetInfo(void) const;
108 
109  /// Check if it is safe to call GetInfo method.
110  ///
111  /// @return
112  /// - true, if the data member is getatable.
113  /// - false, otherwise.
114  bool CanGetInfo(void) const;
115 
116  /// Reset Info data member.
117  void ResetInfo(void);
118 
119  /// Get the Info member data.
120  ///
121  /// @return
122  /// Reference to the member data.
123  const TInfo& GetInfo(void) const;
124 
125  /// Assign a value to Info data member.
126  ///
127  /// @param value
128  /// Reference to value.
129  void SetInfo(TInfo& value);
130 
131  /// Assign a value to Info data member.
132  ///
133  /// @return
134  /// Reference to the data value.
135  TInfo& SetInfo(void);
136 
137  /// Check if a value has been assigned to Bioseqs data member.
138  ///
139  /// Data member Bioseqs is mandatory;
140  /// its type is defined as 'typedef CID2S_Bioseq_Ids TBioseqs'
141  /// @return
142  /// - true, if a value has been assigned.
143  /// - false, otherwise.
144  bool IsSetBioseqs(void) const;
145 
146  /// Check if it is safe to call GetBioseqs method.
147  ///
148  /// @return
149  /// - true, if the data member is getatable.
150  /// - false, otherwise.
151  bool CanGetBioseqs(void) const;
152 
153  /// Reset Bioseqs data member.
154  void ResetBioseqs(void);
155 
156  /// Get the Bioseqs member data.
157  ///
158  /// @return
159  /// Reference to the member data.
160  const TBioseqs& GetBioseqs(void) const;
161 
162  /// Assign a value to Bioseqs data member.
163  ///
164  /// @param value
165  /// Reference to value.
166  void SetBioseqs(TBioseqs& value);
167 
168  /// Assign a value to Bioseqs data member.
169  ///
170  /// @return
171  /// Reference to the data value.
172  TBioseqs& SetBioseqs(void);
173 
174  /// Reset the whole object
175  virtual void Reset(void);
176 
177 
178 private:
179  // Prohibit copy constructor and assignment operator
182 
183  // data
184  Uint4 m_set_State[1];
187 };
188 
189 /* @} */
190 
191 
192 
193 
194 
195 ///////////////////////////////////////////////////////////
196 ///////////////////// inline methods //////////////////////
197 ///////////////////////////////////////////////////////////
198 inline
200 {
201  return m_Info.NotEmpty();
202 }
203 
204 inline
206 {
207  return true;
208 }
209 
210 inline
212 {
213  if ( !m_Info ) {
214  const_cast<CID2S_Bioseqs_Info_Base*>(this)->ResetInfo();
215  }
216  return (*m_Info);
217 }
218 
219 inline
221 {
222  if ( !m_Info ) {
223  ResetInfo();
224  }
225  return (*m_Info);
226 }
227 
228 inline
230 {
231  return m_Bioseqs.NotEmpty();
232 }
233 
234 inline
236 {
237  return true;
238 }
239 
240 inline
242 {
243  if ( !m_Bioseqs ) {
244  const_cast<CID2S_Bioseqs_Info_Base*>(this)->ResetBioseqs();
245  }
246  return (*m_Bioseqs);
247 }
248 
249 inline
251 {
252  if ( !m_Bioseqs ) {
253  ResetBioseqs();
254  }
255  return (*m_Bioseqs);
256 }
257 
258 ///////////////////////////////////////////////////////////
259 ////////////////// end of inline methods //////////////////
260 ///////////////////////////////////////////////////////////
261 
262 
263 
264 
265 
266 END_objects_SCOPE // namespace ncbi::objects::
267 
269 
270 
271 #endif // OBJECTS_SEQSPLIT_ID2S_BIOSEQS_INFO_BASE_HPP
CID2S_Bioseq_Ids –.
CID2S_Bioseq_Info –.
CID2S_Bioseqs_Info_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
Definition: ncbiobj.hpp:726
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
TBioseqs & SetBioseqs(void)
Assign a value to Bioseqs data member.
void ResetBioseqs(void)
Reset Bioseqs data member.
CID2S_Bioseqs_Info_Base(const CID2S_Bioseqs_Info_Base &)
const TBioseqs & GetBioseqs(void) const
Get the Bioseqs member data.
void ResetInfo(void)
Reset Info data member.
bool IsSetInfo(void) const
Check if a value has been assigned to Info data member.
bool CanGetInfo(void) const
Check if it is safe to call GetInfo method.
bool IsSetBioseqs(void) const
Check if a value has been assigned to Bioseqs data member.
bool CanGetBioseqs(void) const
Check if it is safe to call GetBioseqs method.
const TInfo & GetInfo(void) const
Get the Info member data.
CID2S_Bioseqs_Info_Base & operator=(const CID2S_Bioseqs_Info_Base &)
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TInfo & SetInfo(void)
Assign a value to Info data member.
Modified on Sat Dec 09 04:45:47 2023 by modify_doxy.py rev. 669887