NCBI C++ ToolKit
TMgr_ClientInfo_.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 TMgr_ClientInfo_.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/trackmgr/trackmgr.asn">trackmgr.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/trackmgr/trackmgr.def">trackmgr.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_TRACKMGR_TMGR_CLIENTINFO_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_CLIENTINFO_BASE_HPP
43 
44 // extra headers
46 
47 // standard includes
48 #include <serial/serialbase.hpp>
49 
50 // generated includes
51 #include <list>
52 #include <string>
53 
55 
56 #ifndef BEGIN_objects_SCOPE
57 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
58 # define END_objects_SCOPE END_SCOPE(objects)
59 #endif
60 BEGIN_objects_SCOPE // namespace ncbi::objects::
61 
62 
63 // forward declarations
64 class CTMgr_AttrSpec;
65 
66 
67 // generated classes
68 
69 
70 /** @addtogroup dataspec_NCBI_TrackManager
71  *
72  * @{
73  */
74 
75 /////////////////////////////////////////////////////////////////////////////
76 ///
77 /// CTMgr_ClientInfo_Base --
78 ///
79 
81 {
83 public:
84  // constructor
86  // destructor
87  virtual ~CTMgr_ClientInfo_Base(void);
88 
89  // type info
91 
92  // types
93  typedef string TClient_name;
94  typedef string TContext;
95  typedef bool TInhouse;
96  typedef list< CRef< CTMgr_AttrSpec > > TContext_attrs;
97 
98  // member index
99  enum class E_memberIndex {
100  e__allMandatory = 0,
101  e_client_name,
102  e_context,
103  e_inhouse,
104  e_context_attrs
105  };
107 
108  // getters
109  // setters
110 
111  /// Check if a value has been assigned to Client_name data member.
112  ///
113  /// Data member Client_name is mandatory;
114  /// its type is defined as 'typedef string TClient_name'
115  /// @return
116  /// - true, if a value has been assigned.
117  /// - false, otherwise.
118  bool IsSetClient_name(void) const;
119 
120  /// Check if it is safe to call GetClient_name method.
121  ///
122  /// @return
123  /// - true, if the data member is getatable.
124  /// - false, otherwise.
125  bool CanGetClient_name(void) const;
126 
127  /// Reset Client_name data member.
128  void ResetClient_name(void);
129 
130  /// Get the Client_name member data.
131  ///
132  /// @return
133  /// Reference to the member data.
134  const TClient_name& GetClient_name(void) const;
135 
136  /// Assign a value to Client_name data member.
137  ///
138  /// @param value
139  /// Value to assign
140  void SetClient_name(const TClient_name& value);
141  void SetClient_name(TClient_name&& value);
142 
143  /// Assign a value to Client_name data member.
144  ///
145  /// @return
146  /// Reference to the data value.
147  TClient_name& SetClient_name(void);
148 
149  /// Check if a value has been assigned to Context data member.
150  ///
151  /// Data member Context is optional;
152  /// its type is defined as 'typedef string TContext'
153  /// @return
154  /// - true, if a value has been assigned.
155  /// - false, otherwise.
156  bool IsSetContext(void) const;
157 
158  /// Check if it is safe to call GetContext method.
159  ///
160  /// @return
161  /// - true, if the data member is getatable.
162  /// - false, otherwise.
163  bool CanGetContext(void) const;
164 
165  /// Reset Context data member.
166  void ResetContext(void);
167 
168  /// Get the Context member data.
169  ///
170  /// @return
171  /// Reference to the member data.
172  const TContext& GetContext(void) const;
173 
174  /// Assign a value to Context data member.
175  ///
176  /// @param value
177  /// Value to assign
178  void SetContext(const TContext& value);
179  void SetContext(TContext&& value);
180 
181  /// Assign a value to Context data member.
182  ///
183  /// @return
184  /// Reference to the data value.
185  TContext& SetContext(void);
186 
187  /// Check if a value has been assigned to Inhouse data member.
188  ///
189  /// Data member Inhouse is optional with default false;
190  /// its type is defined as 'typedef bool TInhouse'
191  /// @return
192  /// - true, if a value has been assigned.
193  /// - false, otherwise.
194  bool IsSetInhouse(void) const;
195 
196  /// Check if it is safe to call GetInhouse method.
197  ///
198  /// @return
199  /// - true, if the data member is getatable.
200  /// - false, otherwise.
201  bool CanGetInhouse(void) const;
202 
203  /// Reset Inhouse data member.
204  void ResetInhouse(void);
205 
206  /// Assign default value to Inhouse data member.
207  void SetDefaultInhouse(void);
208 
209  /// Get the Inhouse member data.
210  ///
211  /// @return
212  /// Copy of the member data.
213  TInhouse GetInhouse(void) const;
214 
215  /// Assign a value to Inhouse data member.
216  ///
217  /// @param value
218  /// Value to assign
219  void SetInhouse(TInhouse value);
220 
221  /// Assign a value to Inhouse data member.
222  ///
223  /// @return
224  /// Reference to the data value.
225  TInhouse& SetInhouse(void);
226 
227  ///permission keys etc
228  /// Check if a value has been assigned to Context_attrs data member.
229  ///
230  /// Data member Context_attrs is optional;
231  /// its type is defined as 'typedef list< CRef< CTMgr_AttrSpec > > TContext_attrs'
232  /// @return
233  /// - true, if a value has been assigned.
234  /// - false, otherwise.
235  bool IsSetContext_attrs(void) const;
236 
237  /// Check if it is safe to call GetContext_attrs method.
238  ///
239  /// @return
240  /// - true, if the data member is getatable.
241  /// - false, otherwise.
242  bool CanGetContext_attrs(void) const;
243 
244  /// Reset Context_attrs data member.
245  void ResetContext_attrs(void);
246 
247  /// Get the Context_attrs member data.
248  ///
249  /// @return
250  /// Reference to the member data.
251  const TContext_attrs& GetContext_attrs(void) const;
252 
253  /// Assign a value to Context_attrs data member.
254  ///
255  /// @return
256  /// Reference to the data value.
257  TContext_attrs& SetContext_attrs(void);
258 
259  /// Reset the whole object
260  virtual void Reset(void);
261 
262 
263 private:
264  // Prohibit copy constructor and assignment operator
267 
268  // data
269  Uint4 m_set_State[1];
271  string m_Context;
272  bool m_Inhouse;
273  list< CRef< CTMgr_AttrSpec > > m_Context_attrs;
274 };
275 
276 /* @} */
277 
278 
279 
280 
281 
282 ///////////////////////////////////////////////////////////
283 ///////////////////// inline methods //////////////////////
284 ///////////////////////////////////////////////////////////
285 inline
287 {
288  return ((m_set_State[0] & 0x3) != 0);
289 }
290 
291 inline
293 {
294  return IsSetClient_name();
295 }
296 
297 inline
299 {
300  if (!CanGetClient_name()) {
301  ThrowUnassigned(0);
302  }
303  return m_Client_name;
304 }
305 
306 inline
308 {
310  m_set_State[0] |= 0x3;
311 }
312 
313 inline
315 {
316  m_Client_name = std::forward<CTMgr_ClientInfo_Base::TClient_name>(value);
317  m_set_State[0] |= 0x3;
318 }
319 
320 inline
322 {
323 #ifdef _DEBUG
324  if (!IsSetClient_name()) {
326  }
327 #endif
328  m_set_State[0] |= 0x1;
329  return m_Client_name;
330 }
331 
332 inline
334 {
335  return ((m_set_State[0] & 0xc) != 0);
336 }
337 
338 inline
340 {
341  return IsSetContext();
342 }
343 
344 inline
346 {
347  if (!CanGetContext()) {
348  ThrowUnassigned(1);
349  }
350  return m_Context;
351 }
352 
353 inline
355 {
356  m_Context = value;
357  m_set_State[0] |= 0xc;
358 }
359 
360 inline
362 {
363  m_Context = std::forward<CTMgr_ClientInfo_Base::TContext>(value);
364  m_set_State[0] |= 0xc;
365 }
366 
367 inline
369 {
370 #ifdef _DEBUG
371  if (!IsSetContext()) {
373  }
374 #endif
375  m_set_State[0] |= 0x4;
376  return m_Context;
377 }
378 
379 inline
381 {
382  return ((m_set_State[0] & 0x30) != 0);
383 }
384 
385 inline
387 {
388  return true;
389 }
390 
391 inline
393 {
394  m_Inhouse = false;
395  m_set_State[0] &= ~0x30;
396 }
397 
398 inline
400 {
401  ResetInhouse();
402 }
403 
404 inline
406 {
407  return m_Inhouse;
408 }
409 
410 inline
412 {
413  m_Inhouse = value;
414  m_set_State[0] |= 0x30;
415 }
416 
417 inline
419 {
420 #ifdef _DEBUG
421  if (!IsSetInhouse()) {
422  memset(&m_Inhouse,UnassignedByte(),sizeof(m_Inhouse));
423  }
424 #endif
425  m_set_State[0] |= 0x10;
426  return m_Inhouse;
427 }
428 
429 inline
431 {
432  return ((m_set_State[0] & 0xc0) != 0);
433 }
434 
435 inline
437 {
438  return true;
439 }
440 
441 inline
443 {
444  return m_Context_attrs;
445 }
446 
447 inline
449 {
450  m_set_State[0] |= 0x40;
451  return m_Context_attrs;
452 }
453 
454 ///////////////////////////////////////////////////////////
455 ////////////////// end of inline methods //////////////////
456 ///////////////////////////////////////////////////////////
457 
458 
459 
460 
461 
462 END_objects_SCOPE // namespace ncbi::objects::
463 
465 
466 
467 #endif // OBJECTS_TRACKMGR_TMGR_CLIENTINFO_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTMgr_AttrSpec –.
CTMgr_ClientInfo_Base –.
char value[7]
Definition: config.c:431
static char UnassignedByte(void)
Definition: serialbase.hpp:181
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
CTMgr_ClientInfo_Base & operator=(const CTMgr_ClientInfo_Base &)
void ResetInhouse(void)
Reset Inhouse data member.
bool IsSetClient_name(void) const
Check if a value has been assigned to Client_name data member.
const TContext_attrs & GetContext_attrs(void) const
Get the Context_attrs member data.
bool CanGetContext_attrs(void) const
Check if it is safe to call GetContext_attrs method.
void SetDefaultInhouse(void)
Assign default value to Inhouse data member.
CTMgr_ClientInfo_Base(const CTMgr_ClientInfo_Base &)
TContext_attrs & SetContext_attrs(void)
Assign a value to Context_attrs data member.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
bool CanGetContext(void) const
Check if it is safe to call GetContext method.
bool IsSetContext_attrs(void) const
permission keys etc Check if a value has been assigned to Context_attrs data member.
TClient_name & SetClient_name(void)
Assign a value to Client_name data member.
const TClient_name & GetClient_name(void) const
Get the Client_name member data.
TInhouse & SetInhouse(void)
Assign a value to Inhouse data member.
bool IsSetInhouse(void) const
Check if a value has been assigned to Inhouse data member.
bool CanGetInhouse(void) const
Check if it is safe to call GetInhouse method.
const TContext & GetContext(void) const
Get the Context member data.
TInhouse GetInhouse(void) const
Get the Inhouse member data.
TContext & SetContext(void)
Assign a value to Context data member.
list< CRef< CTMgr_AttrSpec > > TContext_attrs
list< CRef< CTMgr_AttrSpec > > m_Context_attrs
bool IsSetContext(void) const
Check if a value has been assigned to Context data member.
bool CanGetClient_name(void) const
Check if it is safe to call GetClient_name method.
static wxString GetContext(const wxString &str, int pos)
Defines to provide correct exporting from DLLs in Windows.
#define NCBI_TRACKMGR_EXPORT
Modified on Sat Dec 02 09:20:31 2023 by modify_doxy.py rev. 669887