NCBI C++ ToolKit
ID2_Blob_Seq_id_.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 ID2_Blob_Seq_id_.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/id2/id2.asn">id2.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/id2/id2.def">id2.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_ID2_ID2_BLOB_SEQ_ID_BASE_HPP
42 #define OBJECTS_ID2_ID2_BLOB_SEQ_ID_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 CSeq_id;
57 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_ID2Access
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CID2_Blob_Seq_id_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
79  virtual ~CID2_Blob_Seq_id_Base(void);
80 
81  // type info
83 
84  // types
85  typedef CSeq_id TSeq_id;
86 
87  // member index
88  enum class E_memberIndex {
89  e__allMandatory = 0,
90  e_seq_id,
91  e_replaced
92  };
94 
95  // getters
96  // setters
97 
98  /// Check if a value has been assigned to Seq_id data member.
99  ///
100  /// Data member Seq_id is mandatory;
101  /// its type is defined as 'typedef CSeq_id TSeq_id'
102  /// @return
103  /// - true, if a value has been assigned.
104  /// - false, otherwise.
105  bool IsSetSeq_id(void) const;
106 
107  /// Check if it is safe to call GetSeq_id method.
108  ///
109  /// @return
110  /// - true, if the data member is getatable.
111  /// - false, otherwise.
112  bool CanGetSeq_id(void) const;
113 
114  /// Reset Seq_id data member.
115  void ResetSeq_id(void);
116 
117  /// Get the Seq_id member data.
118  ///
119  /// @return
120  /// Reference to the member data.
121  const TSeq_id& GetSeq_id(void) const;
122 
123  /// Assign a value to Seq_id data member.
124  ///
125  /// @param value
126  /// Reference to value.
127  void SetSeq_id(TSeq_id& value);
128 
129  /// Assign a value to Seq_id data member.
130  ///
131  /// @return
132  /// Reference to the data value.
133  TSeq_id& SetSeq_id(void);
134 
135  /// this Seq-id is replaced by sequence in another blob
136  /// Check if a value has been assigned to Replaced data member.
137  ///
138  /// Data member Replaced is optional
139  /// @return
140  /// - true, if a value has been assigned.
141  /// - false, otherwise.
142  bool IsSetReplaced(void) const;
143 
144  /// Check if value of Replaced member is getatable.
145  ///
146  /// @return
147  /// - false; the data member of type 'NULL' has no value.
148  bool CanGetReplaced(void) const;
149 
150  /// Reset Replaced data member.
151  void ResetReplaced(void);
152 
153  /// Set NULL data member (assign 'NULL' value to Replaced data member).
154  void SetReplaced(void);
155 
156  /// Reset the whole object
157  virtual void Reset(void);
158 
159 
160 private:
161  // Prohibit copy constructor and assignment operator
164 
165  // data
166  Uint4 m_set_State[1];
168 };
169 
170 /* @} */
171 
172 
173 
174 
175 
176 ///////////////////////////////////////////////////////////
177 ///////////////////// inline methods //////////////////////
178 ///////////////////////////////////////////////////////////
179 inline
181 {
182  return m_Seq_id.NotEmpty();
183 }
184 
185 inline
187 {
188  return true;
189 }
190 
191 inline
193 {
194  if ( !m_Seq_id ) {
195  const_cast<CID2_Blob_Seq_id_Base*>(this)->ResetSeq_id();
196  }
197  return (*m_Seq_id);
198 }
199 
200 inline
202 {
203  if ( !m_Seq_id ) {
204  ResetSeq_id();
205  }
206  return (*m_Seq_id);
207 }
208 
209 inline
211 {
212  return ((m_set_State[0] & 0xc) != 0);
213 }
214 
215 inline
217 {
218  return false;
219 }
220 
221 inline
223 {
224  m_set_State[0] &= ~0xc;
225 }
226 
227 inline
229 {
230  m_set_State[0] |= 0xc;
231 }
232 
233 ///////////////////////////////////////////////////////////
234 ////////////////// end of inline methods //////////////////
235 ///////////////////////////////////////////////////////////
236 
237 
238 
239 
240 
241 END_objects_SCOPE // namespace ncbi::objects::
242 
244 
245 
246 #endif // OBJECTS_ID2_ID2_BLOB_SEQ_ID_BASE_HPP
CID2_Blob_Seq_id_Base –.
CRef –.
Definition: ncbiobj.hpp:618
Base class for all serializable objects.
Definition: serialbase.hpp:150
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
#define NCBI_ID2_EXPORT
Definition: ncbi_export.h:552
bool IsSetSeq_id(void) const
Check if a value has been assigned to Seq_id data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool CanGetSeq_id(void) const
Check if it is safe to call GetSeq_id method.
void ResetReplaced(void)
Reset Replaced data member.
bool IsSetReplaced(void) const
this Seq-id is replaced by sequence in another blob Check if a value has been assigned to Replaced da...
void SetReplaced(void)
Set NULL data member (assign 'NULL' value to Replaced data member).
TSeq_id & SetSeq_id(void)
Assign a value to Seq_id data member.
const TSeq_id & GetSeq_id(void) const
Get the Seq_id member data.
bool CanGetReplaced(void) const
Check if value of Replaced member is getatable.
CID2_Blob_Seq_id_Base & operator=(const CID2_Blob_Seq_id_Base &)
void ResetSeq_id(void)
Reset Seq_id data member.
CID2_Blob_Seq_id_Base(const CID2_Blob_Seq_id_Base &)
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Wed Jun 19 17:02:20 2024 by modify_doxy.py rev. 669887