NCBI C++ ToolKit
GC_Genome_.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 GC_Genome_.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/genome_collection.asn">genome_collection.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/genomecoll/genome_collection.def">genome_collection.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_GC_GENOME_BASE_HPP
42 #define OBJECTS_GENOMECOLL_GC_GENOME_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <string>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // forward declarations
61 class CDbtag;
62 class CGC_GenomicPart;
63 class CGC_Project;
64 class CSeq_descr;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_GenomeCollection
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 ///
77 /// CGC_Genome_Base --
78 ///
79 
81 {
83 public:
84  // constructor
85  CGC_Genome_Base(void);
86  // destructor
87  virtual ~CGC_Genome_Base(void);
88 
89  // type info
91 
92  // types
93  typedef list< CRef< CDbtag > > TId;
94  typedef list< CRef< CGC_Project > > TProjects;
95  typedef CSeq_descr TDescr;
96  typedef list< string > TChr_names;
97  typedef list< CRef< CGC_GenomicPart > > TParts;
98 
99  // member index
100  enum class E_memberIndex {
101  e__allMandatory = 0,
102  e_id,
103  e_projects,
104  e_descr,
105  e_chr_names,
106  e_parts
107  };
109 
110  // getters
111  // setters
112 
113  /// Gencoll identifier for this genome
114  /// Check if a value has been assigned to Id data member.
115  ///
116  /// Data member Id is mandatory;
117  /// its type is defined as 'typedef list< CRef< CDbtag > > TId'
118  /// @return
119  /// - true, if a value has been assigned.
120  /// - false, otherwise.
121  bool IsSetId(void) const;
122 
123  /// Check if it is safe to call GetId method.
124  ///
125  /// @return
126  /// - true, if the data member is getatable.
127  /// - false, otherwise.
128  bool CanGetId(void) const;
129 
130  /// Reset Id data member.
131  void ResetId(void);
132 
133  /// Get the Id member data.
134  ///
135  /// @return
136  /// Reference to the member data.
137  const TId& GetId(void) const;
138 
139  /// Assign a value to Id data member.
140  ///
141  /// @return
142  /// Reference to the data value.
143  TId& SetId(void);
144 
145  /// project ID for this genome
146  /// this is the ID for this asssembly and may reflect the submitter/source
147  /// Check if a value has been assigned to Projects data member.
148  ///
149  /// Data member Projects is optional;
150  /// its type is defined as 'typedef list< CRef< CGC_Project > > TProjects'
151  /// @return
152  /// - true, if a value has been assigned.
153  /// - false, otherwise.
154  bool IsSetProjects(void) const;
155 
156  /// Check if it is safe to call GetProjects method.
157  ///
158  /// @return
159  /// - true, if the data member is getatable.
160  /// - false, otherwise.
161  bool CanGetProjects(void) const;
162 
163  /// Reset Projects data member.
164  void ResetProjects(void);
165 
166  /// Get the Projects member data.
167  ///
168  /// @return
169  /// Reference to the member data.
170  const TProjects& GetProjects(void) const;
171 
172  /// Assign a value to Projects data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TProjects& SetProjects(void);
177 
178  /// Various attributes assigned at this level:
179  /// biosrc, comments, publications...
180  /// Check if a value has been assigned to Descr data member.
181  ///
182  /// Data member Descr is optional;
183  /// its type is defined as 'typedef CSeq_descr TDescr'
184  /// @return
185  /// - true, if a value has been assigned.
186  /// - false, otherwise.
187  bool IsSetDescr(void) const;
188 
189  /// Check if it is safe to call GetDescr method.
190  ///
191  /// @return
192  /// - true, if the data member is getatable.
193  /// - false, otherwise.
194  bool CanGetDescr(void) const;
195 
196  /// Reset Descr data member.
197  void ResetDescr(void);
198 
199  /// Get the Descr member data.
200  ///
201  /// @return
202  /// Reference to the member data.
203  const TDescr& GetDescr(void) const;
204 
205  /// Assign a value to Descr data member.
206  ///
207  /// @param value
208  /// Reference to value.
209  void SetDescr(TDescr& value);
210 
211  /// Assign a value to Descr data member.
212  ///
213  /// @return
214  /// Reference to the data value.
215  TDescr& SetDescr(void);
216 
217  /// official list of chromosome names
218  /// this should be the complete expected set of chromosomes
219  /// regardless of whether they are represented in *any*
220  /// genomic part
221  /// Check if a value has been assigned to Chr_names data member.
222  ///
223  /// Data member Chr_names is optional;
224  /// its type is defined as 'typedef list< string > TChr_names'
225  /// @return
226  /// - true, if a value has been assigned.
227  /// - false, otherwise.
228  bool IsSetChr_names(void) const;
229 
230  /// Check if it is safe to call GetChr_names method.
231  ///
232  /// @return
233  /// - true, if the data member is getatable.
234  /// - false, otherwise.
235  bool CanGetChr_names(void) const;
236 
237  /// Reset Chr_names data member.
238  void ResetChr_names(void);
239 
240  /// Get the Chr_names member data.
241  ///
242  /// @return
243  /// Reference to the member data.
244  const TChr_names& GetChr_names(void) const;
245 
246  /// Assign a value to Chr_names data member.
247  ///
248  /// @return
249  /// Reference to the data value.
250  TChr_names& SetChr_names(void);
251 
252  /// the bits that make up this genome
253  /// this preserves the expected display order
254  /// Check if a value has been assigned to Parts data member.
255  ///
256  /// Data member Parts is mandatory;
257  /// its type is defined as 'typedef list< CRef< CGC_GenomicPart > > TParts'
258  /// @return
259  /// - true, if a value has been assigned.
260  /// - false, otherwise.
261  bool IsSetParts(void) const;
262 
263  /// Check if it is safe to call GetParts method.
264  ///
265  /// @return
266  /// - true, if the data member is getatable.
267  /// - false, otherwise.
268  bool CanGetParts(void) const;
269 
270  /// Reset Parts data member.
271  void ResetParts(void);
272 
273  /// Get the Parts member data.
274  ///
275  /// @return
276  /// Reference to the member data.
277  const TParts& GetParts(void) const;
278 
279  /// Assign a value to Parts data member.
280  ///
281  /// @return
282  /// Reference to the data value.
283  TParts& SetParts(void);
284 
285  /// Reset the whole object
286  virtual void Reset(void);
287 
288 
289 private:
290  // Prohibit copy constructor and assignment operator
293 
294  // data
295  Uint4 m_set_State[1];
296  list< CRef< CDbtag > > m_Id;
297  list< CRef< CGC_Project > > m_Projects;
299  list< string > m_Chr_names;
300  list< CRef< CGC_GenomicPart > > m_Parts;
301 };
302 
303 /* @} */
304 
305 
306 
307 
308 
309 ///////////////////////////////////////////////////////////
310 ///////////////////// inline methods //////////////////////
311 ///////////////////////////////////////////////////////////
312 inline
313 bool CGC_Genome_Base::IsSetId(void) const
314 {
315  return ((m_set_State[0] & 0x3) != 0);
316 }
317 
318 inline
320 {
321  return true;
322 }
323 
324 inline
326 {
327  return m_Id;
328 }
329 
330 inline
332 {
333  m_set_State[0] |= 0x1;
334  return m_Id;
335 }
336 
337 inline
339 {
340  return ((m_set_State[0] & 0xc) != 0);
341 }
342 
343 inline
345 {
346  return true;
347 }
348 
349 inline
351 {
352  return m_Projects;
353 }
354 
355 inline
357 {
358  m_set_State[0] |= 0x4;
359  return m_Projects;
360 }
361 
362 inline
364 {
365  return m_Descr.NotEmpty();
366 }
367 
368 inline
370 {
371  return IsSetDescr();
372 }
373 
374 inline
376 {
377  if (!CanGetDescr()) {
378  ThrowUnassigned(2);
379  }
380  return (*m_Descr);
381 }
382 
383 inline
385 {
386  return ((m_set_State[0] & 0xc0) != 0);
387 }
388 
389 inline
391 {
392  return true;
393 }
394 
395 inline
397 {
398  return m_Chr_names;
399 }
400 
401 inline
403 {
404  m_set_State[0] |= 0x40;
405  return m_Chr_names;
406 }
407 
408 inline
410 {
411  return ((m_set_State[0] & 0x300) != 0);
412 }
413 
414 inline
416 {
417  return true;
418 }
419 
420 inline
422 {
423  return m_Parts;
424 }
425 
426 inline
428 {
429  m_set_State[0] |= 0x100;
430  return m_Parts;
431 }
432 
433 ///////////////////////////////////////////////////////////
434 ////////////////// end of inline methods //////////////////
435 ///////////////////////////////////////////////////////////
436 
437 
438 
439 
440 
441 END_objects_SCOPE // namespace ncbi::objects::
442 
444 
445 
446 #endif // OBJECTS_GENOMECOLL_GC_GENOME_BASE_HPP
Definition: Dbtag.hpp:53
CGC_Genome_Base –.
Definition: GC_Genome_.hpp:81
CGC_GenomicPart –.
CGC_Project –.
Definition: GC_Project.hpp:66
CRef –.
Definition: ncbiobj.hpp:618
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
Base class for all serializable objects.
Definition: serialbase.hpp:150
static CBioseq_set * GetParts(TEntryList &seq_entries)
Definition: gb_ascii.cpp:2352
void ThrowUnassigned(TMemberIndex index) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
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_GENOME_COLLECTION_EXPORT
Definition: ncbi_export.h:528
list< CRef< CGC_Project > > TProjects
Definition: GC_Genome_.hpp:94
bool CanGetId(void) const
Check if it is safe to call GetId method.
Definition: GC_Genome_.hpp:319
TProjects & SetProjects(void)
Assign a value to Projects data member.
Definition: GC_Genome_.hpp:356
bool CanGetParts(void) const
Check if it is safe to call GetParts method.
Definition: GC_Genome_.hpp:415
CGC_Genome_Base & operator=(const CGC_Genome_Base &)
list< CRef< CDbtag > > m_Id
Definition: GC_Genome_.hpp:296
Uint4 m_set_State[1]
Definition: GC_Genome_.hpp:295
CRef< TDescr > m_Descr
Definition: GC_Genome_.hpp:298
const TDescr & GetDescr(void) const
Get the Descr member data.
Definition: GC_Genome_.hpp:375
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
Definition: GC_Genome_.hpp:108
list< string > m_Chr_names
Definition: GC_Genome_.hpp:299
bool IsSetChr_names(void) const
official list of chromosome names this should be the complete expected set of chromosomes regardless ...
Definition: GC_Genome_.hpp:384
const TParts & GetParts(void) const
Get the Parts member data.
Definition: GC_Genome_.hpp:421
CGC_Genome_Base(const CGC_Genome_Base &)
bool CanGetChr_names(void) const
Check if it is safe to call GetChr_names method.
Definition: GC_Genome_.hpp:390
TId & SetId(void)
Assign a value to Id data member.
Definition: GC_Genome_.hpp:331
list< CRef< CDbtag > > TId
Definition: GC_Genome_.hpp:93
bool CanGetProjects(void) const
Check if it is safe to call GetProjects method.
Definition: GC_Genome_.hpp:344
const TChr_names & GetChr_names(void) const
Get the Chr_names member data.
Definition: GC_Genome_.hpp:396
list< CRef< CGC_Project > > m_Projects
Definition: GC_Genome_.hpp:297
list< CRef< CGC_GenomicPart > > m_Parts
Definition: GC_Genome_.hpp:300
list< string > TChr_names
Definition: GC_Genome_.hpp:96
TParts & SetParts(void)
Assign a value to Parts data member.
Definition: GC_Genome_.hpp:427
const TProjects & GetProjects(void) const
Get the Projects member data.
Definition: GC_Genome_.hpp:350
bool IsSetId(void) const
Gencoll identifier for this genome Check if a value has been assigned to Id data member.
Definition: GC_Genome_.hpp:313
bool CanGetDescr(void) const
Check if it is safe to call GetDescr method.
Definition: GC_Genome_.hpp:369
const TId & GetId(void) const
Get the Id member data.
Definition: GC_Genome_.hpp:325
bool IsSetProjects(void) const
project ID for this genome this is the ID for this asssembly and may reflect the submitter/source Che...
Definition: GC_Genome_.hpp:338
CSerialObject Tparent
Definition: GC_Genome_.hpp:82
CSeq_descr TDescr
Definition: GC_Genome_.hpp:95
bool IsSetDescr(void) const
Various attributes assigned at this level: biosrc, comments, publications...
Definition: GC_Genome_.hpp:363
bool IsSetParts(void) const
the bits that make up this genome this preserves the expected display order Check if a value has been...
Definition: GC_Genome_.hpp:409
TChr_names & SetChr_names(void)
Assign a value to Chr_names data member.
Definition: GC_Genome_.hpp:402
list< CRef< CGC_GenomicPart > > TParts
Definition: GC_Genome_.hpp:97
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Jun 14 16:52:00 2024 by modify_doxy.py rev. 669887