NCBI C++ ToolKit
TMgr_AttrValueReply_.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_AttrValueReply_.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_ATTRVALUEREPLY_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_ATTRVALUEREPLY_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 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_TrackManager
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///
73 /// CTMgr_AttrValueReply_Base --
74 ///
75 
77 {
79 public:
80  // constructor
82  // destructor
83  virtual ~CTMgr_AttrValueReply_Base(void);
84 
85  // type info
87 
88  // types
89  typedef string TAttr_name;
90  typedef list< string > TValue_list;
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
95  e_attr_name,
96  e_value_list
97  };
99 
100  // getters
101  // setters
102 
103  /// Check if a value has been assigned to Attr_name data member.
104  ///
105  /// Data member Attr_name is mandatory;
106  /// its type is defined as 'typedef string TAttr_name'
107  /// @return
108  /// - true, if a value has been assigned.
109  /// - false, otherwise.
110  bool IsSetAttr_name(void) const;
111 
112  /// Check if it is safe to call GetAttr_name method.
113  ///
114  /// @return
115  /// - true, if the data member is getatable.
116  /// - false, otherwise.
117  bool CanGetAttr_name(void) const;
118 
119  /// Reset Attr_name data member.
120  void ResetAttr_name(void);
121 
122  /// Get the Attr_name member data.
123  ///
124  /// @return
125  /// Reference to the member data.
126  const TAttr_name& GetAttr_name(void) const;
127 
128  /// Assign a value to Attr_name data member.
129  ///
130  /// @param value
131  /// Value to assign
132  void SetAttr_name(const TAttr_name& value);
133  void SetAttr_name(TAttr_name&& value);
134 
135  /// Assign a value to Attr_name data member.
136  ///
137  /// @return
138  /// Reference to the data value.
139  TAttr_name& SetAttr_name(void);
140 
141  /// Check if a value has been assigned to Value_list data member.
142  ///
143  /// Data member Value_list is mandatory;
144  /// its type is defined as 'typedef list< string > TValue_list'
145  /// @return
146  /// - true, if a value has been assigned.
147  /// - false, otherwise.
148  bool IsSetValue_list(void) const;
149 
150  /// Check if it is safe to call GetValue_list method.
151  ///
152  /// @return
153  /// - true, if the data member is getatable.
154  /// - false, otherwise.
155  bool CanGetValue_list(void) const;
156 
157  /// Reset Value_list data member.
158  void ResetValue_list(void);
159 
160  /// Get the Value_list member data.
161  ///
162  /// @return
163  /// Reference to the member data.
164  const TValue_list& GetValue_list(void) const;
165 
166  /// Assign a value to Value_list data member.
167  ///
168  /// @return
169  /// Reference to the data value.
170  TValue_list& SetValue_list(void);
171 
172  /// Reset the whole object
173  virtual void Reset(void);
174 
175 
176 private:
177  // Prohibit copy constructor and assignment operator
180 
181  // data
182  Uint4 m_set_State[1];
183  string m_Attr_name;
184  list< string > m_Value_list;
185 };
186 
187 /* @} */
188 
189 
190 
191 
192 
193 ///////////////////////////////////////////////////////////
194 ///////////////////// inline methods //////////////////////
195 ///////////////////////////////////////////////////////////
196 inline
198 {
199  return ((m_set_State[0] & 0x3) != 0);
200 }
201 
202 inline
204 {
205  return IsSetAttr_name();
206 }
207 
208 inline
210 {
211  if (!CanGetAttr_name()) {
212  ThrowUnassigned(0);
213  }
214  return m_Attr_name;
215 }
216 
217 inline
219 {
220  m_Attr_name = value;
221  m_set_State[0] |= 0x3;
222 }
223 
224 inline
226 {
227  m_Attr_name = std::forward<CTMgr_AttrValueReply_Base::TAttr_name>(value);
228  m_set_State[0] |= 0x3;
229 }
230 
231 inline
233 {
234 #ifdef _DEBUG
235  if (!IsSetAttr_name()) {
237  }
238 #endif
239  m_set_State[0] |= 0x1;
240  return m_Attr_name;
241 }
242 
243 inline
245 {
246  return ((m_set_State[0] & 0xc) != 0);
247 }
248 
249 inline
251 {
252  return true;
253 }
254 
255 inline
257 {
258  return m_Value_list;
259 }
260 
261 inline
263 {
264  m_set_State[0] |= 0x4;
265  return m_Value_list;
266 }
267 
268 ///////////////////////////////////////////////////////////
269 ////////////////// end of inline methods //////////////////
270 ///////////////////////////////////////////////////////////
271 
272 
273 
274 
275 
276 END_objects_SCOPE // namespace ncbi::objects::
277 
279 
280 
281 #endif // OBJECTS_TRACKMGR_TMGR_ATTRVALUEREPLY_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
CTMgr_AttrValueReply_Base –.
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
TValue_list & SetValue_list(void)
Assign a value to Value_list data member.
bool CanGetValue_list(void) const
Check if it is safe to call GetValue_list method.
CTMgr_AttrValueReply_Base & operator=(const CTMgr_AttrValueReply_Base &)
const TAttr_name & GetAttr_name(void) const
Get the Attr_name member data.
bool CanGetAttr_name(void) const
Check if it is safe to call GetAttr_name method.
TAttr_name & SetAttr_name(void)
Assign a value to Attr_name data member.
CTMgr_AttrValueReply_Base(const CTMgr_AttrValueReply_Base &)
bool IsSetValue_list(void) const
Check if a value has been assigned to Value_list data member.
bool IsSetAttr_name(void) const
Check if a value has been assigned to Attr_name data member.
const TValue_list & GetValue_list(void) const
Get the Value_list member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Defines to provide correct exporting from DLLs in Windows.
#define NCBI_TRACKMGR_EXPORT
Modified on Fri Sep 20 14:57:50 2024 by modify_doxy.py rev. 669887