NCBI C++ ToolKit
ID2S_Split_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_Split_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_SPLIT_INFO_BASE_HPP
42 #define OBJECTS_SEQSPLIT_ID2S_SPLIT_INFO_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 CID2S_Bioseqs_Info;
61 class CID2S_Chunk_Info;
62 class CSeq_entry;
63 
64 
65 // generated classes
66 
67 
68 /** @addtogroup dataspec_NCBI_Seq_split
69  *
70  * @{
71  */
72 
73 /////////////////////////////////////////////////////////////////////////////
74 ///
75 ///
76 ///
77 ///
78 ///
79 ///
80 ///
81 ///
82 ///
83 ///
84 ///
85 ///
86 ///
87 ///
88 ///
89 ///
90 ///
91 ///
92 ///
93 /// Blob split info types
94 ///
95 ///
96 ///
97 ///
98 ///
99 ///
100 ///
101 ///
102 ///
103 ///
104 ///
105 ///
106 ///
107 ///
108 ///
109 ///
110 ///
111 ///
112 ///
113 ///
114 ///
115 ///
116 ///
117 ///
118 ///
119 ///
120 ///
121 ///
122 ///
123 ///
124 ///
125 ///
126 ///
127 ///
128 ///
129 ///
130 ///
131 ///
132 /// Chunks split description
133 ///
134 /// CID2S_Split_Info_Base --
135 ///
136 
138 {
140 public:
141  // constructor
142  CID2S_Split_Info_Base(void);
143  // destructor
144  virtual ~CID2S_Split_Info_Base(void);
145 
146  // type info
148 
149  // types
150  typedef list< CRef< CID2S_Bioseqs_Info > > TBioseqs_info;
151  typedef list< CRef< CID2S_Chunk_Info > > TChunks;
153 
154  // member index
155  enum class E_memberIndex {
156  e__allMandatory = 0,
157  e_bioseqs_info,
158  e_chunks,
159  e_skeleton
160  };
162 
163  // getters
164  // setters
165 
166  /// Check if a value has been assigned to Bioseqs_info data member.
167  ///
168  /// Data member Bioseqs_info is optional;
169  /// its type is defined as 'typedef list< CRef< CID2S_Bioseqs_Info > > TBioseqs_info'
170  /// @return
171  /// - true, if a value has been assigned.
172  /// - false, otherwise.
173  bool IsSetBioseqs_info(void) const;
174 
175  /// Check if it is safe to call GetBioseqs_info method.
176  ///
177  /// @return
178  /// - true, if the data member is getatable.
179  /// - false, otherwise.
180  bool CanGetBioseqs_info(void) const;
181 
182  /// Reset Bioseqs_info data member.
183  void ResetBioseqs_info(void);
184 
185  /// Get the Bioseqs_info member data.
186  ///
187  /// @return
188  /// Reference to the member data.
189  const TBioseqs_info& GetBioseqs_info(void) const;
190 
191  /// Assign a value to Bioseqs_info data member.
192  ///
193  /// @return
194  /// Reference to the data value.
195  TBioseqs_info& SetBioseqs_info(void);
196 
197  /// Check if a value has been assigned to Chunks data member.
198  ///
199  /// Data member Chunks is mandatory;
200  /// its type is defined as 'typedef list< CRef< CID2S_Chunk_Info > > TChunks'
201  /// @return
202  /// - true, if a value has been assigned.
203  /// - false, otherwise.
204  bool IsSetChunks(void) const;
205 
206  /// Check if it is safe to call GetChunks method.
207  ///
208  /// @return
209  /// - true, if the data member is getatable.
210  /// - false, otherwise.
211  bool CanGetChunks(void) const;
212 
213  /// Reset Chunks data member.
214  void ResetChunks(void);
215 
216  /// Get the Chunks member data.
217  ///
218  /// @return
219  /// Reference to the member data.
220  const TChunks& GetChunks(void) const;
221 
222  /// Assign a value to Chunks data member.
223  ///
224  /// @return
225  /// Reference to the data value.
226  TChunks& SetChunks(void);
227 
228  /// Check if a value has been assigned to Skeleton data member.
229  ///
230  /// Data member Skeleton is optional;
231  /// its type is defined as 'typedef CSeq_entry TSkeleton'
232  /// @return
233  /// - true, if a value has been assigned.
234  /// - false, otherwise.
235  bool IsSetSkeleton(void) const;
236 
237  /// Check if it is safe to call GetSkeleton method.
238  ///
239  /// @return
240  /// - true, if the data member is getatable.
241  /// - false, otherwise.
242  bool CanGetSkeleton(void) const;
243 
244  /// Reset Skeleton data member.
245  void ResetSkeleton(void);
246 
247  /// Get the Skeleton member data.
248  ///
249  /// @return
250  /// Reference to the member data.
251  const TSkeleton& GetSkeleton(void) const;
252 
253  /// Assign a value to Skeleton data member.
254  ///
255  /// @param value
256  /// Reference to value.
257  void SetSkeleton(TSkeleton& value);
258 
259  /// Assign a value to Skeleton data member.
260  ///
261  /// @return
262  /// Reference to the data value.
263  TSkeleton& SetSkeleton(void);
264 
265  /// Reset the whole object
266  virtual void Reset(void);
267 
268 
269 private:
270  // Prohibit copy constructor and assignment operator
273 
274  // data
275  Uint4 m_set_State[1];
276  list< CRef< CID2S_Bioseqs_Info > > m_Bioseqs_info;
277  list< CRef< CID2S_Chunk_Info > > m_Chunks;
279 };
280 
281 /* @} */
282 
283 
284 
285 
286 
287 ///////////////////////////////////////////////////////////
288 ///////////////////// inline methods //////////////////////
289 ///////////////////////////////////////////////////////////
290 inline
292 {
293  return ((m_set_State[0] & 0x3) != 0);
294 }
295 
296 inline
298 {
299  return true;
300 }
301 
302 inline
304 {
305  return m_Bioseqs_info;
306 }
307 
308 inline
310 {
311  m_set_State[0] |= 0x1;
312  return m_Bioseqs_info;
313 }
314 
315 inline
317 {
318  return ((m_set_State[0] & 0xc) != 0);
319 }
320 
321 inline
323 {
324  return true;
325 }
326 
327 inline
329 {
330  return m_Chunks;
331 }
332 
333 inline
335 {
336  m_set_State[0] |= 0x4;
337  return m_Chunks;
338 }
339 
340 inline
342 {
343  return m_Skeleton.NotEmpty();
344 }
345 
346 inline
348 {
349  return IsSetSkeleton();
350 }
351 
352 inline
354 {
355  if (!CanGetSkeleton()) {
356  ThrowUnassigned(2);
357  }
358  return (*m_Skeleton);
359 }
360 
361 ///////////////////////////////////////////////////////////
362 ////////////////// end of inline methods //////////////////
363 ///////////////////////////////////////////////////////////
364 
365 
366 
367 
368 
369 END_objects_SCOPE // namespace ncbi::objects::
370 
372 
373 
374 #endif // OBJECTS_SEQSPLIT_ID2S_SPLIT_INFO_BASE_HPP
CID2S_Bioseqs_Info –.
CID2S_Chunk_Info –.
Blob split info types.
CRef –.
Definition: ncbiobj.hpp:618
Definition: Seq_entry.hpp:56
Base class for all serializable objects.
Definition: serialbase.hpp:150
void ThrowUnassigned(TMemberIndex index) const
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
list< CRef< CID2S_Chunk_Info > > TChunks
const TBioseqs_info & GetBioseqs_info(void) const
Get the Bioseqs_info member data.
bool IsSetSkeleton(void) const
Check if a value has been assigned to Skeleton data member.
list< CRef< CID2S_Chunk_Info > > m_Chunks
bool IsSetChunks(void) const
Check if a value has been assigned to Chunks data member.
const TSkeleton & GetSkeleton(void) const
Get the Skeleton member data.
bool CanGetChunks(void) const
Check if it is safe to call GetChunks method.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
list< CRef< CID2S_Bioseqs_Info > > TBioseqs_info
CID2S_Split_Info_Base & operator=(const CID2S_Split_Info_Base &)
CRef< TSkeleton > m_Skeleton
bool IsSetBioseqs_info(void) const
Check if a value has been assigned to Bioseqs_info data member.
bool CanGetBioseqs_info(void) const
Check if it is safe to call GetBioseqs_info method.
list< CRef< CID2S_Bioseqs_Info > > m_Bioseqs_info
TBioseqs_info & SetBioseqs_info(void)
Assign a value to Bioseqs_info data member.
const TChunks & GetChunks(void) const
Get the Chunks member data.
TChunks & SetChunks(void)
Assign a value to Chunks data member.
CID2S_Split_Info_Base(const CID2S_Split_Info_Base &)
bool CanGetSkeleton(void) const
Check if it is safe to call GetSkeleton method.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:10 2024 by modify_doxy.py rev. 669887