NCBI C++ ToolKit
CommonBytes_table_.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 CommonBytes_table_.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/seqtable/seqtable.asn">seqtable.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqtable/seqtable.def">seqtable.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_SEQTABLE_COMMONBYTES_TABLE_BASE_HPP
42 #define OBJECTS_SEQTABLE_COMMONBYTES_TABLE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <vector>
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_SeqTable
63  *
64  * @{
65  */
66 
67 /////////////////////////////////////////////////////////////////////////////
68 ///
69 /// CCommonBytes_table_Base --
70 ///
71 
73 {
75 public:
76  // constructor
78  // destructor
79  virtual ~CCommonBytes_table_Base(void);
80 
81  // type info
83 
84  // types
85  typedef vector< vector< char >* > TBytes;
86  typedef vector< int > TIndexes;
87 
88  // member index
89  enum class E_memberIndex {
90  e__allMandatory = 0,
91  e_bytes,
92  e_indexes
93  };
95 
96  // getters
97  // setters
98 
99  /// set of possible values
100  /// Check if a value has been assigned to Bytes data member.
101  ///
102  /// Data member Bytes is mandatory;
103  /// its type is defined as 'typedef vector< vector< char >* > TBytes'
104  /// @return
105  /// - true, if a value has been assigned.
106  /// - false, otherwise.
107  bool IsSetBytes(void) const;
108 
109  /// Check if it is safe to call GetBytes method.
110  ///
111  /// @return
112  /// - true, if the data member is getatable.
113  /// - false, otherwise.
114  bool CanGetBytes(void) const;
115 
116  /// Reset Bytes data member.
117  void ResetBytes(void);
118 
119  /// Get the Bytes member data.
120  ///
121  /// @return
122  /// Reference to the member data.
123  const TBytes& GetBytes(void) const;
124 
125  /// Assign a value to Bytes data member.
126  ///
127  /// @return
128  /// Reference to the data value.
129  TBytes& SetBytes(void);
130 
131  /// indexes of values in array 'bytes' for each data row
132  /// Check if a value has been assigned to Indexes data member.
133  ///
134  /// Data member Indexes is mandatory;
135  /// its type is defined as 'typedef vector< int > TIndexes'
136  /// @return
137  /// - true, if a value has been assigned.
138  /// - false, otherwise.
139  bool IsSetIndexes(void) const;
140 
141  /// Check if it is safe to call GetIndexes method.
142  ///
143  /// @return
144  /// - true, if the data member is getatable.
145  /// - false, otherwise.
146  bool CanGetIndexes(void) const;
147 
148  /// Reset Indexes data member.
149  void ResetIndexes(void);
150 
151  /// Get the Indexes member data.
152  ///
153  /// @return
154  /// Reference to the member data.
155  const TIndexes& GetIndexes(void) const;
156 
157  /// Assign a value to Indexes data member.
158  ///
159  /// @return
160  /// Reference to the data value.
161  TIndexes& SetIndexes(void);
162 
163  /// Reset the whole object
164  virtual void Reset(void);
165 
166 
167 private:
168  // Prohibit copy constructor and assignment operator
171 
172  // data
173  Uint4 m_set_State[1];
174  vector< vector< char >* > m_Bytes;
175  vector< int > m_Indexes;
176 };
177 
178 /* @} */
179 
180 
181 
182 
183 
184 ///////////////////////////////////////////////////////////
185 ///////////////////// inline methods //////////////////////
186 ///////////////////////////////////////////////////////////
187 inline
189 {
190  return ((m_set_State[0] & 0x3) != 0);
191 }
192 
193 inline
195 {
196  return true;
197 }
198 
199 inline
201 {
202  return m_Bytes;
203 }
204 
205 inline
207 {
208  m_set_State[0] |= 0x1;
209  return m_Bytes;
210 }
211 
212 inline
214 {
215  return ((m_set_State[0] & 0xc) != 0);
216 }
217 
218 inline
220 {
221  return true;
222 }
223 
224 inline
226 {
227  return m_Indexes;
228 }
229 
230 inline
232 {
233  m_set_State[0] |= 0x4;
234  return m_Indexes;
235 }
236 
237 ///////////////////////////////////////////////////////////
238 ////////////////// end of inline methods //////////////////
239 ///////////////////////////////////////////////////////////
240 
241 
242 
243 
244 
245 END_objects_SCOPE // namespace ncbi::objects::
246 
248 
249 
250 #endif // OBJECTS_SEQTABLE_COMMONBYTES_TABLE_BASE_HPP
CCommonBytes_table_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
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_SEQ_EXPORT
Definition: ncbi_export.h:825
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool IsSetBytes(void) const
set of possible values Check if a value has been assigned to Bytes data member.
TBytes & SetBytes(void)
Assign a value to Bytes data member.
CCommonBytes_table_Base & operator=(const CCommonBytes_table_Base &)
const TIndexes & GetIndexes(void) const
Get the Indexes member data.
vector< vector< char > * > m_Bytes
const TBytes & GetBytes(void) const
Get the Bytes member data.
bool CanGetBytes(void) const
Check if it is safe to call GetBytes method.
TIndexes & SetIndexes(void)
Assign a value to Indexes data member.
vector< vector< char > * > TBytes
bool IsSetIndexes(void) const
indexes of values in array 'bytes' for each data row Check if a value has been assigned to Indexes da...
bool CanGetIndexes(void) const
Check if it is safe to call GetIndexes method.
CCommonBytes_table_Base(const CCommonBytes_table_Base &)
Modified on Thu Apr 25 08:21:31 2024 by modify_doxy.py rev. 669887