NCBI C++ ToolKit
GCClient_ValidateChrTypeLo_.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 GCClient_ValidateChrTypeLo_.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/genomecoll/gencoll_client.asn">gencoll_client.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/genomecoll/gencoll_client.def">gencoll_client.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_GENOMECOLL_GCCLIENT_VALIDATECHRTYPELO_BASE_HPP
42 #define OBJECTS_GENOMECOLL_GCCLIENT_VALIDATECHRTYPELO_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
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 // generated classes
60 
61 
62 /** @addtogroup dataspec_NCBI_GencollClient
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CGCClient_ValidateChrTypeLocRequest_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
80 
81  // type info
83 
84  // types
85  typedef string TType;
86  typedef string TLocation;
87 
88  // member index
89  enum class E_memberIndex {
90  e__allMandatory = 0,
91  e_type,
93  };
95 
96  // getters
97  // setters
98 
99  /// Validate the Type Location in the request
100  /// Check if a value has been assigned to Type data member.
101  ///
102  /// Data member Type is mandatory;
103  /// its type is defined as 'typedef string TType'
104  /// @return
105  /// - true, if a value has been assigned.
106  /// - false, otherwise.
107  bool IsSetType(void) const;
108 
109  /// Check if it is safe to call GetType method.
110  ///
111  /// @return
112  /// - true, if the data member is getatable.
113  /// - false, otherwise.
114  bool CanGetType(void) const;
115 
116  /// Reset Type data member.
117  void ResetType(void);
118 
119  /// Get the Type member data.
120  ///
121  /// @return
122  /// Reference to the member data.
123  const TType& GetType(void) const;
124 
125  /// Assign a value to Type data member.
126  ///
127  /// @param value
128  /// Value to assign
129  void SetType(const TType& value);
130  void SetType(TType&& value);
131 
132  /// Assign a value to Type data member.
133  ///
134  /// @return
135  /// Reference to the data value.
136  TType& SetType(void);
137 
138  /// Check if a value has been assigned to Location data member.
139  ///
140  /// Data member Location is mandatory;
141  /// its type is defined as 'typedef string TLocation'
142  /// @return
143  /// - true, if a value has been assigned.
144  /// - false, otherwise.
145  bool IsSetLocation(void) const;
146 
147  /// Check if it is safe to call GetLocation method.
148  ///
149  /// @return
150  /// - true, if the data member is getatable.
151  /// - false, otherwise.
152  bool CanGetLocation(void) const;
153 
154  /// Reset Location data member.
155  void ResetLocation(void);
156 
157  /// Get the Location member data.
158  ///
159  /// @return
160  /// Reference to the member data.
161  const TLocation& GetLocation(void) const;
162 
163  /// Assign a value to Location data member.
164  ///
165  /// @param value
166  /// Value to assign
167  void SetLocation(const TLocation& value);
168  void SetLocation(TLocation&& value);
169 
170  /// Assign a value to Location data member.
171  ///
172  /// @return
173  /// Reference to the data value.
174  TLocation& SetLocation(void);
175 
176  /// Reset the whole object
177  virtual void Reset(void);
178 
179 
180 private:
181  // Prohibit copy constructor and assignment operator
184 
185  // data
187  string m_Type;
188  string m_Location;
189 };
190 
191 /* @} */
192 
193 
194 
195 
196 
197 ///////////////////////////////////////////////////////////
198 ///////////////////// inline methods //////////////////////
199 ///////////////////////////////////////////////////////////
200 inline
202 {
203  return ((m_set_State[0] & 0x3) != 0);
204 }
205 
206 inline
208 {
209  return IsSetType();
210 }
211 
212 inline
214 {
215  if (!CanGetType()) {
216  ThrowUnassigned(0);
217  }
218  return m_Type;
219 }
220 
221 inline
223 {
224  m_Type = value;
225  m_set_State[0] |= 0x3;
226 }
227 
228 inline
230 {
231  m_Type = std::forward<CGCClient_ValidateChrTypeLocRequest_Base::TType>(value);
232  m_set_State[0] |= 0x3;
233 }
234 
235 inline
237 {
238 #ifdef _DEBUG
239  if (!IsSetType()) {
241  }
242 #endif
243  m_set_State[0] |= 0x1;
244  return m_Type;
245 }
246 
247 inline
249 {
250  return ((m_set_State[0] & 0xc) != 0);
251 }
252 
253 inline
255 {
256  return IsSetLocation();
257 }
258 
259 inline
261 {
262  if (!CanGetLocation()) {
263  ThrowUnassigned(1);
264  }
265  return m_Location;
266 }
267 
268 inline
270 {
271  m_Location = value;
272  m_set_State[0] |= 0xc;
273 }
274 
275 inline
277 {
278  m_Location = std::forward<CGCClient_ValidateChrTypeLocRequest_Base::TLocation>(value);
279  m_set_State[0] |= 0xc;
280 }
281 
282 inline
284 {
285 #ifdef _DEBUG
286  if (!IsSetLocation()) {
288  }
289 #endif
290  m_set_State[0] |= 0x4;
291  return m_Location;
292 }
293 
294 ///////////////////////////////////////////////////////////
295 ////////////////// end of inline methods //////////////////
296 ///////////////////////////////////////////////////////////
297 
298 
299 
300 
301 
302 END_objects_SCOPE // namespace ncbi::objects::
303 
305 
306 
307 #endif // OBJECTS_GENOMECOLL_GCCLIENT_VALIDATECHRTYPELO_BASE_HPP
CGCClient_ValidateChrTypeLocRequest_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
const TType & GetType(void) const
Get the Type member data.
virtual void Reset(void)
Reset the whole object.
bool IsSetType(void) const
Validate the Type Location in the request Check if a value has been assigned to Type data member.
bool CanGetType(void) const
Check if it is safe to call GetType method.
bool IsSetLocation(void) const
Check if a value has been assigned to Location data member.
CGCClient_ValidateChrTypeLocRequest_Base(const CGCClient_ValidateChrTypeLocRequest_Base &)
TLocation & SetLocation(void)
Assign a value to Location data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
const TLocation & GetLocation(void) const
Get the Location member data.
TType & SetType(void)
Assign a value to Type data member.
void ResetLocation(void)
Reset Location data member.
bool CanGetLocation(void) const
Check if it is safe to call GetLocation method.
CGCClient_ValidateChrTypeLocRequest_Base & operator=(const CGCClient_ValidateChrTypeLocRequest_Base &)
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Thu May 23 12:32:32 2024 by modify_doxy.py rev. 669887