NCBI C++ ToolKit
Fix_pub_caps_action_.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 Fix_pub_caps_action_.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/macro/macro.asn">macro.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/macro/macro.def">macro.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_MACRO_FIX_PUB_CAPS_ACTION_BASE_HPP
42 #define OBJECTS_MACRO_FIX_PUB_CAPS_ACTION_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // forward declarations
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Macro
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CFix_pub_caps_action_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
79  virtual ~CFix_pub_caps_action_Base(void);
80 
81  // type info
83 
84  // types
85  typedef bool TTitle;
86  typedef bool TAuthors;
87  typedef bool TAffiliation;
88  typedef bool TAffil_country;
89  typedef bool TPunct_only;
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
95  e_title,
96  e_authors,
101  };
103 
104  // getters
105  // setters
106 
107  /// Check if a value has been assigned to Title data member.
108  ///
109  /// Data member Title is optional;
110  /// its type is defined as 'typedef bool TTitle'
111  /// @return
112  /// - true, if a value has been assigned.
113  /// - false, otherwise.
114  bool IsSetTitle(void) const;
115 
116  /// Check if it is safe to call GetTitle method.
117  ///
118  /// @return
119  /// - true, if the data member is getatable.
120  /// - false, otherwise.
121  bool CanGetTitle(void) const;
122 
123  /// Reset Title data member.
124  void ResetTitle(void);
125 
126  /// Get the Title member data.
127  ///
128  /// @return
129  /// Copy of the member data.
130  TTitle GetTitle(void) const;
131 
132  /// Assign a value to Title data member.
133  ///
134  /// @param value
135  /// Value to assign
136  void SetTitle(TTitle value);
137 
138  /// Assign a value to Title data member.
139  ///
140  /// @return
141  /// Reference to the data value.
142  TTitle& SetTitle(void);
143 
144  /// Check if a value has been assigned to Authors data member.
145  ///
146  /// Data member Authors is optional;
147  /// its type is defined as 'typedef bool TAuthors'
148  /// @return
149  /// - true, if a value has been assigned.
150  /// - false, otherwise.
151  bool IsSetAuthors(void) const;
152 
153  /// Check if it is safe to call GetAuthors method.
154  ///
155  /// @return
156  /// - true, if the data member is getatable.
157  /// - false, otherwise.
158  bool CanGetAuthors(void) const;
159 
160  /// Reset Authors data member.
161  void ResetAuthors(void);
162 
163  /// Get the Authors member data.
164  ///
165  /// @return
166  /// Copy of the member data.
167  TAuthors GetAuthors(void) const;
168 
169  /// Assign a value to Authors data member.
170  ///
171  /// @param value
172  /// Value to assign
173  void SetAuthors(TAuthors value);
174 
175  /// Assign a value to Authors data member.
176  ///
177  /// @return
178  /// Reference to the data value.
179  TAuthors& SetAuthors(void);
180 
181  /// Check if a value has been assigned to Affiliation data member.
182  ///
183  /// Data member Affiliation is optional;
184  /// its type is defined as 'typedef bool TAffiliation'
185  /// @return
186  /// - true, if a value has been assigned.
187  /// - false, otherwise.
188  bool IsSetAffiliation(void) const;
189 
190  /// Check if it is safe to call GetAffiliation method.
191  ///
192  /// @return
193  /// - true, if the data member is getatable.
194  /// - false, otherwise.
195  bool CanGetAffiliation(void) const;
196 
197  /// Reset Affiliation data member.
198  void ResetAffiliation(void);
199 
200  /// Get the Affiliation member data.
201  ///
202  /// @return
203  /// Copy of the member data.
204  TAffiliation GetAffiliation(void) const;
205 
206  /// Assign a value to Affiliation data member.
207  ///
208  /// @param value
209  /// Value to assign
211 
212  /// Assign a value to Affiliation data member.
213  ///
214  /// @return
215  /// Reference to the data value.
217 
218  /// Check if a value has been assigned to Affil_country data member.
219  ///
220  /// Data member Affil_country is optional;
221  /// its type is defined as 'typedef bool TAffil_country'
222  /// @return
223  /// - true, if a value has been assigned.
224  /// - false, otherwise.
225  bool IsSetAffil_country(void) const;
226 
227  /// Check if it is safe to call GetAffil_country method.
228  ///
229  /// @return
230  /// - true, if the data member is getatable.
231  /// - false, otherwise.
232  bool CanGetAffil_country(void) const;
233 
234  /// Reset Affil_country data member.
235  void ResetAffil_country(void);
236 
237  /// Get the Affil_country member data.
238  ///
239  /// @return
240  /// Copy of the member data.
241  TAffil_country GetAffil_country(void) const;
242 
243  /// Assign a value to Affil_country data member.
244  ///
245  /// @param value
246  /// Value to assign
248 
249  /// Assign a value to Affil_country data member.
250  ///
251  /// @return
252  /// Reference to the data value.
254 
255  /// Check if a value has been assigned to Punct_only data member.
256  ///
257  /// Data member Punct_only is optional with default false;
258  /// its type is defined as 'typedef bool TPunct_only'
259  /// @return
260  /// - true, if a value has been assigned.
261  /// - false, otherwise.
262  bool IsSetPunct_only(void) const;
263 
264  /// Check if it is safe to call GetPunct_only method.
265  ///
266  /// @return
267  /// - true, if the data member is getatable.
268  /// - false, otherwise.
269  bool CanGetPunct_only(void) const;
270 
271  /// Reset Punct_only data member.
272  void ResetPunct_only(void);
273 
274  /// Assign default value to Punct_only data member.
275  void SetDefaultPunct_only(void);
276 
277  /// Get the Punct_only member data.
278  ///
279  /// @return
280  /// Copy of the member data.
281  TPunct_only GetPunct_only(void) const;
282 
283  /// Assign a value to Punct_only data member.
284  ///
285  /// @param value
286  /// Value to assign
288 
289  /// Assign a value to Punct_only data member.
290  ///
291  /// @return
292  /// Reference to the data value.
293  TPunct_only& SetPunct_only(void);
294 
295  /// Check if a value has been assigned to Constraint data member.
296  ///
297  /// Data member Constraint is optional;
298  /// its type is defined as 'typedef CConstraint_choice_set TConstraint'
299  /// @return
300  /// - true, if a value has been assigned.
301  /// - false, otherwise.
302  bool IsSetConstraint(void) const;
303 
304  /// Check if it is safe to call GetConstraint method.
305  ///
306  /// @return
307  /// - true, if the data member is getatable.
308  /// - false, otherwise.
309  bool CanGetConstraint(void) const;
310 
311  /// Reset Constraint data member.
312  void ResetConstraint(void);
313 
314  /// Get the Constraint member data.
315  ///
316  /// @return
317  /// Reference to the member data.
318  const TConstraint& GetConstraint(void) const;
319 
320  /// Assign a value to Constraint data member.
321  ///
322  /// @param value
323  /// Reference to value.
325 
326  /// Assign a value to Constraint data member.
327  ///
328  /// @return
329  /// Reference to the data value.
330  TConstraint& SetConstraint(void);
331 
332  /// Reset the whole object
333  virtual void Reset(void);
334 
335 
336 private:
337  // Prohibit copy constructor and assignment operator
340 
341  // data
343  bool m_Title;
344  bool m_Authors;
349 };
350 
351 /* @} */
352 
353 
354 
355 
356 
357 ///////////////////////////////////////////////////////////
358 ///////////////////// inline methods //////////////////////
359 ///////////////////////////////////////////////////////////
360 inline
362 {
363  return ((m_set_State[0] & 0x3) != 0);
364 }
365 
366 inline
368 {
369  return IsSetTitle();
370 }
371 
372 inline
374 {
375  m_Title = 0;
376  m_set_State[0] &= ~0x3;
377 }
378 
379 inline
381 {
382  if (!CanGetTitle()) {
383  ThrowUnassigned(0);
384  }
385  return m_Title;
386 }
387 
388 inline
390 {
391  m_Title = value;
392  m_set_State[0] |= 0x3;
393 }
394 
395 inline
397 {
398 #ifdef _DEBUG
399  if (!IsSetTitle()) {
400  memset(&m_Title,UnassignedByte(),sizeof(m_Title));
401  }
402 #endif
403  m_set_State[0] |= 0x1;
404  return m_Title;
405 }
406 
407 inline
409 {
410  return ((m_set_State[0] & 0xc) != 0);
411 }
412 
413 inline
415 {
416  return IsSetAuthors();
417 }
418 
419 inline
421 {
422  m_Authors = 0;
423  m_set_State[0] &= ~0xc;
424 }
425 
426 inline
428 {
429  if (!CanGetAuthors()) {
430  ThrowUnassigned(1);
431  }
432  return m_Authors;
433 }
434 
435 inline
437 {
438  m_Authors = value;
439  m_set_State[0] |= 0xc;
440 }
441 
442 inline
444 {
445 #ifdef _DEBUG
446  if (!IsSetAuthors()) {
447  memset(&m_Authors,UnassignedByte(),sizeof(m_Authors));
448  }
449 #endif
450  m_set_State[0] |= 0x4;
451  return m_Authors;
452 }
453 
454 inline
456 {
457  return ((m_set_State[0] & 0x30) != 0);
458 }
459 
460 inline
462 {
463  return IsSetAffiliation();
464 }
465 
466 inline
468 {
469  m_Affiliation = 0;
470  m_set_State[0] &= ~0x30;
471 }
472 
473 inline
475 {
476  if (!CanGetAffiliation()) {
477  ThrowUnassigned(2);
478  }
479  return m_Affiliation;
480 }
481 
482 inline
484 {
486  m_set_State[0] |= 0x30;
487 }
488 
489 inline
491 {
492 #ifdef _DEBUG
493  if (!IsSetAffiliation()) {
494  memset(&m_Affiliation,UnassignedByte(),sizeof(m_Affiliation));
495  }
496 #endif
497  m_set_State[0] |= 0x10;
498  return m_Affiliation;
499 }
500 
501 inline
503 {
504  return ((m_set_State[0] & 0xc0) != 0);
505 }
506 
507 inline
509 {
510  return IsSetAffil_country();
511 }
512 
513 inline
515 {
516  m_Affil_country = 0;
517  m_set_State[0] &= ~0xc0;
518 }
519 
520 inline
522 {
523  if (!CanGetAffil_country()) {
524  ThrowUnassigned(3);
525  }
526  return m_Affil_country;
527 }
528 
529 inline
531 {
533  m_set_State[0] |= 0xc0;
534 }
535 
536 inline
538 {
539 #ifdef _DEBUG
540  if (!IsSetAffil_country()) {
542  }
543 #endif
544  m_set_State[0] |= 0x40;
545  return m_Affil_country;
546 }
547 
548 inline
550 {
551  return ((m_set_State[0] & 0x300) != 0);
552 }
553 
554 inline
556 {
557  return true;
558 }
559 
560 inline
562 {
563  m_Punct_only = false;
564  m_set_State[0] &= ~0x300;
565 }
566 
567 inline
569 {
570  ResetPunct_only();
571 }
572 
573 inline
575 {
576  return m_Punct_only;
577 }
578 
579 inline
581 {
583  m_set_State[0] |= 0x300;
584 }
585 
586 inline
588 {
589 #ifdef _DEBUG
590  if (!IsSetPunct_only()) {
591  memset(&m_Punct_only,UnassignedByte(),sizeof(m_Punct_only));
592  }
593 #endif
594  m_set_State[0] |= 0x100;
595  return m_Punct_only;
596 }
597 
598 inline
600 {
601  return m_Constraint.NotEmpty();
602 }
603 
604 inline
606 {
607  return IsSetConstraint();
608 }
609 
610 inline
612 {
613  if (!CanGetConstraint()) {
614  ThrowUnassigned(5);
615  }
616  return (*m_Constraint);
617 }
618 
619 ///////////////////////////////////////////////////////////
620 ////////////////// end of inline methods //////////////////
621 ///////////////////////////////////////////////////////////
622 
623 
624 
625 
626 
627 END_objects_SCOPE // namespace ncbi::objects::
628 
630 
631 
632 #endif // OBJECTS_MACRO_FIX_PUB_CAPS_ACTION_BASE_HPP
CFix_pub_caps_action_Base –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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
TAffil_country & SetAffil_country(void)
Assign a value to Affil_country data member.
bool IsSetConstraint(void) const
Check if a value has been assigned to Constraint data member.
TAffiliation GetAffiliation(void) const
Get the Affiliation member data.
bool CanGetAffil_country(void) const
Check if it is safe to call GetAffil_country method.
Tparent::CMemberIndex< E_memberIndex, 7 > TmemberIndex
bool IsSetTitle(void) const
Check if a value has been assigned to Title data member.
TAuthors GetAuthors(void) const
Get the Authors member data.
TAffil_country GetAffil_country(void) const
Get the Affil_country member data.
void ResetAffiliation(void)
Reset Affiliation data member.
bool IsSetAuthors(void) const
Check if a value has been assigned to Authors data member.
bool IsSetAffiliation(void) const
Check if a value has been assigned to Affiliation data member.
TAffiliation & SetAffiliation(void)
Assign a value to Affiliation data member.
bool IsSetPunct_only(void) const
Check if a value has been assigned to Punct_only data member.
const TConstraint & GetConstraint(void) const
Get the Constraint member data.
TPunct_only & SetPunct_only(void)
Assign a value to Punct_only data member.
TTitle & SetTitle(void)
Assign a value to Title data member.
void ResetAffil_country(void)
Reset Affil_country data member.
void ResetTitle(void)
Reset Title data member.
void ResetConstraint(void)
Reset Constraint data member.
TTitle GetTitle(void) const
Get the Title member data.
void SetDefaultPunct_only(void)
Assign default value to Punct_only data member.
bool CanGetConstraint(void) const
Check if it is safe to call GetConstraint method.
bool CanGetPunct_only(void) const
Check if it is safe to call GetPunct_only method.
TAuthors & SetAuthors(void)
Assign a value to Authors data member.
CConstraint_choice_set TConstraint
bool IsSetAffil_country(void) const
Check if a value has been assigned to Affil_country data member.
void ResetPunct_only(void)
Reset Punct_only data member.
bool CanGetTitle(void) const
Check if it is safe to call GetTitle method.
void ResetAuthors(void)
Reset Authors data member.
bool CanGetAuthors(void) const
Check if it is safe to call GetAuthors method.
TConstraint & SetConstraint(void)
Assign a value to Constraint data member.
CFix_pub_caps_action_Base(const CFix_pub_caps_action_Base &)
virtual void Reset(void)
Reset the whole object.
bool CanGetAffiliation(void) const
Check if it is safe to call GetAffiliation method.
CFix_pub_caps_action_Base & operator=(const CFix_pub_caps_action_Base &)
TPunct_only GetPunct_only(void) const
Get the Punct_only member data.
Modified on Mon Mar 04 05:09:50 2024 by modify_doxy.py rev. 669887