NCBI C++ ToolKit
Text_portion_.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 Text_portion_.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_TEXT_PORTION_BASE_HPP
42 #define OBJECTS_MACRO_TEXT_PORTION_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
56 class CText_marker;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_Macro
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CText_portion_Base --
70 ///
71 
73 {
75 public:
76  // constructor
77  CText_portion_Base(void);
78  // destructor
79  virtual ~CText_portion_Base(void);
80 
81  // type info
83 
84  // types
86  typedef bool TInclude_left;
88  typedef bool TInclude_right;
89  typedef bool TInside;
90  typedef bool TCase_sensitive;
91  typedef bool TWhole_word;
92 
93  // member index
94  enum class E_memberIndex {
95  e__allMandatory = 0,
100  e_inside,
103  };
105 
106  // getters
107  // setters
108 
109  /// Check if a value has been assigned to Left_marker data member.
110  ///
111  /// Data member Left_marker is optional;
112  /// its type is defined as 'typedef CText_marker TLeft_marker'
113  /// @return
114  /// - true, if a value has been assigned.
115  /// - false, otherwise.
116  bool IsSetLeft_marker(void) const;
117 
118  /// Check if it is safe to call GetLeft_marker method.
119  ///
120  /// @return
121  /// - true, if the data member is getatable.
122  /// - false, otherwise.
123  bool CanGetLeft_marker(void) const;
124 
125  /// Reset Left_marker data member.
126  void ResetLeft_marker(void);
127 
128  /// Get the Left_marker member data.
129  ///
130  /// @return
131  /// Reference to the member data.
132  const TLeft_marker& GetLeft_marker(void) const;
133 
134  /// Assign a value to Left_marker data member.
135  ///
136  /// @param value
137  /// Reference to value.
139 
140  /// Assign a value to Left_marker data member.
141  ///
142  /// @return
143  /// Reference to the data value.
145 
146  /// Check if a value has been assigned to Include_left data member.
147  ///
148  /// Data member Include_left is mandatory;
149  /// its type is defined as 'typedef bool TInclude_left'
150  /// @return
151  /// - true, if a value has been assigned.
152  /// - false, otherwise.
153  bool IsSetInclude_left(void) const;
154 
155  /// Check if it is safe to call GetInclude_left method.
156  ///
157  /// @return
158  /// - true, if the data member is getatable.
159  /// - false, otherwise.
160  bool CanGetInclude_left(void) const;
161 
162  /// Reset Include_left data member.
163  void ResetInclude_left(void);
164 
165  /// Get the Include_left member data.
166  ///
167  /// @return
168  /// Copy of the member data.
169  TInclude_left GetInclude_left(void) const;
170 
171  /// Assign a value to Include_left data member.
172  ///
173  /// @param value
174  /// Value to assign
176 
177  /// Assign a value to Include_left data member.
178  ///
179  /// @return
180  /// Reference to the data value.
182 
183  /// Check if a value has been assigned to Right_marker data member.
184  ///
185  /// Data member Right_marker is optional;
186  /// its type is defined as 'typedef CText_marker TRight_marker'
187  /// @return
188  /// - true, if a value has been assigned.
189  /// - false, otherwise.
190  bool IsSetRight_marker(void) const;
191 
192  /// Check if it is safe to call GetRight_marker method.
193  ///
194  /// @return
195  /// - true, if the data member is getatable.
196  /// - false, otherwise.
197  bool CanGetRight_marker(void) const;
198 
199  /// Reset Right_marker data member.
200  void ResetRight_marker(void);
201 
202  /// Get the Right_marker member data.
203  ///
204  /// @return
205  /// Reference to the member data.
206  const TRight_marker& GetRight_marker(void) const;
207 
208  /// Assign a value to Right_marker data member.
209  ///
210  /// @param value
211  /// Reference to value.
213 
214  /// Assign a value to Right_marker data member.
215  ///
216  /// @return
217  /// Reference to the data value.
219 
220  /// Check if a value has been assigned to Include_right data member.
221  ///
222  /// Data member Include_right is mandatory;
223  /// its type is defined as 'typedef bool TInclude_right'
224  /// @return
225  /// - true, if a value has been assigned.
226  /// - false, otherwise.
227  bool IsSetInclude_right(void) const;
228 
229  /// Check if it is safe to call GetInclude_right method.
230  ///
231  /// @return
232  /// - true, if the data member is getatable.
233  /// - false, otherwise.
234  bool CanGetInclude_right(void) const;
235 
236  /// Reset Include_right data member.
237  void ResetInclude_right(void);
238 
239  /// Get the Include_right member data.
240  ///
241  /// @return
242  /// Copy of the member data.
243  TInclude_right GetInclude_right(void) const;
244 
245  /// Assign a value to Include_right data member.
246  ///
247  /// @param value
248  /// Value to assign
250 
251  /// Assign a value to Include_right data member.
252  ///
253  /// @return
254  /// Reference to the data value.
256 
257  /// Check if a value has been assigned to Inside data member.
258  ///
259  /// Data member Inside is mandatory;
260  /// its type is defined as 'typedef bool TInside'
261  /// @return
262  /// - true, if a value has been assigned.
263  /// - false, otherwise.
264  bool IsSetInside(void) const;
265 
266  /// Check if it is safe to call GetInside method.
267  ///
268  /// @return
269  /// - true, if the data member is getatable.
270  /// - false, otherwise.
271  bool CanGetInside(void) const;
272 
273  /// Reset Inside data member.
274  void ResetInside(void);
275 
276  /// Get the Inside member data.
277  ///
278  /// @return
279  /// Copy of the member data.
280  TInside GetInside(void) const;
281 
282  /// Assign a value to Inside data member.
283  ///
284  /// @param value
285  /// Value to assign
286  void SetInside(TInside value);
287 
288  /// Assign a value to Inside data member.
289  ///
290  /// @return
291  /// Reference to the data value.
292  TInside& SetInside(void);
293 
294  /// Check if a value has been assigned to Case_sensitive data member.
295  ///
296  /// Data member Case_sensitive is optional with default false;
297  /// its type is defined as 'typedef bool TCase_sensitive'
298  /// @return
299  /// - true, if a value has been assigned.
300  /// - false, otherwise.
301  bool IsSetCase_sensitive(void) const;
302 
303  /// Check if it is safe to call GetCase_sensitive method.
304  ///
305  /// @return
306  /// - true, if the data member is getatable.
307  /// - false, otherwise.
308  bool CanGetCase_sensitive(void) const;
309 
310  /// Reset Case_sensitive data member.
311  void ResetCase_sensitive(void);
312 
313  /// Assign default value to Case_sensitive data member.
314  void SetDefaultCase_sensitive(void);
315 
316  /// Get the Case_sensitive member data.
317  ///
318  /// @return
319  /// Copy of the member data.
321 
322  /// Assign a value to Case_sensitive data member.
323  ///
324  /// @param value
325  /// Value to assign
327 
328  /// Assign a value to Case_sensitive data member.
329  ///
330  /// @return
331  /// Reference to the data value.
333 
334  /// Check if a value has been assigned to Whole_word data member.
335  ///
336  /// Data member Whole_word is optional with default false;
337  /// its type is defined as 'typedef bool TWhole_word'
338  /// @return
339  /// - true, if a value has been assigned.
340  /// - false, otherwise.
341  bool IsSetWhole_word(void) const;
342 
343  /// Check if it is safe to call GetWhole_word method.
344  ///
345  /// @return
346  /// - true, if the data member is getatable.
347  /// - false, otherwise.
348  bool CanGetWhole_word(void) const;
349 
350  /// Reset Whole_word data member.
351  void ResetWhole_word(void);
352 
353  /// Assign default value to Whole_word data member.
354  void SetDefaultWhole_word(void);
355 
356  /// Get the Whole_word member data.
357  ///
358  /// @return
359  /// Copy of the member data.
360  TWhole_word GetWhole_word(void) const;
361 
362  /// Assign a value to Whole_word data member.
363  ///
364  /// @param value
365  /// Value to assign
367 
368  /// Assign a value to Whole_word data member.
369  ///
370  /// @return
371  /// Reference to the data value.
372  TWhole_word& SetWhole_word(void);
373 
374  /// Reset the whole object
375  virtual void Reset(void);
376 
377 
378 private:
379  // Prohibit copy constructor and assignment operator
382 
383  // data
389  bool m_Inside;
392 };
393 
394 /* @} */
395 
396 
397 
398 
399 
400 ///////////////////////////////////////////////////////////
401 ///////////////////// inline methods //////////////////////
402 ///////////////////////////////////////////////////////////
403 inline
405 {
406  return m_Left_marker.NotEmpty();
407 }
408 
409 inline
411 {
412  return IsSetLeft_marker();
413 }
414 
415 inline
417 {
418  if (!CanGetLeft_marker()) {
419  ThrowUnassigned(0);
420  }
421  return (*m_Left_marker);
422 }
423 
424 inline
426 {
427  return ((m_set_State[0] & 0xc) != 0);
428 }
429 
430 inline
432 {
433  return IsSetInclude_left();
434 }
435 
436 inline
438 {
439  m_Include_left = 0;
440  m_set_State[0] &= ~0xc;
441 }
442 
443 inline
445 {
446  if (!CanGetInclude_left()) {
447  ThrowUnassigned(1);
448  }
449  return m_Include_left;
450 }
451 
452 inline
454 {
456  m_set_State[0] |= 0xc;
457 }
458 
459 inline
461 {
462 #ifdef _DEBUG
463  if (!IsSetInclude_left()) {
464  memset(&m_Include_left,UnassignedByte(),sizeof(m_Include_left));
465  }
466 #endif
467  m_set_State[0] |= 0x4;
468  return m_Include_left;
469 }
470 
471 inline
473 {
474  return m_Right_marker.NotEmpty();
475 }
476 
477 inline
479 {
480  return IsSetRight_marker();
481 }
482 
483 inline
485 {
486  if (!CanGetRight_marker()) {
487  ThrowUnassigned(2);
488  }
489  return (*m_Right_marker);
490 }
491 
492 inline
494 {
495  return ((m_set_State[0] & 0xc0) != 0);
496 }
497 
498 inline
500 {
501  return IsSetInclude_right();
502 }
503 
504 inline
506 {
507  m_Include_right = 0;
508  m_set_State[0] &= ~0xc0;
509 }
510 
511 inline
513 {
514  if (!CanGetInclude_right()) {
515  ThrowUnassigned(3);
516  }
517  return m_Include_right;
518 }
519 
520 inline
522 {
524  m_set_State[0] |= 0xc0;
525 }
526 
527 inline
529 {
530 #ifdef _DEBUG
531  if (!IsSetInclude_right()) {
533  }
534 #endif
535  m_set_State[0] |= 0x40;
536  return m_Include_right;
537 }
538 
539 inline
541 {
542  return ((m_set_State[0] & 0x300) != 0);
543 }
544 
545 inline
547 {
548  return IsSetInside();
549 }
550 
551 inline
553 {
554  m_Inside = 0;
555  m_set_State[0] &= ~0x300;
556 }
557 
558 inline
560 {
561  if (!CanGetInside()) {
562  ThrowUnassigned(4);
563  }
564  return m_Inside;
565 }
566 
567 inline
569 {
570  m_Inside = value;
571  m_set_State[0] |= 0x300;
572 }
573 
574 inline
576 {
577 #ifdef _DEBUG
578  if (!IsSetInside()) {
579  memset(&m_Inside,UnassignedByte(),sizeof(m_Inside));
580  }
581 #endif
582  m_set_State[0] |= 0x100;
583  return m_Inside;
584 }
585 
586 inline
588 {
589  return ((m_set_State[0] & 0xc00) != 0);
590 }
591 
592 inline
594 {
595  return true;
596 }
597 
598 inline
600 {
601  m_Case_sensitive = false;
602  m_set_State[0] &= ~0xc00;
603 }
604 
605 inline
607 {
609 }
610 
611 inline
613 {
614  return m_Case_sensitive;
615 }
616 
617 inline
619 {
621  m_set_State[0] |= 0xc00;
622 }
623 
624 inline
626 {
627 #ifdef _DEBUG
628  if (!IsSetCase_sensitive()) {
630  }
631 #endif
632  m_set_State[0] |= 0x400;
633  return m_Case_sensitive;
634 }
635 
636 inline
638 {
639  return ((m_set_State[0] & 0x3000) != 0);
640 }
641 
642 inline
644 {
645  return true;
646 }
647 
648 inline
650 {
651  m_Whole_word = false;
652  m_set_State[0] &= ~0x3000;
653 }
654 
655 inline
657 {
658  ResetWhole_word();
659 }
660 
661 inline
663 {
664  return m_Whole_word;
665 }
666 
667 inline
669 {
671  m_set_State[0] |= 0x3000;
672 }
673 
674 inline
676 {
677 #ifdef _DEBUG
678  if (!IsSetWhole_word()) {
679  memset(&m_Whole_word,UnassignedByte(),sizeof(m_Whole_word));
680  }
681 #endif
682  m_set_State[0] |= 0x1000;
683  return m_Whole_word;
684 }
685 
686 ///////////////////////////////////////////////////////////
687 ////////////////// end of inline methods //////////////////
688 ///////////////////////////////////////////////////////////
689 
690 
691 
692 
693 
694 END_objects_SCOPE // namespace ncbi::objects::
695 
697 
698 
699 #endif // OBJECTS_MACRO_TEXT_PORTION_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
CText_marker –.
Definition: Text_marker.hpp:66
CText_portion_Base –.
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
virtual ~CText_portion_Base(void)
CText_portion_Base & operator=(const CText_portion_Base &)
bool IsSetInclude_left(void) const
Check if a value has been assigned to Include_left data member.
bool IsSetCase_sensitive(void) const
Check if a value has been assigned to Case_sensitive data member.
TInclude_right GetInclude_right(void) const
Get the Include_right member data.
TLeft_marker & SetLeft_marker(void)
Assign a value to Left_marker data member.
bool CanGetLeft_marker(void) const
Check if it is safe to call GetLeft_marker method.
void SetDefaultCase_sensitive(void)
Assign default value to Case_sensitive data member.
void ResetRight_marker(void)
Reset Right_marker data member.
bool CanGetInside(void) const
Check if it is safe to call GetInside method.
void ResetInclude_right(void)
Reset Include_right data member.
TCase_sensitive GetCase_sensitive(void) const
Get the Case_sensitive member data.
bool CanGetWhole_word(void) const
Check if it is safe to call GetWhole_word method.
void ResetInclude_left(void)
Reset Include_left data member.
TWhole_word & SetWhole_word(void)
Assign a value to Whole_word data member.
TRight_marker & SetRight_marker(void)
Assign a value to Right_marker data member.
CRef< TLeft_marker > m_Left_marker
bool CanGetRight_marker(void) const
Check if it is safe to call GetRight_marker method.
void ResetCase_sensitive(void)
Reset Case_sensitive data member.
CSerialObject Tparent
bool IsSetInside(void) const
Check if a value has been assigned to Inside data member.
TInside & SetInside(void)
Assign a value to Inside data member.
Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
virtual void Reset(void)
Reset the whole object.
CText_portion_Base(const CText_portion_Base &)
CText_marker TLeft_marker
TWhole_word GetWhole_word(void) const
Get the Whole_word member data.
bool IsSetRight_marker(void) const
Check if a value has been assigned to Right_marker data member.
bool IsSetWhole_word(void) const
Check if a value has been assigned to Whole_word data member.
CText_marker TRight_marker
TCase_sensitive & SetCase_sensitive(void)
Assign a value to Case_sensitive data member.
const TRight_marker & GetRight_marker(void) const
Get the Right_marker member data.
TInclude_right & SetInclude_right(void)
Assign a value to Include_right data member.
CRef< TRight_marker > m_Right_marker
void ResetInside(void)
Reset Inside data member.
TInside GetInside(void) const
Get the Inside member data.
void SetDefaultWhole_word(void)
Assign default value to Whole_word data member.
bool CanGetInclude_left(void) const
Check if it is safe to call GetInclude_left method.
const TLeft_marker & GetLeft_marker(void) const
Get the Left_marker member data.
bool IsSetInclude_right(void) const
Check if a value has been assigned to Include_right data member.
bool IsSetLeft_marker(void) const
Check if a value has been assigned to Left_marker data member.
bool CanGetInclude_right(void) const
Check if it is safe to call GetInclude_right method.
TInclude_left & SetInclude_left(void)
Assign a value to Include_left data member.
bool CanGetCase_sensitive(void) const
Check if it is safe to call GetCase_sensitive method.
void ResetLeft_marker(void)
Reset Left_marker data member.
TInclude_left GetInclude_left(void) const
Get the Include_left member data.
void ResetWhole_word(void)
Reset Whole_word data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Jun 08 14:24:56 2024 by modify_doxy.py rev. 669887