NCBI C++ ToolKit
CommonString_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 CommonString_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_COMMONSTRING_TABLE_BASE_HPP
42 #define OBJECTS_SEQTABLE_COMMONSTRING_TABLE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
49 #include <vector>
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_SeqTable
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CCommonString_table_Base --
71 ///
72 
74 {
76 public:
77  // constructor
79  // destructor
80  virtual ~CCommonString_table_Base(void);
81 
82  // type info
84 
85  // types
86  typedef vector< CStringUTF8 > TStrings;
87  typedef vector< int > TIndexes;
88 
89  // member index
90  enum class E_memberIndex {
91  e__allMandatory = 0,
92  e_strings,
93  e_indexes
94  };
96 
97  // getters
98  // setters
99 
100  /// set of possible values
101  /// Check if a value has been assigned to Strings data member.
102  ///
103  /// Data member Strings is mandatory;
104  /// its type is defined as 'typedef vector< CStringUTF8 > TStrings'
105  /// @return
106  /// - true, if a value has been assigned.
107  /// - false, otherwise.
108  bool IsSetStrings(void) const;
109 
110  /// Check if it is safe to call GetStrings method.
111  ///
112  /// @return
113  /// - true, if the data member is getatable.
114  /// - false, otherwise.
115  bool CanGetStrings(void) const;
116 
117  /// Reset Strings data member.
118  void ResetStrings(void);
119 
120  /// Get the Strings member data.
121  ///
122  /// @return
123  /// Reference to the member data.
124  const TStrings& GetStrings(void) const;
125 
126  /// Assign a value to Strings data member.
127  ///
128  /// @return
129  /// Reference to the data value.
130  TStrings& SetStrings(void);
131 
132  /// indexes of values in array 'strings' for each data row
133  /// Check if a value has been assigned to Indexes data member.
134  ///
135  /// Data member Indexes is mandatory;
136  /// its type is defined as 'typedef vector< int > TIndexes'
137  /// @return
138  /// - true, if a value has been assigned.
139  /// - false, otherwise.
140  bool IsSetIndexes(void) const;
141 
142  /// Check if it is safe to call GetIndexes method.
143  ///
144  /// @return
145  /// - true, if the data member is getatable.
146  /// - false, otherwise.
147  bool CanGetIndexes(void) const;
148 
149  /// Reset Indexes data member.
150  void ResetIndexes(void);
151 
152  /// Get the Indexes member data.
153  ///
154  /// @return
155  /// Reference to the member data.
156  const TIndexes& GetIndexes(void) const;
157 
158  /// Assign a value to Indexes data member.
159  ///
160  /// @return
161  /// Reference to the data value.
162  TIndexes& SetIndexes(void);
163 
164  /// Reset the whole object
165  virtual void Reset(void);
166 
167 
168 private:
169  // Prohibit copy constructor and assignment operator
172 
173  // data
174  Uint4 m_set_State[1];
175  vector< CStringUTF8 > m_Strings;
176  vector< int > m_Indexes;
177 };
178 
179 /* @} */
180 
181 
182 
183 
184 
185 ///////////////////////////////////////////////////////////
186 ///////////////////// inline methods //////////////////////
187 ///////////////////////////////////////////////////////////
188 inline
190 {
191  return ((m_set_State[0] & 0x3) != 0);
192 }
193 
194 inline
196 {
197  return true;
198 }
199 
200 inline
202 {
203  return m_Strings;
204 }
205 
206 inline
208 {
209  m_set_State[0] |= 0x1;
210  return m_Strings;
211 }
212 
213 inline
215 {
216  return ((m_set_State[0] & 0xc) != 0);
217 }
218 
219 inline
221 {
222  return true;
223 }
224 
225 inline
227 {
228  return m_Indexes;
229 }
230 
231 inline
233 {
234  m_set_State[0] |= 0x4;
235  return m_Indexes;
236 }
237 
238 ///////////////////////////////////////////////////////////
239 ////////////////// end of inline methods //////////////////
240 ///////////////////////////////////////////////////////////
241 
242 
243 
244 
245 
246 END_objects_SCOPE // namespace ncbi::objects::
247 
249 
250 
251 #endif // OBJECTS_SEQTABLE_COMMONSTRING_TABLE_BASE_HPP
CCommonString_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
bool IsSetStrings(void) const
set of possible values Check if a value has been assigned to Strings data member.
TStrings & SetStrings(void)
Assign a value to Strings data member.
bool IsSetIndexes(void) const
indexes of values in array 'strings' for each data row Check if a value has been assigned to Indexes ...
const TIndexes & GetIndexes(void) const
Get the Indexes member data.
bool CanGetStrings(void) const
Check if it is safe to call GetStrings method.
TIndexes & SetIndexes(void)
Assign a value to Indexes data member.
bool CanGetIndexes(void) const
Check if it is safe to call GetIndexes method.
vector< CStringUTF8 > TStrings
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
vector< CStringUTF8 > m_Strings
CCommonString_table_Base(const CCommonString_table_Base &)
const TStrings & GetStrings(void) const
Get the Strings member data.
CCommonString_table_Base & operator=(const CCommonString_table_Base &)
Modified on Sun Apr 14 05:25:36 2024 by modify_doxy.py rev. 669887