NCBI C++ ToolKit
Blast4_program_info_.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 Blast4_program_info_.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/blast/blast.asn">blast.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/blast/blast.def">blast.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_BLAST_BLAST4_PROGRAM_INFO_BASE_HPP
42 #define OBJECTS_BLAST_BLAST4_PROGRAM_INFO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <string>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_Blast4
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CBlast4_program_info_Base --
71 ///
72 
74 {
76 public:
77  // constructor
79  // destructor
80  virtual ~CBlast4_program_info_Base(void);
81 
82  // type info
84 
85  // types
86  typedef string TProgram;
87  typedef list< string > TServices;
88 
89  // member index
90  enum class E_memberIndex {
91  e__allMandatory = 0,
92  e_program,
93  e_services
94  };
96 
97  // getters
98  // setters
99 
100  /// Check if a value has been assigned to Program data member.
101  ///
102  /// Data member Program is mandatory;
103  /// its type is defined as 'typedef string TProgram'
104  /// @return
105  /// - true, if a value has been assigned.
106  /// - false, otherwise.
107  bool IsSetProgram(void) const;
108 
109  /// Check if it is safe to call GetProgram method.
110  ///
111  /// @return
112  /// - true, if the data member is getatable.
113  /// - false, otherwise.
114  bool CanGetProgram(void) const;
115 
116  /// Reset Program data member.
117  void ResetProgram(void);
118 
119  /// Get the Program member data.
120  ///
121  /// @return
122  /// Reference to the member data.
123  const TProgram& GetProgram(void) const;
124 
125  /// Assign a value to Program data member.
126  ///
127  /// @param value
128  /// Value to assign
129  void SetProgram(const TProgram& value);
130  void SetProgram(TProgram&& value);
131 
132  /// Assign a value to Program data member.
133  ///
134  /// @return
135  /// Reference to the data value.
136  TProgram& SetProgram(void);
137 
138  /// Check if a value has been assigned to Services data member.
139  ///
140  /// Data member Services is mandatory;
141  /// its type is defined as 'typedef list< string > TServices'
142  /// @return
143  /// - true, if a value has been assigned.
144  /// - false, otherwise.
145  bool IsSetServices(void) const;
146 
147  /// Check if it is safe to call GetServices method.
148  ///
149  /// @return
150  /// - true, if the data member is getatable.
151  /// - false, otherwise.
152  bool CanGetServices(void) const;
153 
154  /// Reset Services data member.
155  void ResetServices(void);
156 
157  /// Get the Services member data.
158  ///
159  /// @return
160  /// Reference to the member data.
161  const TServices& GetServices(void) const;
162 
163  /// Assign a value to Services data member.
164  ///
165  /// @return
166  /// Reference to the data value.
167  TServices& SetServices(void);
168 
169  /// Reset the whole object
170  virtual void Reset(void);
171 
172 
173 private:
174  // Prohibit copy constructor and assignment operator
177 
178  // data
179  Uint4 m_set_State[1];
180  string m_Program;
181  list< string > m_Services;
182 };
183 
184 /* @} */
185 
186 
187 
188 
189 
190 ///////////////////////////////////////////////////////////
191 ///////////////////// inline methods //////////////////////
192 ///////////////////////////////////////////////////////////
193 inline
195 {
196  return ((m_set_State[0] & 0x3) != 0);
197 }
198 
199 inline
201 {
202  return IsSetProgram();
203 }
204 
205 inline
207 {
208  if (!CanGetProgram()) {
209  ThrowUnassigned(0);
210  }
211  return m_Program;
212 }
213 
214 inline
216 {
217  m_Program = value;
218  m_set_State[0] |= 0x3;
219 }
220 
221 inline
223 {
224  m_Program = std::forward<CBlast4_program_info_Base::TProgram>(value);
225  m_set_State[0] |= 0x3;
226 }
227 
228 inline
230 {
231 #ifdef _DEBUG
232  if (!IsSetProgram()) {
234  }
235 #endif
236  m_set_State[0] |= 0x1;
237  return m_Program;
238 }
239 
240 inline
242 {
243  return ((m_set_State[0] & 0xc) != 0);
244 }
245 
246 inline
248 {
249  return true;
250 }
251 
252 inline
254 {
255  return m_Services;
256 }
257 
258 inline
260 {
261  m_set_State[0] |= 0x4;
262  return m_Services;
263 }
264 
265 ///////////////////////////////////////////////////////////
266 ////////////////// end of inline methods //////////////////
267 ///////////////////////////////////////////////////////////
268 
269 
270 
271 
272 
273 END_objects_SCOPE // namespace ncbi::objects::
274 
276 
277 
278 #endif // OBJECTS_BLAST_BLAST4_PROGRAM_INFO_BASE_HPP
CBlast4_program_info_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
Definition: serialbase.hpp:175
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_BLAST_EXPORT
Definition: ncbi_export.h:360
const TServices & GetServices(void) const
Get the Services member data.
CBlast4_program_info_Base & operator=(const CBlast4_program_info_Base &)
bool CanGetProgram(void) const
Check if it is safe to call GetProgram method.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TServices & SetServices(void)
Assign a value to Services data member.
bool IsSetServices(void) const
Check if a value has been assigned to Services data member.
bool CanGetServices(void) const
Check if it is safe to call GetServices method.
CBlast4_program_info_Base(const CBlast4_program_info_Base &)
bool IsSetProgram(void) const
Check if a value has been assigned to Program data member.
TProgram & SetProgram(void)
Assign a value to Program data member.
const TProgram & GetProgram(void) const
Get the Program member data.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon May 20 05:04:36 2024 by modify_doxy.py rev. 669887