NCBI C++ ToolKit
Annotation_.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 Annotation_.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/efetch/pubmed_mathml3.xsd">pubmed_mathml3.xsd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/efetch/pubmed_mathml3.def">pubmed_mathml3.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 OBJTOOLS_EUTILS_EFETCH_ANNOTATION_BASE_HPP
42 #define OBJTOOLS_EUTILS_EFETCH_ANNOTATION_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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 // generated classes
60 
61 
62 /** @addtogroup dataspec_pubmed_mathml3
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CAnnotation_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CAnnotation_Base(void);
78  // destructor
79  virtual ~CAnnotation_Base(void);
80 
81  // type info
83 
84  /////////////////////////////////////////////////////////////////////////////
85  ///
86  /// C_Attlist --
87  ///
88 
89  class C_Attlist : public CSerialObject
90  {
92  public:
93  // constructor
94  C_Attlist(void);
95  // destructor
96  ~C_Attlist(void);
97 
98  // type info
100 
101  // types
102  typedef string TId;
103  typedef string TXref;
104  typedef string TClass;
105  typedef string TStyle;
106  typedef string THref;
107  typedef string TCd;
108  typedef string TName;
109  typedef string TEncoding;
110  typedef string TDefinitionURL;
111  typedef string TSrc;
112 
113  // member index
114  enum class E_memberIndex {
115  e__allMandatory = 0,
116  e_id,
117  e_xref,
118  e_class,
119  e_style,
120  e_href,
121  e_cd,
122  e_name,
123  e_encoding,
125  e_src
126  };
128 
129  // getters
130  // setters
131 
132  /// Check if a value has been assigned to Id data member.
133  ///
134  /// Data member Id is optional;
135  /// its type is defined as 'typedef string TId'
136  /// @return
137  /// - true, if a value has been assigned.
138  /// - false, otherwise.
139  bool IsSetId(void) const;
140 
141  /// Check if it is safe to call GetId method.
142  ///
143  /// @return
144  /// - true, if the data member is getatable.
145  /// - false, otherwise.
146  bool CanGetId(void) const;
147 
148  /// Reset Id data member.
149  void ResetId(void);
150 
151  /// Get the Id member data.
152  ///
153  /// @return
154  /// Reference to the member data.
155  const TId& GetId(void) const;
156 
157  /// Assign a value to Id data member.
158  ///
159  /// @param value
160  /// Value to assign
161  void SetId(const TId& value);
162  void SetId(TId&& value);
163 
164  /// Assign a value to Id data member.
165  ///
166  /// @return
167  /// Reference to the data value.
168  TId& SetId(void);
169 
170  /// Check if a value has been assigned to Xref data member.
171  ///
172  /// Data member Xref is optional;
173  /// its type is defined as 'typedef string TXref'
174  /// @return
175  /// - true, if a value has been assigned.
176  /// - false, otherwise.
177  bool IsSetXref(void) const;
178 
179  /// Check if it is safe to call GetXref method.
180  ///
181  /// @return
182  /// - true, if the data member is getatable.
183  /// - false, otherwise.
184  bool CanGetXref(void) const;
185 
186  /// Reset Xref data member.
187  void ResetXref(void);
188 
189  /// Get the Xref member data.
190  ///
191  /// @return
192  /// Reference to the member data.
193  const TXref& GetXref(void) const;
194 
195  /// Assign a value to Xref data member.
196  ///
197  /// @param value
198  /// Value to assign
199  void SetXref(const TXref& value);
200  void SetXref(TXref&& value);
201 
202  /// Assign a value to Xref data member.
203  ///
204  /// @return
205  /// Reference to the data value.
206  TXref& SetXref(void);
207 
208  /// Check if a value has been assigned to Class data member.
209  ///
210  /// Data member Class is optional;
211  /// its type is defined as 'typedef string TClass'
212  /// @return
213  /// - true, if a value has been assigned.
214  /// - false, otherwise.
215  bool IsSetClass(void) const;
216 
217  /// Check if it is safe to call GetClass method.
218  ///
219  /// @return
220  /// - true, if the data member is getatable.
221  /// - false, otherwise.
222  bool CanGetClass(void) const;
223 
224  /// Reset Class data member.
225  void ResetClass(void);
226 
227  /// Get the Class member data.
228  ///
229  /// @return
230  /// Reference to the member data.
231  const TClass& GetClass(void) const;
232 
233  /// Assign a value to Class data member.
234  ///
235  /// @param value
236  /// Value to assign
237  void SetClass(const TClass& value);
238  void SetClass(TClass&& value);
239 
240  /// Assign a value to Class data member.
241  ///
242  /// @return
243  /// Reference to the data value.
244  TClass& SetClass(void);
245 
246  /// Check if a value has been assigned to Style data member.
247  ///
248  /// Data member Style is optional;
249  /// its type is defined as 'typedef string TStyle'
250  /// @return
251  /// - true, if a value has been assigned.
252  /// - false, otherwise.
253  bool IsSetStyle(void) const;
254 
255  /// Check if it is safe to call GetStyle method.
256  ///
257  /// @return
258  /// - true, if the data member is getatable.
259  /// - false, otherwise.
260  bool CanGetStyle(void) const;
261 
262  /// Reset Style data member.
263  void ResetStyle(void);
264 
265  /// Get the Style member data.
266  ///
267  /// @return
268  /// Reference to the member data.
269  const TStyle& GetStyle(void) const;
270 
271  /// Assign a value to Style data member.
272  ///
273  /// @param value
274  /// Value to assign
275  void SetStyle(const TStyle& value);
276  void SetStyle(TStyle&& value);
277 
278  /// Assign a value to Style data member.
279  ///
280  /// @return
281  /// Reference to the data value.
282  TStyle& SetStyle(void);
283 
284  /// Check if a value has been assigned to Href data member.
285  ///
286  /// Data member Href is optional;
287  /// its type is defined as 'typedef string THref'
288  /// @return
289  /// - true, if a value has been assigned.
290  /// - false, otherwise.
291  bool IsSetHref(void) const;
292 
293  /// Check if it is safe to call GetHref method.
294  ///
295  /// @return
296  /// - true, if the data member is getatable.
297  /// - false, otherwise.
298  bool CanGetHref(void) const;
299 
300  /// Reset Href data member.
301  void ResetHref(void);
302 
303  /// Get the Href member data.
304  ///
305  /// @return
306  /// Reference to the member data.
307  const THref& GetHref(void) const;
308 
309  /// Assign a value to Href data member.
310  ///
311  /// @param value
312  /// Value to assign
313  void SetHref(const THref& value);
314  void SetHref(THref&& value);
315 
316  /// Assign a value to Href data member.
317  ///
318  /// @return
319  /// Reference to the data value.
320  THref& SetHref(void);
321 
322  /// Check if a value has been assigned to Cd data member.
323  ///
324  /// Data member Cd is optional;
325  /// its type is defined as 'typedef string TCd'
326  /// @return
327  /// - true, if a value has been assigned.
328  /// - false, otherwise.
329  bool IsSetCd(void) const;
330 
331  /// Check if it is safe to call GetCd method.
332  ///
333  /// @return
334  /// - true, if the data member is getatable.
335  /// - false, otherwise.
336  bool CanGetCd(void) const;
337 
338  /// Reset Cd data member.
339  void ResetCd(void);
340 
341  /// Get the Cd member data.
342  ///
343  /// @return
344  /// Reference to the member data.
345  const TCd& GetCd(void) const;
346 
347  /// Assign a value to Cd data member.
348  ///
349  /// @param value
350  /// Value to assign
351  void SetCd(const TCd& value);
352  void SetCd(TCd&& value);
353 
354  /// Assign a value to Cd data member.
355  ///
356  /// @return
357  /// Reference to the data value.
358  TCd& SetCd(void);
359 
360  /// Check if a value has been assigned to Name data member.
361  ///
362  /// Data member Name is optional;
363  /// its type is defined as 'typedef string TName'
364  /// @return
365  /// - true, if a value has been assigned.
366  /// - false, otherwise.
367  bool IsSetName(void) const;
368 
369  /// Check if it is safe to call GetName method.
370  ///
371  /// @return
372  /// - true, if the data member is getatable.
373  /// - false, otherwise.
374  bool CanGetName(void) const;
375 
376  /// Reset Name data member.
377  void ResetName(void);
378 
379  /// Get the Name member data.
380  ///
381  /// @return
382  /// Reference to the member data.
383  const TName& GetName(void) const;
384 
385  /// Assign a value to Name data member.
386  ///
387  /// @param value
388  /// Value to assign
389  void SetName(const TName& value);
390  void SetName(TName&& value);
391 
392  /// Assign a value to Name data member.
393  ///
394  /// @return
395  /// Reference to the data value.
396  TName& SetName(void);
397 
398  /// Check if a value has been assigned to Encoding data member.
399  ///
400  /// Data member Encoding is optional;
401  /// its type is defined as 'typedef string TEncoding'
402  /// @return
403  /// - true, if a value has been assigned.
404  /// - false, otherwise.
405  bool IsSetEncoding(void) const;
406 
407  /// Check if it is safe to call GetEncoding method.
408  ///
409  /// @return
410  /// - true, if the data member is getatable.
411  /// - false, otherwise.
412  bool CanGetEncoding(void) const;
413 
414  /// Reset Encoding data member.
415  void ResetEncoding(void);
416 
417  /// Get the Encoding member data.
418  ///
419  /// @return
420  /// Reference to the member data.
421  const TEncoding& GetEncoding(void) const;
422 
423  /// Assign a value to Encoding data member.
424  ///
425  /// @param value
426  /// Value to assign
427  void SetEncoding(const TEncoding& value);
428  void SetEncoding(TEncoding&& value);
429 
430  /// Assign a value to Encoding data member.
431  ///
432  /// @return
433  /// Reference to the data value.
434  TEncoding& SetEncoding(void);
435 
436  /// Check if a value has been assigned to DefinitionURL data member.
437  ///
438  /// Data member DefinitionURL is optional;
439  /// its type is defined as 'typedef string TDefinitionURL'
440  /// @return
441  /// - true, if a value has been assigned.
442  /// - false, otherwise.
443  bool IsSetDefinitionURL(void) const;
444 
445  /// Check if it is safe to call GetDefinitionURL method.
446  ///
447  /// @return
448  /// - true, if the data member is getatable.
449  /// - false, otherwise.
450  bool CanGetDefinitionURL(void) const;
451 
452  /// Reset DefinitionURL data member.
453  void ResetDefinitionURL(void);
454 
455  /// Get the DefinitionURL member data.
456  ///
457  /// @return
458  /// Reference to the member data.
459  const TDefinitionURL& GetDefinitionURL(void) const;
460 
461  /// Assign a value to DefinitionURL data member.
462  ///
463  /// @param value
464  /// Value to assign
467 
468  /// Assign a value to DefinitionURL data member.
469  ///
470  /// @return
471  /// Reference to the data value.
473 
474  /// Check if a value has been assigned to Src data member.
475  ///
476  /// Data member Src is optional;
477  /// its type is defined as 'typedef string TSrc'
478  /// @return
479  /// - true, if a value has been assigned.
480  /// - false, otherwise.
481  bool IsSetSrc(void) const;
482 
483  /// Check if it is safe to call GetSrc method.
484  ///
485  /// @return
486  /// - true, if the data member is getatable.
487  /// - false, otherwise.
488  bool CanGetSrc(void) const;
489 
490  /// Reset Src data member.
491  void ResetSrc(void);
492 
493  /// Get the Src member data.
494  ///
495  /// @return
496  /// Reference to the member data.
497  const TSrc& GetSrc(void) const;
498 
499  /// Assign a value to Src data member.
500  ///
501  /// @param value
502  /// Value to assign
503  void SetSrc(const TSrc& value);
504  void SetSrc(TSrc&& value);
505 
506  /// Assign a value to Src data member.
507  ///
508  /// @return
509  /// Reference to the data value.
510  TSrc& SetSrc(void);
511 
512  /// Reset the whole object
513  void Reset(void);
514 
515 
516  private:
517  // Prohibit copy constructor and assignment operator
520 
521  // data
523  string m_Id;
524  string m_Xref;
525  string m_Class;
526  string m_Style;
527  string m_Href;
528  string m_Cd;
529  string m_Name;
530  string m_Encoding;
532  string m_Src;
533  };
534  // types
536  typedef string TAnnotation;
537 
538  // member index
539  enum class E_memberIndex {
540  e__allMandatory = 0,
541  e_Attlist,
543  };
545 
546  // getters
547  // setters
548 
549  /// Check if a value has been assigned to Attlist data member.
550  ///
551  /// Data member Attlist is mandatory;
552  /// its type is defined as 'typedef C_Attlist TAttlist'
553  /// @return
554  /// - true, if a value has been assigned.
555  /// - false, otherwise.
556  bool IsSetAttlist(void) const;
557 
558  /// Check if it is safe to call GetAttlist method.
559  ///
560  /// @return
561  /// - true, if the data member is getatable.
562  /// - false, otherwise.
563  bool CanGetAttlist(void) const;
564 
565  /// Reset Attlist data member.
566  void ResetAttlist(void);
567 
568  /// Get the Attlist member data.
569  ///
570  /// @return
571  /// Reference to the member data.
572  const TAttlist& GetAttlist(void) const;
573 
574  /// Assign a value to Attlist data member.
575  ///
576  /// @param value
577  /// Reference to value.
578  void SetAttlist(TAttlist& value);
579 
580  /// Assign a value to Attlist data member.
581  ///
582  /// @return
583  /// Reference to the data value.
584  TAttlist& SetAttlist(void);
585 
586  /// Check if a value has been assigned to Annotation data member.
587  ///
588  /// Data member Annotation is mandatory;
589  /// its type is defined as 'typedef string TAnnotation'
590  /// @return
591  /// - true, if a value has been assigned.
592  /// - false, otherwise.
593  bool IsSetAnnotation(void) const;
594 
595  /// Check if it is safe to call GetAnnotation method.
596  ///
597  /// @return
598  /// - true, if the data member is getatable.
599  /// - false, otherwise.
600  bool CanGetAnnotation(void) const;
601 
602  /// Reset Annotation data member.
603  void ResetAnnotation(void);
604 
605  /// Get the Annotation member data.
606  ///
607  /// @return
608  /// Reference to the member data.
609  const TAnnotation& GetAnnotation(void) const;
610 
611  /// Assign a value to Annotation data member.
612  ///
613  /// @param value
614  /// Value to assign
615  void SetAnnotation(const TAnnotation& value);
617 
618  /// Assign a value to Annotation data member.
619  ///
620  /// @return
621  /// Reference to the data value.
622  TAnnotation& SetAnnotation(void);
623 
624  /// Reset the whole object
625  virtual void Reset(void);
626 
627 
628 private:
629  // Prohibit copy constructor and assignment operator
632 
633  // data
636  string m_Annotation;
637 };
638 
639 /* @} */
640 
641 
642 
643 
644 
645 ///////////////////////////////////////////////////////////
646 ///////////////////// inline methods //////////////////////
647 ///////////////////////////////////////////////////////////
648 inline
650 {
651  return ((m_set_State[0] & 0x3) != 0);
652 }
653 
654 inline
656 {
657  return IsSetId();
658 }
659 
660 inline
662 {
663  if (!CanGetId()) {
664  ThrowUnassigned(0);
665  }
666  return m_Id;
667 }
668 
669 inline
671 {
672  m_Id = value;
673  m_set_State[0] |= 0x3;
674 }
675 
676 inline
678 {
679  m_Id = std::forward<CAnnotation_Base::C_Attlist::TId>(value);
680  m_set_State[0] |= 0x3;
681 }
682 
683 inline
685 {
686 #ifdef _DEBUG
687  if (!IsSetId()) {
688  m_Id = UnassignedString();
689  }
690 #endif
691  m_set_State[0] |= 0x1;
692  return m_Id;
693 }
694 
695 inline
697 {
698  return ((m_set_State[0] & 0xc) != 0);
699 }
700 
701 inline
703 {
704  return IsSetXref();
705 }
706 
707 inline
709 {
710  if (!CanGetXref()) {
711  ThrowUnassigned(1);
712  }
713  return m_Xref;
714 }
715 
716 inline
718 {
719  m_Xref = value;
720  m_set_State[0] |= 0xc;
721 }
722 
723 inline
725 {
726  m_Xref = std::forward<CAnnotation_Base::C_Attlist::TXref>(value);
727  m_set_State[0] |= 0xc;
728 }
729 
730 inline
732 {
733 #ifdef _DEBUG
734  if (!IsSetXref()) {
735  m_Xref = UnassignedString();
736  }
737 #endif
738  m_set_State[0] |= 0x4;
739  return m_Xref;
740 }
741 
742 inline
744 {
745  return ((m_set_State[0] & 0x30) != 0);
746 }
747 
748 inline
750 {
751  return IsSetClass();
752 }
753 
754 inline
756 {
757  if (!CanGetClass()) {
758  ThrowUnassigned(2);
759  }
760  return m_Class;
761 }
762 
763 inline
765 {
766  m_Class = value;
767  m_set_State[0] |= 0x30;
768 }
769 
770 inline
772 {
773  m_Class = std::forward<CAnnotation_Base::C_Attlist::TClass>(value);
774  m_set_State[0] |= 0x30;
775 }
776 
777 inline
779 {
780 #ifdef _DEBUG
781  if (!IsSetClass()) {
782  m_Class = UnassignedString();
783  }
784 #endif
785  m_set_State[0] |= 0x10;
786  return m_Class;
787 }
788 
789 inline
791 {
792  return ((m_set_State[0] & 0xc0) != 0);
793 }
794 
795 inline
797 {
798  return IsSetStyle();
799 }
800 
801 inline
803 {
804  if (!CanGetStyle()) {
805  ThrowUnassigned(3);
806  }
807  return m_Style;
808 }
809 
810 inline
812 {
813  m_Style = value;
814  m_set_State[0] |= 0xc0;
815 }
816 
817 inline
819 {
820  m_Style = std::forward<CAnnotation_Base::C_Attlist::TStyle>(value);
821  m_set_State[0] |= 0xc0;
822 }
823 
824 inline
826 {
827 #ifdef _DEBUG
828  if (!IsSetStyle()) {
829  m_Style = UnassignedString();
830  }
831 #endif
832  m_set_State[0] |= 0x40;
833  return m_Style;
834 }
835 
836 inline
838 {
839  return ((m_set_State[0] & 0x300) != 0);
840 }
841 
842 inline
844 {
845  return IsSetHref();
846 }
847 
848 inline
850 {
851  if (!CanGetHref()) {
852  ThrowUnassigned(4);
853  }
854  return m_Href;
855 }
856 
857 inline
859 {
860  m_Href = value;
861  m_set_State[0] |= 0x300;
862 }
863 
864 inline
866 {
867  m_Href = std::forward<CAnnotation_Base::C_Attlist::THref>(value);
868  m_set_State[0] |= 0x300;
869 }
870 
871 inline
873 {
874 #ifdef _DEBUG
875  if (!IsSetHref()) {
876  m_Href = UnassignedString();
877  }
878 #endif
879  m_set_State[0] |= 0x100;
880  return m_Href;
881 }
882 
883 inline
885 {
886  return ((m_set_State[0] & 0xc00) != 0);
887 }
888 
889 inline
891 {
892  return IsSetCd();
893 }
894 
895 inline
897 {
898  if (!CanGetCd()) {
899  ThrowUnassigned(5);
900  }
901  return m_Cd;
902 }
903 
904 inline
906 {
907  m_Cd = value;
908  m_set_State[0] |= 0xc00;
909 }
910 
911 inline
913 {
914  m_Cd = std::forward<CAnnotation_Base::C_Attlist::TCd>(value);
915  m_set_State[0] |= 0xc00;
916 }
917 
918 inline
920 {
921 #ifdef _DEBUG
922  if (!IsSetCd()) {
923  m_Cd = UnassignedString();
924  }
925 #endif
926  m_set_State[0] |= 0x400;
927  return m_Cd;
928 }
929 
930 inline
932 {
933  return ((m_set_State[0] & 0x3000) != 0);
934 }
935 
936 inline
938 {
939  return IsSetName();
940 }
941 
942 inline
944 {
945  if (!CanGetName()) {
946  ThrowUnassigned(6);
947  }
948  return m_Name;
949 }
950 
951 inline
953 {
954  m_Name = value;
955  m_set_State[0] |= 0x3000;
956 }
957 
958 inline
960 {
961  m_Name = std::forward<CAnnotation_Base::C_Attlist::TName>(value);
962  m_set_State[0] |= 0x3000;
963 }
964 
965 inline
967 {
968 #ifdef _DEBUG
969  if (!IsSetName()) {
970  m_Name = UnassignedString();
971  }
972 #endif
973  m_set_State[0] |= 0x1000;
974  return m_Name;
975 }
976 
977 inline
979 {
980  return ((m_set_State[0] & 0xc000) != 0);
981 }
982 
983 inline
985 {
986  return IsSetEncoding();
987 }
988 
989 inline
991 {
992  if (!CanGetEncoding()) {
993  ThrowUnassigned(7);
994  }
995  return m_Encoding;
996 }
997 
998 inline
1000 {
1001  m_Encoding = value;
1002  m_set_State[0] |= 0xc000;
1003 }
1004 
1005 inline
1007 {
1008  m_Encoding = std::forward<CAnnotation_Base::C_Attlist::TEncoding>(value);
1009  m_set_State[0] |= 0xc000;
1010 }
1011 
1012 inline
1014 {
1015 #ifdef _DEBUG
1016  if (!IsSetEncoding()) {
1017  m_Encoding = UnassignedString();
1018  }
1019 #endif
1020  m_set_State[0] |= 0x4000;
1021  return m_Encoding;
1022 }
1023 
1024 inline
1026 {
1027  return ((m_set_State[0] & 0x30000) != 0);
1028 }
1029 
1030 inline
1032 {
1033  return IsSetDefinitionURL();
1034 }
1035 
1036 inline
1038 {
1039  if (!CanGetDefinitionURL()) {
1040  ThrowUnassigned(8);
1041  }
1042  return m_DefinitionURL;
1043 }
1044 
1045 inline
1047 {
1048  m_DefinitionURL = value;
1049  m_set_State[0] |= 0x30000;
1050 }
1051 
1052 inline
1054 {
1055  m_DefinitionURL = std::forward<CAnnotation_Base::C_Attlist::TDefinitionURL>(value);
1056  m_set_State[0] |= 0x30000;
1057 }
1058 
1059 inline
1061 {
1062 #ifdef _DEBUG
1063  if (!IsSetDefinitionURL()) {
1064  m_DefinitionURL = UnassignedString();
1065  }
1066 #endif
1067  m_set_State[0] |= 0x10000;
1068  return m_DefinitionURL;
1069 }
1070 
1071 inline
1073 {
1074  return ((m_set_State[0] & 0xc0000) != 0);
1075 }
1076 
1077 inline
1079 {
1080  return IsSetSrc();
1081 }
1082 
1083 inline
1085 {
1086  if (!CanGetSrc()) {
1087  ThrowUnassigned(9);
1088  }
1089  return m_Src;
1090 }
1091 
1092 inline
1094 {
1095  m_Src = value;
1096  m_set_State[0] |= 0xc0000;
1097 }
1098 
1099 inline
1101 {
1102  m_Src = std::forward<CAnnotation_Base::C_Attlist::TSrc>(value);
1103  m_set_State[0] |= 0xc0000;
1104 }
1105 
1106 inline
1108 {
1109 #ifdef _DEBUG
1110  if (!IsSetSrc()) {
1111  m_Src = UnassignedString();
1112  }
1113 #endif
1114  m_set_State[0] |= 0x40000;
1115  return m_Src;
1116 }
1117 
1118 inline
1120 {
1121  return m_Attlist.NotEmpty();
1122 }
1123 
1124 inline
1126 {
1127  return true;
1128 }
1129 
1130 inline
1132 {
1133  if ( !m_Attlist ) {
1134  const_cast<CAnnotation_Base*>(this)->ResetAttlist();
1135  }
1136  return (*m_Attlist);
1137 }
1138 
1139 inline
1141 {
1142  if ( !m_Attlist ) {
1143  ResetAttlist();
1144  }
1145  return (*m_Attlist);
1146 }
1147 
1148 inline
1150 {
1151  return ((m_set_State[0] & 0xc) != 0);
1152 }
1153 
1154 inline
1156 {
1157  return IsSetAnnotation();
1158 }
1159 
1160 inline
1162 {
1163  if (!CanGetAnnotation()) {
1164  ThrowUnassigned(1);
1165  }
1166  return m_Annotation;
1167 }
1168 
1169 inline
1171 {
1172  m_Annotation = value;
1173  m_set_State[0] |= 0xc;
1174 }
1175 
1176 inline
1178 {
1179  m_Annotation = std::forward<CAnnotation_Base::TAnnotation>(value);
1180  m_set_State[0] |= 0xc;
1181 }
1182 
1183 inline
1185 {
1186 #ifdef _DEBUG
1187  if (!IsSetAnnotation()) {
1189  }
1190 #endif
1191  m_set_State[0] |= 0x4;
1192  return m_Annotation;
1193 }
1194 
1195 ///////////////////////////////////////////////////////////
1196 ////////////////// end of inline methods //////////////////
1197 ///////////////////////////////////////////////////////////
1198 
1199 
1200 
1201 
1202 
1203 END_objects_SCOPE // namespace ncbi::objects::
1204 
1206 
1207 
1208 #endif // OBJTOOLS_EUTILS_EFETCH_ANNOTATION_BASE_HPP
CAnnotation_Base –.
Definition: Annotation_.hpp:73
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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
const THref & GetHref(void) const
Get the Href member data.
Uint4 m_set_State[1]
TId & SetId(void)
Assign a value to Id data member.
void ResetSrc(void)
Reset Src data member.
bool CanGetHref(void) const
Check if it is safe to call GetHref method.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
bool IsSetXref(void) const
Check if a value has been assigned to Xref data member.
void ResetId(void)
Reset Id data member.
Definition: Annotation_.cpp:50
const TName & GetName(void) const
Get the Name member data.
TClass & SetClass(void)
Assign a value to Class data member.
TName & SetName(void)
Assign a value to Name data member.
CRef< TAttlist > m_Attlist
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
TCd & SetCd(void)
Assign a value to Cd data member.
TStyle & SetStyle(void)
Assign a value to Style data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetDefinitionURL(void) const
Check if a value has been assigned to DefinitionURL data member.
bool CanGetStyle(void) const
Check if it is safe to call GetStyle method.
const TCd & GetCd(void) const
Get the Cd member data.
bool IsSetStyle(void) const
Check if a value has been assigned to Style data member.
CAnnotation_Base & operator=(const CAnnotation_Base &)
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
bool IsSetSrc(void) const
Check if a value has been assigned to Src data member.
const TAnnotation & GetAnnotation(void) const
Get the Annotation member data.
bool CanGetSrc(void) const
Check if it is safe to call GetSrc method.
bool CanGetEncoding(void) const
Check if it is safe to call GetEncoding method.
void ResetEncoding(void)
Reset Encoding data member.
Definition: Annotation_.cpp:92
bool CanGetAnnotation(void) const
Check if it is safe to call GetAnnotation method.
const TId & GetId(void) const
Get the Id member data.
bool CanGetXref(void) const
Check if it is safe to call GetXref method.
TAnnotation & SetAnnotation(void)
Assign a value to Annotation data member.
const TStyle & GetStyle(void) const
Get the Style member data.
bool CanGetId(void) const
Check if it is safe to call GetId method.
TXref & SetXref(void)
Assign a value to Xref data member.
void ResetXref(void)
Reset Xref data member.
Definition: Annotation_.cpp:56
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
bool CanGetClass(void) const
Check if it is safe to call GetClass method.
THref & SetHref(void)
Assign a value to Href data member.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
C_Attlist & operator=(const C_Attlist &)
const TXref & GetXref(void) const
Get the Xref member data.
CAnnotation_Base(const CAnnotation_Base &)
const TDefinitionURL & GetDefinitionURL(void) const
Get the DefinitionURL member data.
const TSrc & GetSrc(void) const
Get the Src member data.
void Reset(void)
Reset the whole object.
void ResetAttlist(void)
Reset Attlist data member.
void ResetAnnotation(void)
Reset Annotation data member.
const TClass & GetClass(void) const
Get the Class member data.
bool CanGetName(void) const
Check if it is safe to call GetName method.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
C_Attlist(const C_Attlist &)
TEncoding & SetEncoding(void)
Assign a value to Encoding data member.
bool IsSetEncoding(void) const
Check if a value has been assigned to Encoding data member.
void ResetClass(void)
Reset Class data member.
Definition: Annotation_.cpp:62
bool IsSetAnnotation(void) const
Check if a value has been assigned to Annotation data member.
void ResetDefinitionURL(void)
Reset DefinitionURL data member.
Definition: Annotation_.cpp:98
void ResetName(void)
Reset Name data member.
Definition: Annotation_.cpp:86
C_Attlist TAttlist
TDefinitionURL & SetDefinitionURL(void)
Assign a value to DefinitionURL data member.
void ResetCd(void)
Reset Cd data member.
Definition: Annotation_.cpp:80
virtual ~CAnnotation_Base(void)
CSerialObject Tparent
Definition: Annotation_.hpp:74
bool IsSetHref(void) const
Check if a value has been assigned to Href data member.
TSrc & SetSrc(void)
Assign a value to Src data member.
bool CanGetDefinitionURL(void) const
Check if it is safe to call GetDefinitionURL method.
Tparent::CMemberIndex< E_memberIndex, 11 > TmemberIndex
void ResetHref(void)
Reset Href data member.
Definition: Annotation_.cpp:74
virtual void Reset(void)
Reset the whole object.
bool CanGetCd(void) const
Check if it is safe to call GetCd method.
void ResetStyle(void)
Reset Style data member.
Definition: Annotation_.cpp:68
const TEncoding & GetEncoding(void) const
Get the Encoding member data.
bool IsSetCd(void) const
Check if a value has been assigned to Cd data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Fri Sep 20 14:57:27 2024 by modify_doxy.py rev. 669887