NCBI C++ ToolKit
LinkInfo_.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 LinkInfo_.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/objtools/eutils/elink/elink.dtd">elink.dtd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/elink/elink.def">elink.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 elink__OBJTOOLS_EUTILS_ELINK_LINKINFO_BASE_HPP
42 #define elink__OBJTOOLS_EUTILS_ELINK_LINKINFO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
49 
50 #ifndef BEGIN_elink_SCOPE
51 # define BEGIN_elink_SCOPE BEGIN_SCOPE(elink)
52 # define END_elink_SCOPE END_SCOPE(elink)
53 #endif
54 BEGIN_elink_SCOPE // namespace elink::
55 
56 
57 // forward declarations
58 class CUrl;
59 
60 
61 // generated classes
62 
63 
64 /** @addtogroup dataspec_elink
65  *
66  * @{
67  */
68 
69 /////////////////////////////////////////////////////////////////////////////
70 ///
71 /// CLinkInfo_Base --
72 ///
73 
74 class NCBI_EUTILS_EXPORT CLinkInfo_Base : public NCBI_NS_NCBI::CSerialObject
75 {
76  typedef NCBI_NS_NCBI::CSerialObject Tparent;
77 public:
78  // constructor
79  CLinkInfo_Base(void);
80  // destructor
81  virtual ~CLinkInfo_Base(void);
82 
83  // type info
85 
86  // types
91  typedef CUrl TUrl;
93 
94  // member index
95  enum class E_memberIndex {
96  e__allMandatory = 0,
97  e_DbTo,
98  e_LinkName,
99  e_MenuTag,
100  e_HtmlTag,
101  e_Url,
102  e_Priority
103  };
104  typedef Tparent::CMemberIndex<E_memberIndex, 7> TmemberIndex;
105 
106  // getters
107  // setters
108 
109  /// \S+
110  /// Check if a value has been assigned to DbTo data member.
111  ///
112  /// Data member DbTo is mandatory;
113  /// its type is defined as 'typedef NCBI_NS_STD::string TDbTo'
114  /// @return
115  /// - true, if a value has been assigned.
116  /// - false, otherwise.
117  bool IsSetDbTo(void) const;
118 
119  /// Check if it is safe to call GetDbTo method.
120  ///
121  /// @return
122  /// - true, if the data member is getatable.
123  /// - false, otherwise.
124  bool CanGetDbTo(void) const;
125 
126  /// Reset DbTo data member.
127  void ResetDbTo(void);
128 
129  /// Get the DbTo member data.
130  ///
131  /// @return
132  /// Reference to the member data.
133  const TDbTo& GetDbTo(void) const;
134 
135  /// Assign a value to DbTo data member.
136  ///
137  /// @param value
138  /// Value to assign
139  void SetDbTo(const TDbTo& value);
140  void SetDbTo(TDbTo&& value);
141 
142  /// Assign a value to DbTo data member.
143  ///
144  /// @return
145  /// Reference to the data value.
146  TDbTo& SetDbTo(void);
147 
148  /// \S+
149  /// Check if a value has been assigned to LinkName data member.
150  ///
151  /// Data member LinkName is mandatory;
152  /// its type is defined as 'typedef NCBI_NS_STD::string TLinkName'
153  /// @return
154  /// - true, if a value has been assigned.
155  /// - false, otherwise.
156  bool IsSetLinkName(void) const;
157 
158  /// Check if it is safe to call GetLinkName method.
159  ///
160  /// @return
161  /// - true, if the data member is getatable.
162  /// - false, otherwise.
163  bool CanGetLinkName(void) const;
164 
165  /// Reset LinkName data member.
166  void ResetLinkName(void);
167 
168  /// Get the LinkName member data.
169  ///
170  /// @return
171  /// Reference to the member data.
172  const TLinkName& GetLinkName(void) const;
173 
174  /// Assign a value to LinkName data member.
175  ///
176  /// @param value
177  /// Value to assign
178  void SetLinkName(const TLinkName& value);
179  void SetLinkName(TLinkName&& value);
180 
181  /// Assign a value to LinkName data member.
182  ///
183  /// @return
184  /// Reference to the data value.
185  TLinkName& SetLinkName(void);
186 
187  /// \S+
188  /// Check if a value has been assigned to MenuTag data member.
189  ///
190  /// Data member MenuTag is optional;
191  /// its type is defined as 'typedef NCBI_NS_STD::string TMenuTag'
192  /// @return
193  /// - true, if a value has been assigned.
194  /// - false, otherwise.
195  bool IsSetMenuTag(void) const;
196 
197  /// Check if it is safe to call GetMenuTag method.
198  ///
199  /// @return
200  /// - true, if the data member is getatable.
201  /// - false, otherwise.
202  bool CanGetMenuTag(void) const;
203 
204  /// Reset MenuTag data member.
205  void ResetMenuTag(void);
206 
207  /// Get the MenuTag member data.
208  ///
209  /// @return
210  /// Reference to the member data.
211  const TMenuTag& GetMenuTag(void) const;
212 
213  /// Assign a value to MenuTag data member.
214  ///
215  /// @param value
216  /// Value to assign
217  void SetMenuTag(const TMenuTag& value);
218  void SetMenuTag(TMenuTag&& value);
219 
220  /// Assign a value to MenuTag data member.
221  ///
222  /// @return
223  /// Reference to the data value.
224  TMenuTag& SetMenuTag(void);
225 
226  /// \S+
227  /// Check if a value has been assigned to HtmlTag data member.
228  ///
229  /// Data member HtmlTag is optional;
230  /// its type is defined as 'typedef NCBI_NS_STD::string THtmlTag'
231  /// @return
232  /// - true, if a value has been assigned.
233  /// - false, otherwise.
234  bool IsSetHtmlTag(void) const;
235 
236  /// Check if it is safe to call GetHtmlTag method.
237  ///
238  /// @return
239  /// - true, if the data member is getatable.
240  /// - false, otherwise.
241  bool CanGetHtmlTag(void) const;
242 
243  /// Reset HtmlTag data member.
244  void ResetHtmlTag(void);
245 
246  /// Get the HtmlTag member data.
247  ///
248  /// @return
249  /// Reference to the member data.
250  const THtmlTag& GetHtmlTag(void) const;
251 
252  /// Assign a value to HtmlTag data member.
253  ///
254  /// @param value
255  /// Value to assign
256  void SetHtmlTag(const THtmlTag& value);
257  void SetHtmlTag(THtmlTag&& value);
258 
259  /// Assign a value to HtmlTag data member.
260  ///
261  /// @return
262  /// Reference to the data value.
263  THtmlTag& SetHtmlTag(void);
264 
265  /// cmd=llinks
266  /// \S+
267  /// Check if a value has been assigned to Url data member.
268  ///
269  /// Data member Url is optional;
270  /// its type is defined as 'typedef CUrl TUrl'
271  /// @return
272  /// - true, if a value has been assigned.
273  /// - false, otherwise.
274  bool IsSetUrl(void) const;
275 
276  /// Check if it is safe to call GetUrl method.
277  ///
278  /// @return
279  /// - true, if the data member is getatable.
280  /// - false, otherwise.
281  bool CanGetUrl(void) const;
282 
283  /// Reset Url data member.
284  void ResetUrl(void);
285 
286  /// Get the Url member data.
287  ///
288  /// @return
289  /// Reference to the member data.
290  const TUrl& GetUrl(void) const;
291 
292  /// Assign a value to Url data member.
293  ///
294  /// @param value
295  /// Reference to value.
296  void SetUrl(TUrl& value);
297 
298  /// Assign a value to Url data member.
299  ///
300  /// @return
301  /// Reference to the data value.
302  TUrl& SetUrl(void);
303 
304  /// Assign a value to Url data member.
305  ///
306  /// @param value
307  /// Reference to value.
308  void SetUrl(const NCBI_NS_STD::string& value);
309 
310  /// \S+
311  /// Check if a value has been assigned to Priority data member.
312  ///
313  /// Data member Priority is mandatory;
314  /// its type is defined as 'typedef NCBI_NS_STD::string TPriority'
315  /// @return
316  /// - true, if a value has been assigned.
317  /// - false, otherwise.
318  bool IsSetPriority(void) const;
319 
320  /// Check if it is safe to call GetPriority method.
321  ///
322  /// @return
323  /// - true, if the data member is getatable.
324  /// - false, otherwise.
325  bool CanGetPriority(void) const;
326 
327  /// Reset Priority data member.
328  void ResetPriority(void);
329 
330  /// Get the Priority member data.
331  ///
332  /// @return
333  /// Reference to the member data.
334  const TPriority& GetPriority(void) const;
335 
336  /// Assign a value to Priority data member.
337  ///
338  /// @param value
339  /// Value to assign
340  void SetPriority(const TPriority& value);
341  void SetPriority(TPriority&& value);
342 
343  /// Assign a value to Priority data member.
344  ///
345  /// @return
346  /// Reference to the data value.
347  TPriority& SetPriority(void);
348 
349  /// Reset the whole object
350  virtual void Reset(void);
351 
352 
353 private:
354  // Prohibit copy constructor and assignment operator
357 
358  // data
359  Uint4 m_set_State[1];
364  NCBI_NS_NCBI::CRef< TUrl > m_Url;
366 };
367 
368 /* @} */
369 
370 
371 
372 
373 
374 ///////////////////////////////////////////////////////////
375 ///////////////////// inline methods //////////////////////
376 ///////////////////////////////////////////////////////////
377 inline
379 {
380  return ((m_set_State[0] & 0x3) != 0);
381 }
382 
383 inline
385 {
386  return IsSetDbTo();
387 }
388 
389 inline
391 {
392  if (!CanGetDbTo()) {
393  ThrowUnassigned(0);
394  }
395  return m_DbTo;
396 }
397 
398 inline
400 {
401  m_DbTo = value;
402  m_set_State[0] |= 0x3;
403 }
404 
405 inline
407 {
408  m_DbTo = std::forward<CLinkInfo_Base::TDbTo>(value);
409  m_set_State[0] |= 0x3;
410 }
411 
412 inline
414 {
415 #ifdef _DEBUG
416  if (!IsSetDbTo()) {
417  m_DbTo = UnassignedString();
418  }
419 #endif
420  m_set_State[0] |= 0x1;
421  return m_DbTo;
422 }
423 
424 inline
426 {
427  return ((m_set_State[0] & 0xc) != 0);
428 }
429 
430 inline
432 {
433  return IsSetLinkName();
434 }
435 
436 inline
438 {
439  if (!CanGetLinkName()) {
440  ThrowUnassigned(1);
441  }
442  return m_LinkName;
443 }
444 
445 inline
447 {
448  m_LinkName = value;
449  m_set_State[0] |= 0xc;
450 }
451 
452 inline
454 {
455  m_LinkName = std::forward<CLinkInfo_Base::TLinkName>(value);
456  m_set_State[0] |= 0xc;
457 }
458 
459 inline
461 {
462 #ifdef _DEBUG
463  if (!IsSetLinkName()) {
464  m_LinkName = UnassignedString();
465  }
466 #endif
467  m_set_State[0] |= 0x4;
468  return m_LinkName;
469 }
470 
471 inline
473 {
474  return ((m_set_State[0] & 0x30) != 0);
475 }
476 
477 inline
479 {
480  return IsSetMenuTag();
481 }
482 
483 inline
485 {
486  if (!CanGetMenuTag()) {
487  ThrowUnassigned(2);
488  }
489  return m_MenuTag;
490 }
491 
492 inline
494 {
495  m_MenuTag = value;
496  m_set_State[0] |= 0x30;
497 }
498 
499 inline
501 {
502  m_MenuTag = std::forward<CLinkInfo_Base::TMenuTag>(value);
503  m_set_State[0] |= 0x30;
504 }
505 
506 inline
508 {
509 #ifdef _DEBUG
510  if (!IsSetMenuTag()) {
511  m_MenuTag = UnassignedString();
512  }
513 #endif
514  m_set_State[0] |= 0x10;
515  return m_MenuTag;
516 }
517 
518 inline
520 {
521  return ((m_set_State[0] & 0xc0) != 0);
522 }
523 
524 inline
526 {
527  return IsSetHtmlTag();
528 }
529 
530 inline
532 {
533  if (!CanGetHtmlTag()) {
534  ThrowUnassigned(3);
535  }
536  return m_HtmlTag;
537 }
538 
539 inline
541 {
542  m_HtmlTag = value;
543  m_set_State[0] |= 0xc0;
544 }
545 
546 inline
548 {
549  m_HtmlTag = std::forward<CLinkInfo_Base::THtmlTag>(value);
550  m_set_State[0] |= 0xc0;
551 }
552 
553 inline
555 {
556 #ifdef _DEBUG
557  if (!IsSetHtmlTag()) {
558  m_HtmlTag = UnassignedString();
559  }
560 #endif
561  m_set_State[0] |= 0x40;
562  return m_HtmlTag;
563 }
564 
565 inline
566 bool CLinkInfo_Base::IsSetUrl(void) const
567 {
568  return m_Url.NotEmpty();
569 }
570 
571 inline
573 {
574  return IsSetUrl();
575 }
576 
577 inline
579 {
580  if (!CanGetUrl()) {
581  ThrowUnassigned(4);
582  }
583  return (*m_Url);
584 }
585 
586 inline
588 {
589  return ((m_set_State[0] & 0xc00) != 0);
590 }
591 
592 inline
594 {
595  return IsSetPriority();
596 }
597 
598 inline
600 {
601  if (!CanGetPriority()) {
602  ThrowUnassigned(5);
603  }
604  return m_Priority;
605 }
606 
607 inline
609 {
610  m_Priority = value;
611  m_set_State[0] |= 0xc00;
612 }
613 
614 inline
616 {
617  m_Priority = std::forward<CLinkInfo_Base::TPriority>(value);
618  m_set_State[0] |= 0xc00;
619 }
620 
621 inline
623 {
624 #ifdef _DEBUG
625  if (!IsSetPriority()) {
626  m_Priority = UnassignedString();
627  }
628 #endif
629  m_set_State[0] |= 0x400;
630  return m_Priority;
631 }
632 
633 ///////////////////////////////////////////////////////////
634 ////////////////// end of inline methods //////////////////
635 ///////////////////////////////////////////////////////////
636 
637 
638 
639 
640 
641 END_elink_SCOPE // namespace elink::
642 
643 
644 #endif // elink__OBJTOOLS_EUTILS_ELINK_LINKINFO_BASE_HPP
#define END_elink_SCOPE
Definition: LinkInfo_.hpp:52
#define BEGIN_elink_SCOPE
Definition: LinkInfo_.hpp:51
CLinkInfo_Base –.
Definition: LinkInfo_.hpp:75
CUrl –.
Definition: ncbi_url.hpp:353
string
Definition: cgiapp.hpp:690
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#define NCBI_EUTILS_EXPORT
Definition: ncbi_export.h:1460
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:06 2024 by modify_doxy.py rev. 669887