NCBI C++ ToolKit
TMgr_Hub_.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 TMgr_Hub_.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/trackmgr/trackmgr.asn">trackmgr.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/trackmgr/trackmgr.def">trackmgr.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_TRACKMGR_TMGR_HUB_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_HUB_BASE_HPP
43 
44 // extra headers
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
49 
50 // generated includes
51 #include <list>
52 #include <string>
53 
55 
56 #ifndef BEGIN_objects_SCOPE
57 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
58 # define END_objects_SCOPE END_SCOPE(objects)
59 #endif
60 BEGIN_objects_SCOPE // namespace ncbi::objects::
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_TrackManager
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///
73 /// CTMgr_Hub_Base --
74 ///
75 
77 {
79 public:
80  // constructor
81  CTMgr_Hub_Base(void);
82  // destructor
83  virtual ~CTMgr_Hub_Base(void);
84 
85  // type info
87 
88  // types
89  typedef string THub;
90  typedef string TShort_label;
91  typedef string TLong_label;
92  typedef list< string > TAssembly_db_name;
93  typedef string TTrackdb_url;
94 
95  // member index
96  enum class E_memberIndex {
97  e__allMandatory = 0,
98  e_hub,
99  e_short_label,
100  e_long_label,
101  e_assembly_db_name,
102  e_trackdb_url
103  };
105 
106  // getters
107  // setters
108 
109  /// hub entry from hub.txt file
110  /// Check if a value has been assigned to Hub data member.
111  ///
112  /// Data member Hub is mandatory;
113  /// its type is defined as 'typedef string THub'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetHub(void) const;
118 
119  /// Check if it is safe to call GetHub method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetHub(void) const;
125 
126  /// Reset Hub data member.
127  void ResetHub(void);
128 
129  /// Get the Hub member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const THub& GetHub(void) const;
134 
135  /// Assign a value to Hub data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetHub(const THub& value);
140  void SetHub(THub&& value);
141 
142  /// Assign a value to Hub data member.
143  ///
144  /// @return
145  /// Reference to the data value.
146  THub& SetHub(void);
147 
148  /// shortLabel entry from hub.txt file
149  /// Check if a value has been assigned to Short_label data member.
150  ///
151  /// Data member Short_label is mandatory;
152  /// its type is defined as 'typedef string TShort_label'
153  /// @return
154  /// - true, if a value has been assigned.
155  /// - false, otherwise.
156  bool IsSetShort_label(void) const;
157 
158  /// Check if it is safe to call GetShort_label method.
159  ///
160  /// @return
161  /// - true, if the data member is getatable.
162  /// - false, otherwise.
163  bool CanGetShort_label(void) const;
164 
165  /// Reset Short_label data member.
166  void ResetShort_label(void);
167 
168  /// Get the Short_label member data.
169  ///
170  /// @return
171  /// Reference to the member data.
172  const TShort_label& GetShort_label(void) const;
173 
174  /// Assign a value to Short_label data member.
175  ///
176  /// @param value
177  /// Value to assign
178  void SetShort_label(const TShort_label& value);
179  void SetShort_label(TShort_label&& value);
180 
181  /// Assign a value to Short_label data member.
182  ///
183  /// @return
184  /// Reference to the data value.
185  TShort_label& SetShort_label(void);
186 
187  /// longLabel entry from hub.txt file
188  /// Check if a value has been assigned to Long_label data member.
189  ///
190  /// Data member Long_label is mandatory;
191  /// its type is defined as 'typedef string TLong_label'
192  /// @return
193  /// - true, if a value has been assigned.
194  /// - false, otherwise.
195  bool IsSetLong_label(void) const;
196 
197  /// Check if it is safe to call GetLong_label method.
198  ///
199  /// @return
200  /// - true, if the data member is getatable.
201  /// - false, otherwise.
202  bool CanGetLong_label(void) const;
203 
204  /// Reset Long_label data member.
205  void ResetLong_label(void);
206 
207  /// Get the Long_label member data.
208  ///
209  /// @return
210  /// Reference to the member data.
211  const TLong_label& GetLong_label(void) const;
212 
213  /// Assign a value to Long_label data member.
214  ///
215  /// @param value
216  /// Value to assign
217  void SetLong_label(const TLong_label& value);
218  void SetLong_label(TLong_label&& value);
219 
220  /// Assign a value to Long_label data member.
221  ///
222  /// @return
223  /// Reference to the data value.
224  TLong_label& SetLong_label(void);
225 
226  ///- genome entries in genomes.txt file
227  /// Check if a value has been assigned to Assembly_db_name data member.
228  ///
229  /// Data member Assembly_db_name is mandatory;
230  /// its type is defined as 'typedef list< string > TAssembly_db_name'
231  /// @return
232  /// - true, if a value has been assigned.
233  /// - false, otherwise.
234  bool IsSetAssembly_db_name(void) const;
235 
236  /// Check if it is safe to call GetAssembly_db_name method.
237  ///
238  /// @return
239  /// - true, if the data member is getatable.
240  /// - false, otherwise.
241  bool CanGetAssembly_db_name(void) const;
242 
243  /// Reset Assembly_db_name data member.
244  void ResetAssembly_db_name(void);
245 
246  /// Get the Assembly_db_name member data.
247  ///
248  /// @return
249  /// Reference to the member data.
250  const TAssembly_db_name& GetAssembly_db_name(void) const;
251 
252  /// Assign a value to Assembly_db_name data member.
253  ///
254  /// @return
255  /// Reference to the data value.
256  TAssembly_db_name& SetAssembly_db_name(void);
257 
258  ///- trackDb entry in genomes.txt file associated with assembly_acc
259  /// Check if a value has been assigned to Trackdb_url data member.
260  ///
261  /// Data member Trackdb_url is optional;
262  /// its type is defined as 'typedef string TTrackdb_url'
263  /// @return
264  /// - true, if a value has been assigned.
265  /// - false, otherwise.
266  bool IsSetTrackdb_url(void) const;
267 
268  /// Check if it is safe to call GetTrackdb_url method.
269  ///
270  /// @return
271  /// - true, if the data member is getatable.
272  /// - false, otherwise.
273  bool CanGetTrackdb_url(void) const;
274 
275  /// Reset Trackdb_url data member.
276  void ResetTrackdb_url(void);
277 
278  /// Get the Trackdb_url member data.
279  ///
280  /// @return
281  /// Reference to the member data.
282  const TTrackdb_url& GetTrackdb_url(void) const;
283 
284  /// Assign a value to Trackdb_url data member.
285  ///
286  /// @param value
287  /// Value to assign
288  void SetTrackdb_url(const TTrackdb_url& value);
289  void SetTrackdb_url(TTrackdb_url&& value);
290 
291  /// Assign a value to Trackdb_url data member.
292  ///
293  /// @return
294  /// Reference to the data value.
295  TTrackdb_url& SetTrackdb_url(void);
296 
297  /// Reset the whole object
298  virtual void Reset(void);
299 
300 
301 private:
302  // Prohibit copy constructor and assignment operator
305 
306  // data
307  Uint4 m_set_State[1];
308  string m_Hub;
310  string m_Long_label;
311  list< string > m_Assembly_db_name;
313 };
314 
315 /* @} */
316 
317 
318 
319 
320 
321 ///////////////////////////////////////////////////////////
322 ///////////////////// inline methods //////////////////////
323 ///////////////////////////////////////////////////////////
324 inline
325 bool CTMgr_Hub_Base::IsSetHub(void) const
326 {
327  return ((m_set_State[0] & 0x3) != 0);
328 }
329 
330 inline
332 {
333  return IsSetHub();
334 }
335 
336 inline
338 {
339  if (!CanGetHub()) {
340  ThrowUnassigned(0);
341  }
342  return m_Hub;
343 }
344 
345 inline
347 {
348  m_Hub = value;
349  m_set_State[0] |= 0x3;
350 }
351 
352 inline
354 {
355  m_Hub = std::forward<CTMgr_Hub_Base::THub>(value);
356  m_set_State[0] |= 0x3;
357 }
358 
359 inline
361 {
362 #ifdef _DEBUG
363  if (!IsSetHub()) {
365  }
366 #endif
367  m_set_State[0] |= 0x1;
368  return m_Hub;
369 }
370 
371 inline
373 {
374  return ((m_set_State[0] & 0xc) != 0);
375 }
376 
377 inline
379 {
380  return IsSetShort_label();
381 }
382 
383 inline
385 {
386  if (!CanGetShort_label()) {
387  ThrowUnassigned(1);
388  }
389  return m_Short_label;
390 }
391 
392 inline
394 {
396  m_set_State[0] |= 0xc;
397 }
398 
399 inline
401 {
402  m_Short_label = std::forward<CTMgr_Hub_Base::TShort_label>(value);
403  m_set_State[0] |= 0xc;
404 }
405 
406 inline
408 {
409 #ifdef _DEBUG
410  if (!IsSetShort_label()) {
412  }
413 #endif
414  m_set_State[0] |= 0x4;
415  return m_Short_label;
416 }
417 
418 inline
420 {
421  return ((m_set_State[0] & 0x30) != 0);
422 }
423 
424 inline
426 {
427  return IsSetLong_label();
428 }
429 
430 inline
432 {
433  if (!CanGetLong_label()) {
434  ThrowUnassigned(2);
435  }
436  return m_Long_label;
437 }
438 
439 inline
441 {
443  m_set_State[0] |= 0x30;
444 }
445 
446 inline
448 {
449  m_Long_label = std::forward<CTMgr_Hub_Base::TLong_label>(value);
450  m_set_State[0] |= 0x30;
451 }
452 
453 inline
455 {
456 #ifdef _DEBUG
457  if (!IsSetLong_label()) {
459  }
460 #endif
461  m_set_State[0] |= 0x10;
462  return m_Long_label;
463 }
464 
465 inline
467 {
468  return ((m_set_State[0] & 0xc0) != 0);
469 }
470 
471 inline
473 {
474  return true;
475 }
476 
477 inline
479 {
480  return m_Assembly_db_name;
481 }
482 
483 inline
485 {
486  m_set_State[0] |= 0x40;
487  return m_Assembly_db_name;
488 }
489 
490 inline
492 {
493  return ((m_set_State[0] & 0x300) != 0);
494 }
495 
496 inline
498 {
499  return IsSetTrackdb_url();
500 }
501 
502 inline
504 {
505  if (!CanGetTrackdb_url()) {
506  ThrowUnassigned(4);
507  }
508  return m_Trackdb_url;
509 }
510 
511 inline
513 {
515  m_set_State[0] |= 0x300;
516 }
517 
518 inline
520 {
521  m_Trackdb_url = std::forward<CTMgr_Hub_Base::TTrackdb_url>(value);
522  m_set_State[0] |= 0x300;
523 }
524 
525 inline
527 {
528 #ifdef _DEBUG
529  if (!IsSetTrackdb_url()) {
531  }
532 #endif
533  m_set_State[0] |= 0x100;
534  return m_Trackdb_url;
535 }
536 
537 ///////////////////////////////////////////////////////////
538 ////////////////// end of inline methods //////////////////
539 ///////////////////////////////////////////////////////////
540 
541 
542 
543 
544 
545 END_objects_SCOPE // namespace ncbi::objects::
546 
548 
549 
550 #endif // OBJECTS_TRACKMGR_TMGR_HUB_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTMgr_Hub_Base –.
Definition: TMgr_Hub_.hpp:77
void ThrowUnassigned(TMemberIndex index) const
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
Uint4 m_set_State[1]
Definition: TMgr_Hub_.hpp:307
string TTrackdb_url
Definition: TMgr_Hub_.hpp:93
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetShort_label(void) const
shortLabel entry from hub.txt file Check if a value has been assigned to Short_label data member.
Definition: TMgr_Hub_.hpp:372
bool CanGetShort_label(void) const
Check if it is safe to call GetShort_label method.
Definition: TMgr_Hub_.hpp:378
TTrackdb_url & SetTrackdb_url(void)
Assign a value to Trackdb_url data member.
Definition: TMgr_Hub_.hpp:526
TShort_label & SetShort_label(void)
Assign a value to Short_label data member.
Definition: TMgr_Hub_.hpp:407
bool IsSetLong_label(void) const
longLabel entry from hub.txt file Check if a value has been assigned to Long_label data member.
Definition: TMgr_Hub_.hpp:419
string TLong_label
Definition: TMgr_Hub_.hpp:91
bool CanGetHub(void) const
Check if it is safe to call GetHub method.
Definition: TMgr_Hub_.hpp:331
const TLong_label & GetLong_label(void) const
Get the Long_label member data.
Definition: TMgr_Hub_.hpp:431
bool CanGetTrackdb_url(void) const
Check if it is safe to call GetTrackdb_url method.
Definition: TMgr_Hub_.hpp:497
string TShort_label
Definition: TMgr_Hub_.hpp:90
bool IsSetTrackdb_url(void) const
Definition: TMgr_Hub_.hpp:491
string m_Trackdb_url
Definition: TMgr_Hub_.hpp:312
CSerialObject Tparent
Definition: TMgr_Hub_.hpp:78
bool CanGetAssembly_db_name(void) const
Check if it is safe to call GetAssembly_db_name method.
Definition: TMgr_Hub_.hpp:472
string m_Long_label
Definition: TMgr_Hub_.hpp:310
const TAssembly_db_name & GetAssembly_db_name(void) const
Get the Assembly_db_name member data.
Definition: TMgr_Hub_.hpp:478
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
Definition: TMgr_Hub_.hpp:104
TLong_label & SetLong_label(void)
Assign a value to Long_label data member.
Definition: TMgr_Hub_.hpp:454
bool IsSetHub(void) const
hub entry from hub.txt file Check if a value has been assigned to Hub data member.
Definition: TMgr_Hub_.hpp:325
CTMgr_Hub_Base & operator=(const CTMgr_Hub_Base &)
bool CanGetLong_label(void) const
Check if it is safe to call GetLong_label method.
Definition: TMgr_Hub_.hpp:425
list< string > TAssembly_db_name
Definition: TMgr_Hub_.hpp:92
const THub & GetHub(void) const
Get the Hub member data.
Definition: TMgr_Hub_.hpp:337
const TShort_label & GetShort_label(void) const
Get the Short_label member data.
Definition: TMgr_Hub_.hpp:384
const TTrackdb_url & GetTrackdb_url(void) const
Get the Trackdb_url member data.
Definition: TMgr_Hub_.hpp:503
bool IsSetAssembly_db_name(void) const
Definition: TMgr_Hub_.hpp:466
string m_Short_label
Definition: TMgr_Hub_.hpp:309
THub & SetHub(void)
Assign a value to Hub data member.
Definition: TMgr_Hub_.hpp:360
TAssembly_db_name & SetAssembly_db_name(void)
Assign a value to Assembly_db_name data member.
Definition: TMgr_Hub_.hpp:484
list< string > m_Assembly_db_name
Definition: TMgr_Hub_.hpp:311
CTMgr_Hub_Base(const CTMgr_Hub_Base &)
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Defines to provide correct exporting from DLLs in Windows.
#define NCBI_TRACKMGR_EXPORT
Modified on Wed Sep 04 15:03:29 2024 by modify_doxy.py rev. 669887