NCBI C++ ToolKit
SeqEdit_Cmd_AddDescr_.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_AddDescr_.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_ADDDESCR_BASE_HPP
42 #define OBJECTS_SEQEDIT_SEQEDIT_CMD_ADDDESCR_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_descr;
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_SeqEdit
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///***************************************************************
70 /// Add descriptors to an object
71 ///
72 /// CSeqEdit_Cmd_AddDescr_Base --
73 ///
74 
76 {
78 public:
79  // constructor
81  // destructor
82  virtual ~CSeqEdit_Cmd_AddDescr_Base(void);
83 
84  // type info
86 
87  // types
88  typedef CSeqEdit_Id TId;
90 
91  // member index
92  enum class E_memberIndex {
93  e__allMandatory = 0,
94  e_id,
95  e_add_descr
96  };
98 
99  // getters
100  // setters
101 
102  /// Bioseq or Bioseq_set id
103  /// Check if a value has been assigned to Id data member.
104  ///
105  /// Data member Id is mandatory;
106  /// its type is defined as 'typedef CSeqEdit_Id TId'
107  /// @return
108  /// - true, if a value has been assigned.
109  /// - false, otherwise.
110  bool IsSetId(void) const;
111 
112  /// Check if it is safe to call GetId method.
113  ///
114  /// @return
115  /// - true, if the data member is getatable.
116  /// - false, otherwise.
117  bool CanGetId(void) const;
118 
119  /// Reset Id data member.
120  void ResetId(void);
121 
122  /// Get the Id member data.
123  ///
124  /// @return
125  /// Reference to the member data.
126  const TId& GetId(void) const;
127 
128  /// Assign a value to Id data member.
129  ///
130  /// @param value
131  /// Reference to value.
132  void SetId(TId& value);
133 
134  /// Assign a value to Id data member.
135  ///
136  /// @return
137  /// Reference to the data value.
138  TId& SetId(void);
139 
140  /// Descriptors
141  /// Check if a value has been assigned to Add_descr data member.
142  ///
143  /// Data member Add_descr is mandatory;
144  /// its type is defined as 'typedef CSeq_descr TAdd_descr'
145  /// @return
146  /// - true, if a value has been assigned.
147  /// - false, otherwise.
148  bool IsSetAdd_descr(void) const;
149 
150  /// Check if it is safe to call GetAdd_descr method.
151  ///
152  /// @return
153  /// - true, if the data member is getatable.
154  /// - false, otherwise.
155  bool CanGetAdd_descr(void) const;
156 
157  /// Reset Add_descr data member.
158  void ResetAdd_descr(void);
159 
160  /// Get the Add_descr member data.
161  ///
162  /// @return
163  /// Reference to the member data.
164  const TAdd_descr& GetAdd_descr(void) const;
165 
166  /// Assign a value to Add_descr data member.
167  ///
168  /// @param value
169  /// Reference to value.
170  void SetAdd_descr(TAdd_descr& value);
171 
172  /// Assign a value to Add_descr data member.
173  ///
174  /// @return
175  /// Reference to the data value.
176  TAdd_descr& SetAdd_descr(void);
177 
178  /// Reset the whole object
179  virtual void Reset(void);
180 
181 
182 private:
183  // Prohibit copy constructor and assignment operator
186 
187  // data
188  Uint4 m_set_State[1];
191 };
192 
193 /* @} */
194 
195 
196 
197 
198 
199 ///////////////////////////////////////////////////////////
200 ///////////////////// inline methods //////////////////////
201 ///////////////////////////////////////////////////////////
202 inline
204 {
205  return m_Id.NotEmpty();
206 }
207 
208 inline
210 {
211  return true;
212 }
213 
214 inline
216 {
217  if ( !m_Id ) {
218  const_cast<CSeqEdit_Cmd_AddDescr_Base*>(this)->ResetId();
219  }
220  return (*m_Id);
221 }
222 
223 inline
225 {
226  if ( !m_Id ) {
227  ResetId();
228  }
229  return (*m_Id);
230 }
231 
232 inline
234 {
235  return m_Add_descr.NotEmpty();
236 }
237 
238 inline
240 {
241  return true;
242 }
243 
244 inline
246 {
247  if ( !m_Add_descr ) {
248  const_cast<CSeqEdit_Cmd_AddDescr_Base*>(this)->ResetAdd_descr();
249  }
250  return (*m_Add_descr);
251 }
252 
253 inline
255 {
256  if ( !m_Add_descr ) {
257  ResetAdd_descr();
258  }
259  return (*m_Add_descr);
260 }
261 
262 ///////////////////////////////////////////////////////////
263 ////////////////// end of inline methods //////////////////
264 ///////////////////////////////////////////////////////////
265 
266 
267 
268 
269 
270 END_objects_SCOPE // namespace ncbi::objects::
271 
273 
274 
275 #endif // OBJECTS_SEQEDIT_SEQEDIT_CMD_ADDDESCR_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
*************************************************************** Add descriptors to an object
CSeqEdit_Id –.
Definition: SeqEdit_Id.hpp:66
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
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
const TAdd_descr & GetAdd_descr(void) const
Get the Add_descr member data.
CSeqEdit_Cmd_AddDescr_Base & operator=(const CSeqEdit_Cmd_AddDescr_Base &)
TAdd_descr & SetAdd_descr(void)
Assign a value to Add_descr data member.
TId & SetId(void)
Assign a value to Id data member.
const TId & GetId(void) const
Get the Id member data.
bool CanGetId(void) const
Check if it is safe to call GetId method.
CSeqEdit_Cmd_AddDescr_Base(const CSeqEdit_Cmd_AddDescr_Base &)
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetAdd_descr(void) const
Descriptors Check if a value has been assigned to Add_descr data member.
void ResetId(void)
Reset Id data member.
void ResetAdd_descr(void)
Reset Add_descr data member.
bool CanGetAdd_descr(void) const
Check if it is safe to call GetAdd_descr method.
bool IsSetId(void) const
Bioseq or Bioseq_set id Check if a value has been assigned to Id data member.
Modified on Thu Nov 30 04:53:29 2023 by modify_doxy.py rev. 669887