NCBI C++ ToolKit
SeqEdit_Cmd_SetDescr_.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_SetDescr_.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_SETDESCR_BASE_HPP
42 #define OBJECTS_SEQEDIT_SEQEDIT_CMD_SETDESCR_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 /// Set an objects's descriptors
70 ///
71 /// CSeqEdit_Cmd_SetDescr_Base --
72 ///
73 
75 {
77 public:
78  // constructor
80  // destructor
81  virtual ~CSeqEdit_Cmd_SetDescr_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_set_descr
95  };
97 
98  // getters
99  // setters
100 
101  /// Bioseq or Bioseq_set 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  /// Descriptors
140  /// Check if a value has been assigned to Set_descr data member.
141  ///
142  /// Data member Set_descr is mandatory;
143  /// its type is defined as 'typedef CSeq_descr TSet_descr'
144  /// @return
145  /// - true, if a value has been assigned.
146  /// - false, otherwise.
147  bool IsSetSet_descr(void) const;
148 
149  /// Check if it is safe to call GetSet_descr method.
150  ///
151  /// @return
152  /// - true, if the data member is getatable.
153  /// - false, otherwise.
154  bool CanGetSet_descr(void) const;
155 
156  /// Reset Set_descr data member.
157  void ResetSet_descr(void);
158 
159  /// Get the Set_descr member data.
160  ///
161  /// @return
162  /// Reference to the member data.
163  const TSet_descr& GetSet_descr(void) const;
164 
165  /// Assign a value to Set_descr data member.
166  ///
167  /// @param value
168  /// Reference to value.
169  void SetSet_descr(TSet_descr& value);
170 
171  /// Assign a value to Set_descr data member.
172  ///
173  /// @return
174  /// Reference to the data value.
175  TSet_descr& SetSet_descr(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_SetDescr_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_Set_descr.NotEmpty();
235 }
236 
237 inline
239 {
240  return true;
241 }
242 
243 inline
245 {
246  if ( !m_Set_descr ) {
247  const_cast<CSeqEdit_Cmd_SetDescr_Base*>(this)->ResetSet_descr();
248  }
249  return (*m_Set_descr);
250 }
251 
252 inline
254 {
255  if ( !m_Set_descr ) {
256  ResetSet_descr();
257  }
258  return (*m_Set_descr);
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_SETDESCR_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Set an objects's descriptors.
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
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 CanGetSet_descr(void) const
Check if it is safe to call GetSet_descr method.
CSeqEdit_Cmd_SetDescr_Base(const CSeqEdit_Cmd_SetDescr_Base &)
TSet_descr & SetSet_descr(void)
Assign a value to Set_descr data member.
const TSet_descr & GetSet_descr(void) const
Get the Set_descr member data.
CSeqEdit_Cmd_SetDescr_Base & operator=(const CSeqEdit_Cmd_SetDescr_Base &)
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool IsSetId(void) const
Bioseq or Bioseq_set id Check if a value has been assigned to Id data member.
bool IsSetSet_descr(void) const
Descriptors Check if a value has been assigned to Set_descr data member.
TId & SetId(void)
Assign a value to Id data member.
const TId & GetId(void) const
Get the Id member data.
void ResetId(void)
Reset Id data member.
void ResetSet_descr(void)
Reset Set_descr data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Tue Jul 23 17:58:04 2024 by modify_doxy.py rev. 669887