NCBI C++ ToolKit
SeqEdit_Cmd_ResetSeqEntry_.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_ResetSeqEntry_.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_RESETSEQENTRY_BASE_HPP
42 #define OBJECTS_SEQEDIT_SEQEDIT_CMD_RESETSEQENTRY_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 
58 
59 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_SeqEdit
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 /// Detach an object from seq entry
69 ///
70 /// CSeqEdit_Cmd_ResetSeqEntry_Base --
71 ///
72 
74 {
76 public:
77  // constructor
79  // destructor
80  virtual ~CSeqEdit_Cmd_ResetSeqEntry_Base(void);
81 
82  // type info
84 
85  // types
86  typedef CSeqEdit_Id TId;
87 
88  // member index
89  enum class E_memberIndex {
90  e__allMandatory = 0,
91  e_id
92  };
94 
95  // getters
96  // setters
97 
98  /// Seq entry id
99  /// Check if a value has been assigned to Id data member.
100  ///
101  /// Data member Id is mandatory;
102  /// its type is defined as 'typedef CSeqEdit_Id TId'
103  /// @return
104  /// - true, if a value has been assigned.
105  /// - false, otherwise.
106  bool IsSetId(void) const;
107 
108  /// Check if it is safe to call GetId method.
109  ///
110  /// @return
111  /// - true, if the data member is getatable.
112  /// - false, otherwise.
113  bool CanGetId(void) const;
114 
115  /// Reset Id data member.
116  void ResetId(void);
117 
118  /// Get the Id member data.
119  ///
120  /// @return
121  /// Reference to the member data.
122  const TId& GetId(void) const;
123 
124  /// Assign a value to Id data member.
125  ///
126  /// @param value
127  /// Reference to value.
128  void SetId(TId& value);
129 
130  /// Assign a value to Id data member.
131  ///
132  /// @return
133  /// Reference to the data value.
134  TId& SetId(void);
135 
136  /// Reset the whole object
137  virtual void Reset(void);
138 
139 
140 private:
141  // Prohibit copy constructor and assignment operator
144 
145  // data
146  Uint4 m_set_State[1];
148 };
149 
150 /* @} */
151 
152 
153 
154 
155 
156 ///////////////////////////////////////////////////////////
157 ///////////////////// inline methods //////////////////////
158 ///////////////////////////////////////////////////////////
159 inline
161 {
162  return m_Id.NotEmpty();
163 }
164 
165 inline
167 {
168  return true;
169 }
170 
171 inline
173 {
174  if ( !m_Id ) {
175  const_cast<CSeqEdit_Cmd_ResetSeqEntry_Base*>(this)->ResetId();
176  }
177  return (*m_Id);
178 }
179 
180 inline
182 {
183  if ( !m_Id ) {
184  ResetId();
185  }
186  return (*m_Id);
187 }
188 
189 ///////////////////////////////////////////////////////////
190 ////////////////// end of inline methods //////////////////
191 ///////////////////////////////////////////////////////////
192 
193 
194 
195 
196 
197 END_objects_SCOPE // namespace ncbi::objects::
198 
200 
201 
202 #endif // OBJECTS_SEQEDIT_SEQEDIT_CMD_RESETSEQENTRY_BASE_HPP
CRef –.
Definition: ncbiobj.hpp:618
Detach an object from seq entry.
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
const TId & GetId(void) const
Get the Id member data.
void ResetId(void)
Reset Id data member.
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool IsSetId(void) const
Seq entry id Check if a value has been assigned to Id data member.
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
TId & SetId(void)
Assign a value to Id data member.
CSeqEdit_Cmd_ResetSeqEntry_Base & operator=(const CSeqEdit_Cmd_ResetSeqEntry_Base &)
CSeqEdit_Cmd_ResetSeqEntry_Base(const CSeqEdit_Cmd_ResetSeqEntry_Base &)
Modified on Sat Dec 09 04:46:39 2023 by modify_doxy.py rev. 669887