NCBI C++ ToolKit
StringPropertyType_.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 StringPropertyType_.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/build-system/project_tree_builder/msbuild/msbuild_dataobj.xsd">msbuild_dataobj.xsd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/build-system/project_tree_builder/msbuild/msbuild_dataobj.def">msbuild_dataobj.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 msbuild__BUILD_SYSTEM_PROJECT_TREE_BUILDER_MSBUILD_STRINGPROPERTYTYPE_BASE_HPP
42 #define msbuild__BUILD_SYSTEM_PROJECT_TREE_BUILDER_MSBUILD_STRINGPROPERTYTYPE_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <string>
49 
50 #ifndef BEGIN_msbuild_SCOPE
51 # define BEGIN_msbuild_SCOPE BEGIN_SCOPE(msbuild)
52 # define END_msbuild_SCOPE END_SCOPE(msbuild)
53 #endif
54 BEGIN_msbuild_SCOPE // namespace msbuild::
55 
56 
57 // generated classes
58 
59 
60 /** @addtogroup dataspec_msbuild_dataobj
61  *
62  * @{
63  */
64 
65 /////////////////////////////////////////////////////////////////////////////
66 ///
67 /// CStringPropertyType_Base --
68 ///
69 
70 class CStringPropertyType_Base : public NCBI_NS_NCBI::CSerialObject
71 {
72  typedef NCBI_NS_NCBI::CSerialObject Tparent;
73 public:
74  // constructor
76  // destructor
77  virtual ~CStringPropertyType_Base(void);
78 
79  // type info
81 
82  /////////////////////////////////////////////////////////////////////////////
83  ///
84  /// C_Attlist --
85  ///
86 
87  class C_Attlist : public NCBI_NS_NCBI::CSerialObject
88  {
89  typedef NCBI_NS_NCBI::CSerialObject Tparent;
90  public:
91  // constructor
92  C_Attlist(void);
93  // destructor
94  ~C_Attlist(void);
95 
96  // type info
98 
99  // types
102 
103  // member index
104  enum class E_memberIndex {
105  e__allMandatory = 0,
106  e_Condition,
107  e_Label
108  };
109  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
110 
111  // getters
112  // setters
113 
114  /// ncbi: removed SetEnv
115  /// ncbi: removed XDCMake
116  /// ncbi: removed XSD
117  /// ncbi: removed VCMessage
118  ///Optional expression evaluated to determine whether the property should be evaluated
119  /// Check if a value has been assigned to Condition data member.
120  ///
121  /// Data member Condition is optional;
122  /// its type is defined as 'typedef NCBI_NS_STD::string TCondition'
123  /// @return
124  /// - true, if a value has been assigned.
125  /// - false, otherwise.
126  bool IsSetCondition(void) const;
127 
128  /// Check if it is safe to call GetCondition method.
129  ///
130  /// @return
131  /// - true, if the data member is getatable.
132  /// - false, otherwise.
133  bool CanGetCondition(void) const;
134 
135  /// Reset Condition data member.
136  void ResetCondition(void);
137 
138  /// Get the Condition member data.
139  ///
140  /// @return
141  /// Reference to the member data.
142  const TCondition& GetCondition(void) const;
143 
144  /// Assign a value to Condition data member.
145  ///
146  /// @param value
147  /// Value to assign
148  void SetCondition(const TCondition& value);
149  void SetCondition(TCondition&& value);
150 
151  /// Assign a value to Condition data member.
152  ///
153  /// @return
154  /// Reference to the data value.
155  TCondition& SetCondition(void);
156 
157  /// Optional expression. Used to identify or order system and user elements
158  /// Check if a value has been assigned to Label data member.
159  ///
160  /// Data member Label is optional;
161  /// its type is defined as 'typedef NCBI_NS_STD::string TLabel'
162  /// @return
163  /// - true, if a value has been assigned.
164  /// - false, otherwise.
165  bool IsSetLabel(void) const;
166 
167  /// Check if it is safe to call GetLabel method.
168  ///
169  /// @return
170  /// - true, if the data member is getatable.
171  /// - false, otherwise.
172  bool CanGetLabel(void) const;
173 
174  /// Reset Label data member.
175  void ResetLabel(void);
176 
177  /// Get the Label member data.
178  ///
179  /// @return
180  /// Reference to the member data.
181  const TLabel& GetLabel(void) const;
182 
183  /// Assign a value to Label data member.
184  ///
185  /// @param value
186  /// Value to assign
187  void SetLabel(const TLabel& value);
188  void SetLabel(TLabel&& value);
189 
190  /// Assign a value to Label data member.
191  ///
192  /// @return
193  /// Reference to the data value.
194  TLabel& SetLabel(void);
195 
196  /// Reset the whole object
197  void Reset(void);
198 
199 
200  private:
201  // Prohibit copy constructor and assignment operator
204 
205  // data
209  };
210  // types
213 
214  // member index
215  enum class E_memberIndex {
216  e__allMandatory = 0,
217  e_Attlist,
219  };
220  typedef Tparent::CMemberIndex<E_memberIndex, 3> TmemberIndex;
221 
222  // getters
223  // setters
224 
225  /// Check if a value has been assigned to Attlist data member.
226  ///
227  /// Data member Attlist is mandatory;
228  /// its type is defined as 'typedef C_Attlist TAttlist'
229  /// @return
230  /// - true, if a value has been assigned.
231  /// - false, otherwise.
232  bool IsSetAttlist(void) const;
233 
234  /// Check if it is safe to call GetAttlist method.
235  ///
236  /// @return
237  /// - true, if the data member is getatable.
238  /// - false, otherwise.
239  bool CanGetAttlist(void) const;
240 
241  /// Reset Attlist data member.
242  void ResetAttlist(void);
243 
244  /// Get the Attlist member data.
245  ///
246  /// @return
247  /// Reference to the member data.
248  const TAttlist& GetAttlist(void) const;
249 
250  /// Assign a value to Attlist data member.
251  ///
252  /// @param value
253  /// Reference to value.
254  void SetAttlist(TAttlist& value);
255 
256  /// Assign a value to Attlist data member.
257  ///
258  /// @return
259  /// Reference to the data value.
260  TAttlist& SetAttlist(void);
261 
262  /// Check if a value has been assigned to StringPropertyType data member.
263  ///
264  /// Data member StringPropertyType is mandatory;
265  /// its type is defined as 'typedef NCBI_NS_STD::string TStringPropertyType'
266  /// @return
267  /// - true, if a value has been assigned.
268  /// - false, otherwise.
269  bool IsSetStringPropertyType(void) const;
270 
271  /// Check if it is safe to call GetStringPropertyType method.
272  ///
273  /// @return
274  /// - true, if the data member is getatable.
275  /// - false, otherwise.
276  bool CanGetStringPropertyType(void) const;
277 
278  /// Reset StringPropertyType data member.
279  void ResetStringPropertyType(void);
280 
281  /// Get the StringPropertyType member data.
282  ///
283  /// @return
284  /// Reference to the member data.
285  const TStringPropertyType& GetStringPropertyType(void) const;
286 
287  /// Assign a value to StringPropertyType data member.
288  ///
289  /// @param value
290  /// Value to assign
293 
294  /// Assign a value to StringPropertyType data member.
295  ///
296  /// @return
297  /// Reference to the data value.
299 
300  /// Reset the whole object
301  virtual void Reset(void);
302 
303 
304 private:
305  // Prohibit copy constructor and assignment operator
308 
309  // data
311  NCBI_NS_NCBI::CRef< TAttlist > m_Attlist;
313 };
314 
315 /* @} */
316 
317 
318 
319 
320 
321 ///////////////////////////////////////////////////////////
322 ///////////////////// inline methods //////////////////////
323 ///////////////////////////////////////////////////////////
324 inline
326 {
327  return ((m_set_State[0] & 0x3) != 0);
328 }
329 
330 inline
332 {
333  return IsSetCondition();
334 }
335 
336 inline
338 {
339  if (!CanGetCondition()) {
340  ThrowUnassigned(0);
341  }
342  return m_Condition;
343 }
344 
345 inline
347 {
348  m_Condition = value;
349  m_set_State[0] |= 0x3;
350 }
351 
352 inline
354 {
355  m_Condition = std::forward<CStringPropertyType_Base::C_Attlist::TCondition>(value);
356  m_set_State[0] |= 0x3;
357 }
358 
359 inline
361 {
362 #ifdef _DEBUG
363  if (!IsSetCondition()) {
364  m_Condition = UnassignedString();
365  }
366 #endif
367  m_set_State[0] |= 0x1;
368  return m_Condition;
369 }
370 
371 inline
373 {
374  return ((m_set_State[0] & 0xc) != 0);
375 }
376 
377 inline
379 {
380  return IsSetLabel();
381 }
382 
383 inline
385 {
386  if (!CanGetLabel()) {
387  ThrowUnassigned(1);
388  }
389  return m_Label;
390 }
391 
392 inline
394 {
395  m_Label = value;
396  m_set_State[0] |= 0xc;
397 }
398 
399 inline
401 {
402  m_Label = std::forward<CStringPropertyType_Base::C_Attlist::TLabel>(value);
403  m_set_State[0] |= 0xc;
404 }
405 
406 inline
408 {
409 #ifdef _DEBUG
410  if (!IsSetLabel()) {
411  m_Label = UnassignedString();
412  }
413 #endif
414  m_set_State[0] |= 0x4;
415  return m_Label;
416 }
417 
418 inline
420 {
421  return m_Attlist.NotEmpty();
422 }
423 
424 inline
426 {
427  return true;
428 }
429 
430 inline
432 {
433  if ( !m_Attlist ) {
434  const_cast<CStringPropertyType_Base*>(this)->ResetAttlist();
435  }
436  return (*m_Attlist);
437 }
438 
439 inline
441 {
442  if ( !m_Attlist ) {
443  ResetAttlist();
444  }
445  return (*m_Attlist);
446 }
447 
448 inline
450 {
451  return ((m_set_State[0] & 0xc) != 0);
452 }
453 
454 inline
456 {
457  return IsSetStringPropertyType();
458 }
459 
460 inline
462 {
463  if (!CanGetStringPropertyType()) {
464  ThrowUnassigned(1);
465  }
466  return m_StringPropertyType;
467 }
468 
469 inline
471 {
473  m_set_State[0] |= 0xc;
474 }
475 
476 inline
478 {
479  m_StringPropertyType = std::forward<CStringPropertyType_Base::TStringPropertyType>(value);
480  m_set_State[0] |= 0xc;
481 }
482 
483 inline
485 {
486 #ifdef _DEBUG
487  if (!IsSetStringPropertyType()) {
488  m_StringPropertyType = UnassignedString();
489  }
490 #endif
491  m_set_State[0] |= 0x4;
492  return m_StringPropertyType;
493 }
494 
495 ///////////////////////////////////////////////////////////
496 ////////////////// end of inline methods //////////////////
497 ///////////////////////////////////////////////////////////
498 
499 
500 
501 
502 
503 END_msbuild_SCOPE // namespace msbuild::
504 
505 
506 #endif // msbuild__BUILD_SYSTEM_PROJECT_TREE_BUILDER_MSBUILD_STRINGPROPERTYTYPE_BASE_HPP
#define END_msbuild_SCOPE
#define BEGIN_msbuild_SCOPE
CStringPropertyType_Base –.
char value[7]
Definition: config.c:431
string
Definition: cgiapp.hpp:687
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
NCBI_NS_STD::string m_StringPropertyType
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
const TCondition & GetCondition(void) const
Get the Condition member data.
const TStringPropertyType & GetStringPropertyType(void) const
Get the StringPropertyType member data.
bool CanGetStringPropertyType(void) const
Check if it is safe to call GetStringPropertyType method.
bool IsSetLabel(void) const
Optional expression.
TCondition & SetCondition(void)
Assign a value to Condition data member.
NCBI_NS_NCBI::CSerialObject Tparent
NCBI_NS_NCBI::CSerialObject Tparent
bool CanGetCondition(void) const
Check if it is safe to call GetCondition method.
void ResetCondition(void)
Reset Condition data member.
virtual void Reset(void)
Reset the whole object.
bool CanGetLabel(void) const
Check if it is safe to call GetLabel method.
TStringPropertyType & SetStringPropertyType(void)
Assign a value to StringPropertyType data member.
bool IsSetCondition(void) const
ncbi: removed SetEnv ncbi: removed XDCMake ncbi: removed XSD ncbi: removed VCMessage Optional express...
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
void ResetStringPropertyType(void)
Reset StringPropertyType data member.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
C_Attlist & operator=(const C_Attlist &)
void Reset(void)
Reset the whole object.
bool IsSetStringPropertyType(void) const
Check if a value has been assigned to StringPropertyType data member.
CStringPropertyType_Base & operator=(const CStringPropertyType_Base &)
CStringPropertyType_Base(const CStringPropertyType_Base &)
NCBI_NS_STD::string TStringPropertyType
void ResetLabel(void)
Reset Label data member.
const TLabel & GetLabel(void) const
Get the Label member data.
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
TLabel & SetLabel(void)
Assign a value to Label data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
void ResetAttlist(void)
Reset Attlist data member.
Modified on Thu Dec 07 10:06:28 2023 by modify_doxy.py rev. 669887