NCBI C++ ToolKit
SeqEdit_Cmd_ResetIds_.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_ResetIds_.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_RESETIDS_BASE_HPP
42 #define OBJECTS_SEQEDIT_SEQEDIT_CMD_RESETIDS_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
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 // forward declarations
60 class CSeqEdit_Id;
61 class CSeq_id;
62 
63 
64 // generated classes
65 
66 
67 /** @addtogroup dataspec_NCBI_SeqEdit
68  *
69  * @{
70  */
71 
72 /////////////////////////////////////////////////////////////////////////////
73 /// Reset ids field of bioseq
74 ///
75 /// CSeqEdit_Cmd_ResetIds_Base --
76 ///
77 
79 {
81 public:
82  // constructor
84  // destructor
85  virtual ~CSeqEdit_Cmd_ResetIds_Base(void);
86 
87  // type info
89 
90  // types
91  typedef CSeqEdit_Id TId;
92  typedef list< CRef< CSeq_id > > TRemove_ids;
93 
94  // member index
95  enum class E_memberIndex {
96  e__allMandatory = 0,
97  e_id,
98  e_remove_ids
99  };
101 
102  // getters
103  // setters
104 
105  /// Bioseq id
106  /// Check if a value has been assigned to Id data member.
107  ///
108  /// Data member Id is mandatory;
109  /// its type is defined as 'typedef CSeqEdit_Id TId'
110  /// @return
111  /// - true, if a value has been assigned.
112  /// - false, otherwise.
113  bool IsSetId(void) const;
114 
115  /// Check if it is safe to call GetId method.
116  ///
117  /// @return
118  /// - true, if the data member is getatable.
119  /// - false, otherwise.
120  bool CanGetId(void) const;
121 
122  /// Reset Id data member.
123  void ResetId(void);
124 
125  /// Get the Id member data.
126  ///
127  /// @return
128  /// Reference to the member data.
129  const TId& GetId(void) const;
130 
131  /// Assign a value to Id data member.
132  ///
133  /// @param value
134  /// Reference to value.
135  void SetId(TId& value);
136 
137  /// Assign a value to Id data member.
138  ///
139  /// @return
140  /// Reference to the data value.
141  TId& SetId(void);
142 
143  /// List of Seq ids to remove
144  /// Check if a value has been assigned to Remove_ids data member.
145  ///
146  /// Data member Remove_ids is mandatory;
147  /// its type is defined as 'typedef list< CRef< CSeq_id > > TRemove_ids'
148  /// @return
149  /// - true, if a value has been assigned.
150  /// - false, otherwise.
151  bool IsSetRemove_ids(void) const;
152 
153  /// Check if it is safe to call GetRemove_ids method.
154  ///
155  /// @return
156  /// - true, if the data member is getatable.
157  /// - false, otherwise.
158  bool CanGetRemove_ids(void) const;
159 
160  /// Reset Remove_ids data member.
161  void ResetRemove_ids(void);
162 
163  /// Get the Remove_ids member data.
164  ///
165  /// @return
166  /// Reference to the member data.
167  const TRemove_ids& GetRemove_ids(void) const;
168 
169  /// Assign a value to Remove_ids data member.
170  ///
171  /// @return
172  /// Reference to the data value.
173  TRemove_ids& SetRemove_ids(void);
174 
175  /// Reset the whole object
176  virtual void Reset(void);
177 
178 
179 private:
180  // Prohibit copy constructor and assignment operator
183 
184  // data
185  Uint4 m_set_State[1];
187  list< CRef< CSeq_id > > m_Remove_ids;
188 };
189 
190 /* @} */
191 
192 
193 
194 
195 
196 ///////////////////////////////////////////////////////////
197 ///////////////////// inline methods //////////////////////
198 ///////////////////////////////////////////////////////////
199 inline
201 {
202  return m_Id.NotEmpty();
203 }
204 
205 inline
207 {
208  return true;
209 }
210 
211 inline
213 {
214  if ( !m_Id ) {
215  const_cast<CSeqEdit_Cmd_ResetIds_Base*>(this)->ResetId();
216  }
217  return (*m_Id);
218 }
219 
220 inline
222 {
223  if ( !m_Id ) {
224  ResetId();
225  }
226  return (*m_Id);
227 }
228 
229 inline
231 {
232  return ((m_set_State[0] & 0xc) != 0);
233 }
234 
235 inline
237 {
238  return true;
239 }
240 
241 inline
243 {
244  return m_Remove_ids;
245 }
246 
247 inline
249 {
250  m_set_State[0] |= 0x4;
251  return m_Remove_ids;
252 }
253 
254 ///////////////////////////////////////////////////////////
255 ////////////////// end of inline methods //////////////////
256 ///////////////////////////////////////////////////////////
257 
258 
259 
260 
261 
262 END_objects_SCOPE // namespace ncbi::objects::
263 
265 
266 
267 #endif // OBJECTS_SEQEDIT_SEQEDIT_CMD_RESETIDS_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Reset ids field of 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 CanGetId(void) const
Check if it is safe to call GetId method.
list< CRef< CSeq_id > > m_Remove_ids
CSeqEdit_Cmd_ResetIds_Base(const CSeqEdit_Cmd_ResetIds_Base &)
TRemove_ids & SetRemove_ids(void)
Assign a value to Remove_ids data member.
void ResetId(void)
Reset Id data member.
bool IsSetRemove_ids(void) const
List of Seq ids to remove Check if a value has been assigned to Remove_ids data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TId & SetId(void)
Assign a value to Id data member.
bool CanGetRemove_ids(void) const
Check if it is safe to call GetRemove_ids method.
list< CRef< CSeq_id > > TRemove_ids
const TId & GetId(void) const
Get the Id member data.
CSeqEdit_Cmd_ResetIds_Base & operator=(const CSeqEdit_Cmd_ResetIds_Base &)
const TRemove_ids & GetRemove_ids(void) const
Get the Remove_ids member data.
bool IsSetId(void) const
Bioseq id Check if a value has been assigned to Id data member.
Modified on Mon Dec 11 02:35:22 2023 by modify_doxy.py rev. 669887