NCBI C++ ToolKit
SeqEdit_Cmd_RemoveId_.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 SeqEdit_Cmd_RemoveId_.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/seqedit/seqedit.asn">seqedit.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqedit/seqedit.def">seqedit.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_SEQEDIT_SEQEDIT_CMD_REMOVEID_BASE_HPP
42 #define OBJECTS_SEQEDIT_SEQEDIT_CMD_REMOVEID_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 CSeqEdit_Id;
57 class CSeq_id;
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_SeqEdit
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 /// Remove a seq-id from bioseq
70 ///
71 /// CSeqEdit_Cmd_RemoveId_Base --
72 ///
73 
75 {
77 public:
78  // constructor
80  // destructor
81  virtual ~CSeqEdit_Cmd_RemoveId_Base(void);
82 
83  // type info
85 
86  // types
87  typedef CSeqEdit_Id TId;
89 
90  // member index
91  enum class E_memberIndex {
92  e__allMandatory = 0,
93  e_id,
94  e_remove_id
95  };
97 
98  // getters
99  // setters
100 
101  /// Bioseq id
102  /// Check if a value has been assigned to Id data member.
103  ///
104  /// Data member Id is mandatory;
105  /// its type is defined as 'typedef CSeqEdit_Id TId'
106  /// @return
107  /// - true, if a value has been assigned.
108  /// - false, otherwise.
109  bool IsSetId(void) const;
110 
111  /// Check if it is safe to call GetId method.
112  ///
113  /// @return
114  /// - true, if the data member is getatable.
115  /// - false, otherwise.
116  bool CanGetId(void) const;
117 
118  /// Reset Id data member.
119  void ResetId(void);
120 
121  /// Get the Id member data.
122  ///
123  /// @return
124  /// Reference to the member data.
125  const TId& GetId(void) const;
126 
127  /// Assign a value to Id data member.
128  ///
129  /// @param value
130  /// Reference to value.
131  void SetId(TId& value);
132 
133  /// Assign a value to Id data member.
134  ///
135  /// @return
136  /// Reference to the data value.
137  TId& SetId(void);
138 
139  /// Seq id to remove
140  /// Check if a value has been assigned to Remove_id data member.
141  ///
142  /// Data member Remove_id is mandatory;
143  /// its type is defined as 'typedef CSeq_id TRemove_id'
144  /// @return
145  /// - true, if a value has been assigned.
146  /// - false, otherwise.
147  bool IsSetRemove_id(void) const;
148 
149  /// Check if it is safe to call GetRemove_id method.
150  ///
151  /// @return
152  /// - true, if the data member is getatable.
153  /// - false, otherwise.
154  bool CanGetRemove_id(void) const;
155 
156  /// Reset Remove_id data member.
157  void ResetRemove_id(void);
158 
159  /// Get the Remove_id member data.
160  ///
161  /// @return
162  /// Reference to the member data.
163  const TRemove_id& GetRemove_id(void) const;
164 
165  /// Assign a value to Remove_id data member.
166  ///
167  /// @param value
168  /// Reference to value.
169  void SetRemove_id(TRemove_id& value);
170 
171  /// Assign a value to Remove_id data member.
172  ///
173  /// @return
174  /// Reference to the data value.
175  TRemove_id& SetRemove_id(void);
176 
177  /// Reset the whole object
178  virtual void Reset(void);
179 
180 
181 private:
182  // Prohibit copy constructor and assignment operator
185 
186  // data
187  Uint4 m_set_State[1];
190 };
191 
192 /* @} */
193 
194 
195 
196 
197 
198 ///////////////////////////////////////////////////////////
199 ///////////////////// inline methods //////////////////////
200 ///////////////////////////////////////////////////////////
201 inline
203 {
204  return m_Id.NotEmpty();
205 }
206 
207 inline
209 {
210  return true;
211 }
212 
213 inline
215 {
216  if ( !m_Id ) {
217  const_cast<CSeqEdit_Cmd_RemoveId_Base*>(this)->ResetId();
218  }
219  return (*m_Id);
220 }
221 
222 inline
224 {
225  if ( !m_Id ) {
226  ResetId();
227  }
228  return (*m_Id);
229 }
230 
231 inline
233 {
234  return m_Remove_id.NotEmpty();
235 }
236 
237 inline
239 {
240  return true;
241 }
242 
243 inline
245 {
246  if ( !m_Remove_id ) {
247  const_cast<CSeqEdit_Cmd_RemoveId_Base*>(this)->ResetRemove_id();
248  }
249  return (*m_Remove_id);
250 }
251 
252 inline
254 {
255  if ( !m_Remove_id ) {
256  ResetRemove_id();
257  }
258  return (*m_Remove_id);
259 }
260 
261 ///////////////////////////////////////////////////////////
262 ////////////////// end of inline methods //////////////////
263 ///////////////////////////////////////////////////////////
264 
265 
266 
267 
268 
269 END_objects_SCOPE // namespace ncbi::objects::
270 
272 
273 
274 #endif // OBJECTS_SEQEDIT_SEQEDIT_CMD_REMOVEID_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Remove a seq-id from bioseq.
CSeqEdit_Id –.
Definition: SeqEdit_Id.hpp:66
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
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_SEQEDIT_EXPORT
Definition: ncbi_export.h:801
bool IsSetId(void) const
Bioseq id Check if a value has been assigned to Id data member.
bool CanGetRemove_id(void) const
Check if it is safe to call GetRemove_id method.
bool IsSetRemove_id(void) const
Seq id to remove Check if a value has been assigned to Remove_id data member.
void ResetRemove_id(void)
Reset Remove_id data member.
TId & SetId(void)
Assign a value to Id data member.
const TId & GetId(void) const
Get the Id member data.
TRemove_id & SetRemove_id(void)
Assign a value to Remove_id data member.
bool CanGetId(void) const
Check if it is safe to call GetId method.
void ResetId(void)
Reset Id data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
CSeqEdit_Cmd_RemoveId_Base(const CSeqEdit_Cmd_RemoveId_Base &)
const TRemove_id & GetRemove_id(void) const
Get the Remove_id member data.
CSeqEdit_Cmd_RemoveId_Base & operator=(const CSeqEdit_Cmd_RemoveId_Base &)
Modified on Thu Dec 07 10:11:24 2023 by modify_doxy.py rev. 669887