NCBI C++ ToolKit
Trans_matrix_.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 Trans_matrix_.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/mmdb3/mmdb3.asn">mmdb3.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/mmdb3/mmdb3.def">mmdb3.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_MMDB3_TRANS_MATRIX_BASE_HPP
42 #define OBJECTS_MMDB3_TRANS_MATRIX_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 // generated classes
56 
57 
58 /** @addtogroup dataspec_MMDB_Features
59  *
60  * @{
61  */
62 
63 /////////////////////////////////////////////////////////////////////////////
64 ///
65 /// CTrans_matrix_Base --
66 ///
67 
69 {
71 public:
72  // constructor
73  CTrans_matrix_Base(void);
74  // destructor
75  virtual ~CTrans_matrix_Base(void);
76 
77  // type info
79 
80  // types
81  typedef int TScale_factor;
82  typedef int TTran_1;
83  typedef int TTran_2;
84  typedef int TTran_3;
85 
86  // member index
87  enum class E_memberIndex {
88  e__allMandatory = 0,
89  e_scale_factor,
90  e_tran_1,
91  e_tran_2,
92  e_tran_3
93  };
95 
96  // getters
97  // setters
98 
99  /// Check if a value has been assigned to Scale_factor data member.
100  ///
101  /// Data member Scale_factor is mandatory;
102  /// its type is defined as 'typedef int TScale_factor'
103  /// @return
104  /// - true, if a value has been assigned.
105  /// - false, otherwise.
106  bool IsSetScale_factor(void) const;
107 
108  /// Check if it is safe to call GetScale_factor method.
109  ///
110  /// @return
111  /// - true, if the data member is getatable.
112  /// - false, otherwise.
113  bool CanGetScale_factor(void) const;
114 
115  /// Reset Scale_factor data member.
116  void ResetScale_factor(void);
117 
118  /// Get the Scale_factor member data.
119  ///
120  /// @return
121  /// Copy of the member data.
122  TScale_factor GetScale_factor(void) const;
123 
124  /// Assign a value to Scale_factor data member.
125  ///
126  /// @param value
127  /// Value to assign
128  void SetScale_factor(TScale_factor value);
129 
130  /// Assign a value to Scale_factor data member.
131  ///
132  /// @return
133  /// Reference to the data value.
134  TScale_factor& SetScale_factor(void);
135 
136  /// Check if a value has been assigned to Tran_1 data member.
137  ///
138  /// Data member Tran_1 is mandatory;
139  /// its type is defined as 'typedef int TTran_1'
140  /// @return
141  /// - true, if a value has been assigned.
142  /// - false, otherwise.
143  bool IsSetTran_1(void) const;
144 
145  /// Check if it is safe to call GetTran_1 method.
146  ///
147  /// @return
148  /// - true, if the data member is getatable.
149  /// - false, otherwise.
150  bool CanGetTran_1(void) const;
151 
152  /// Reset Tran_1 data member.
153  void ResetTran_1(void);
154 
155  /// Get the Tran_1 member data.
156  ///
157  /// @return
158  /// Copy of the member data.
159  TTran_1 GetTran_1(void) const;
160 
161  /// Assign a value to Tran_1 data member.
162  ///
163  /// @param value
164  /// Value to assign
165  void SetTran_1(TTran_1 value);
166 
167  /// Assign a value to Tran_1 data member.
168  ///
169  /// @return
170  /// Reference to the data value.
171  TTran_1& SetTran_1(void);
172 
173  /// Check if a value has been assigned to Tran_2 data member.
174  ///
175  /// Data member Tran_2 is mandatory;
176  /// its type is defined as 'typedef int TTran_2'
177  /// @return
178  /// - true, if a value has been assigned.
179  /// - false, otherwise.
180  bool IsSetTran_2(void) const;
181 
182  /// Check if it is safe to call GetTran_2 method.
183  ///
184  /// @return
185  /// - true, if the data member is getatable.
186  /// - false, otherwise.
187  bool CanGetTran_2(void) const;
188 
189  /// Reset Tran_2 data member.
190  void ResetTran_2(void);
191 
192  /// Get the Tran_2 member data.
193  ///
194  /// @return
195  /// Copy of the member data.
196  TTran_2 GetTran_2(void) const;
197 
198  /// Assign a value to Tran_2 data member.
199  ///
200  /// @param value
201  /// Value to assign
202  void SetTran_2(TTran_2 value);
203 
204  /// Assign a value to Tran_2 data member.
205  ///
206  /// @return
207  /// Reference to the data value.
208  TTran_2& SetTran_2(void);
209 
210  /// Check if a value has been assigned to Tran_3 data member.
211  ///
212  /// Data member Tran_3 is mandatory;
213  /// its type is defined as 'typedef int TTran_3'
214  /// @return
215  /// - true, if a value has been assigned.
216  /// - false, otherwise.
217  bool IsSetTran_3(void) const;
218 
219  /// Check if it is safe to call GetTran_3 method.
220  ///
221  /// @return
222  /// - true, if the data member is getatable.
223  /// - false, otherwise.
224  bool CanGetTran_3(void) const;
225 
226  /// Reset Tran_3 data member.
227  void ResetTran_3(void);
228 
229  /// Get the Tran_3 member data.
230  ///
231  /// @return
232  /// Copy of the member data.
233  TTran_3 GetTran_3(void) const;
234 
235  /// Assign a value to Tran_3 data member.
236  ///
237  /// @param value
238  /// Value to assign
239  void SetTran_3(TTran_3 value);
240 
241  /// Assign a value to Tran_3 data member.
242  ///
243  /// @return
244  /// Reference to the data value.
245  TTran_3& SetTran_3(void);
246 
247  /// Reset the whole object
248  virtual void Reset(void);
249 
250 
251 private:
252  // Prohibit copy constructor and assignment operator
255 
256  // data
257  Uint4 m_set_State[1];
259  int m_Tran_1;
260  int m_Tran_2;
261  int m_Tran_3;
262 };
263 
264 /* @} */
265 
266 
267 
268 
269 
270 ///////////////////////////////////////////////////////////
271 ///////////////////// inline methods //////////////////////
272 ///////////////////////////////////////////////////////////
273 inline
275 {
276  return ((m_set_State[0] & 0x3) != 0);
277 }
278 
279 inline
281 {
282  return IsSetScale_factor();
283 }
284 
285 inline
287 {
288  m_Scale_factor = 0;
289  m_set_State[0] &= ~0x3;
290 }
291 
292 inline
294 {
295  if (!CanGetScale_factor()) {
296  ThrowUnassigned(0);
297  }
298  return m_Scale_factor;
299 }
300 
301 inline
303 {
305  m_set_State[0] |= 0x3;
306 }
307 
308 inline
310 {
311 #ifdef _DEBUG
312  if (!IsSetScale_factor()) {
313  memset(&m_Scale_factor,UnassignedByte(),sizeof(m_Scale_factor));
314  }
315 #endif
316  m_set_State[0] |= 0x1;
317  return m_Scale_factor;
318 }
319 
320 inline
322 {
323  return ((m_set_State[0] & 0xc) != 0);
324 }
325 
326 inline
328 {
329  return IsSetTran_1();
330 }
331 
332 inline
334 {
335  m_Tran_1 = 0;
336  m_set_State[0] &= ~0xc;
337 }
338 
339 inline
341 {
342  if (!CanGetTran_1()) {
343  ThrowUnassigned(1);
344  }
345  return m_Tran_1;
346 }
347 
348 inline
350 {
351  m_Tran_1 = value;
352  m_set_State[0] |= 0xc;
353 }
354 
355 inline
357 {
358 #ifdef _DEBUG
359  if (!IsSetTran_1()) {
360  memset(&m_Tran_1,UnassignedByte(),sizeof(m_Tran_1));
361  }
362 #endif
363  m_set_State[0] |= 0x4;
364  return m_Tran_1;
365 }
366 
367 inline
369 {
370  return ((m_set_State[0] & 0x30) != 0);
371 }
372 
373 inline
375 {
376  return IsSetTran_2();
377 }
378 
379 inline
381 {
382  m_Tran_2 = 0;
383  m_set_State[0] &= ~0x30;
384 }
385 
386 inline
388 {
389  if (!CanGetTran_2()) {
390  ThrowUnassigned(2);
391  }
392  return m_Tran_2;
393 }
394 
395 inline
397 {
398  m_Tran_2 = value;
399  m_set_State[0] |= 0x30;
400 }
401 
402 inline
404 {
405 #ifdef _DEBUG
406  if (!IsSetTran_2()) {
407  memset(&m_Tran_2,UnassignedByte(),sizeof(m_Tran_2));
408  }
409 #endif
410  m_set_State[0] |= 0x10;
411  return m_Tran_2;
412 }
413 
414 inline
416 {
417  return ((m_set_State[0] & 0xc0) != 0);
418 }
419 
420 inline
422 {
423  return IsSetTran_3();
424 }
425 
426 inline
428 {
429  m_Tran_3 = 0;
430  m_set_State[0] &= ~0xc0;
431 }
432 
433 inline
435 {
436  if (!CanGetTran_3()) {
437  ThrowUnassigned(3);
438  }
439  return m_Tran_3;
440 }
441 
442 inline
444 {
445  m_Tran_3 = value;
446  m_set_State[0] |= 0xc0;
447 }
448 
449 inline
451 {
452 #ifdef _DEBUG
453  if (!IsSetTran_3()) {
454  memset(&m_Tran_3,UnassignedByte(),sizeof(m_Tran_3));
455  }
456 #endif
457  m_set_State[0] |= 0x40;
458  return m_Tran_3;
459 }
460 
461 ///////////////////////////////////////////////////////////
462 ////////////////// end of inline methods //////////////////
463 ///////////////////////////////////////////////////////////
464 
465 
466 
467 
468 
469 END_objects_SCOPE // namespace ncbi::objects::
470 
472 
473 
474 #endif // OBJECTS_MMDB3_TRANS_MATRIX_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTrans_matrix_Base –.
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
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_MMDB3_EXPORT
Definition: ncbi_export.h:640
bool CanGetTran_3(void) const
Check if it is safe to call GetTran_3 method.
CTrans_matrix_Base & operator=(const CTrans_matrix_Base &)
CTrans_matrix_Base(const CTrans_matrix_Base &)
TTran_2 & SetTran_2(void)
Assign a value to Tran_2 data member.
bool IsSetTran_1(void) const
Check if a value has been assigned to Tran_1 data member.
TTran_3 & SetTran_3(void)
Assign a value to Tran_3 data member.
TTran_1 GetTran_1(void) const
Get the Tran_1 member data.
TScale_factor & SetScale_factor(void)
Assign a value to Scale_factor data member.
TTran_2 GetTran_2(void) const
Get the Tran_2 member data.
TScale_factor GetScale_factor(void) const
Get the Scale_factor member data.
TTran_3 GetTran_3(void) const
Get the Tran_3 member data.
bool CanGetScale_factor(void) const
Check if it is safe to call GetScale_factor method.
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
void ResetTran_3(void)
Reset Tran_3 data member.
bool IsSetScale_factor(void) const
Check if a value has been assigned to Scale_factor data member.
bool IsSetTran_2(void) const
Check if a value has been assigned to Tran_2 data member.
bool CanGetTran_2(void) const
Check if it is safe to call GetTran_2 method.
void ResetTran_2(void)
Reset Tran_2 data member.
void ResetScale_factor(void)
Reset Scale_factor data member.
CSerialObject Tparent
void ResetTran_1(void)
Reset Tran_1 data member.
TTran_1 & SetTran_1(void)
Assign a value to Tran_1 data member.
bool CanGetTran_1(void) const
Check if it is safe to call GetTran_1 method.
bool IsSetTran_3(void) const
Check if a value has been assigned to Tran_3 data member.
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Mon May 06 04:48:40 2024 by modify_doxy.py rev. 669887