NCBI C++ ToolKit
Reference_.cpp
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  * File Description:
27  * This code was generated by application DATATOOL
28  * using the following specifications:
29  * 'msbuild_dataobj.xsd'.
30  *
31  * ATTENTION:
32  * Don't edit or commit this file into CVS as this file will
33  * be overridden (by DATATOOL) without warning!
34  * ===========================================================================
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 #include <serial/serialimpl.hpp>
40 
41 // generated includes
44 BEGIN_msbuild_SCOPE // namespace msbuild::
45 
46 
47 // generated classes
48 
50 {
51  m_Include.erase();
52  m_set_State[0] &= ~0x3;
53 }
54 
56 {
57  m_Condition.erase();
58  m_set_State[0] &= ~0xc;
59 }
60 
62 {
63  m_Exclude.erase();
64  m_set_State[0] &= ~0x30;
65 }
66 
68 {
69  m_Remove.erase();
70  m_set_State[0] &= ~0xc0;
71 }
72 
74 {
75  m_Label.erase();
76  m_set_State[0] &= ~0x300;
77 }
78 
80 {
81  ResetInclude();
82  ResetCondition();
83  ResetExclude();
84  ResetRemove();
85  ResetLabel();
86 }
87 
89 {
90  SET_INTERNAL_NAME("Reference", "Attlist");
91  SET_CLASS_MODULE("msbuild_dataobj");
92  ADD_NAMED_STD_MEMBER("Include", m_Include)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
93  ADD_NAMED_STD_MEMBER("Condition", m_Condition)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
94  ADD_NAMED_STD_MEMBER("Exclude", m_Exclude)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
95  ADD_NAMED_STD_MEMBER("Remove", m_Remove)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
96  ADD_NAMED_STD_MEMBER("Label", m_Label)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
97  info->SetRandomOrder(true);
98  info->CodeVersion(22400);
99  info->DataSpec(ncbi::EDataSpec::eXSD);
100 }
102 
103 // constructor
105 {
106  memset(m_set_State,0,sizeof(m_set_State));
107 }
108 
109 // destructor
111 {
112 }
113 
114 
116 {
117  if ( m_choice != e_not_set )
118  ResetSelection();
119 }
120 
122 {
123  switch ( m_choice ) {
124  case e_HintPath:
125  case e_Name:
126  case e_FusionName:
127  case e_SpecificVersion:
128  case e_Aliases:
129  case e_Private:
130  case e_RequiredTargetFramework:
131  m_string.Destruct();
132  break;
133  case e_EmbedInteropTypes:
134  m_object->RemoveReference();
135  break;
136  default:
137  break;
138  }
139  m_choice = e_not_set;
140 }
141 
142 void CReference_Base::C_E_Reference::C_HNFSAPER::DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* pool)
143 {
144  switch ( index ) {
145  case e_EmbedInteropTypes:
146  (m_object = new(pool) msbuild::CEmbedInteropTypes())->AddReference();
147  break;
148  case e_HintPath:
149  case e_Name:
150  case e_FusionName:
151  case e_SpecificVersion:
152  case e_Aliases:
153  case e_Private:
154  case e_RequiredTargetFramework:
155  m_string.Construct();
156  break;
157  default:
158  break;
159  }
160  m_choice = index;
161 }
162 
164  "not set",
165  "HintPath",
166  "Name",
167  "FusionName",
168  "SpecificVersion",
169  "Aliases",
170  "Private",
171  "EmbedInteropTypes",
172  "RequiredTargetFramework"
173 };
174 
176 {
177  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
178 }
179 
181 {
182  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
183 }
184 
186 {
187  Select(e_HintPath, NCBI_NS_NCBI::eDoNotResetVariant);
188  *m_string = value;
189 }
190 
192 {
193  Select(e_Name, NCBI_NS_NCBI::eDoNotResetVariant);
194  *m_string = value;
195 }
196 
198 {
199  Select(e_FusionName, NCBI_NS_NCBI::eDoNotResetVariant);
200  *m_string = value;
201 }
202 
204 {
205  Select(e_SpecificVersion, NCBI_NS_NCBI::eDoNotResetVariant);
206  *m_string = value;
207 }
208 
210 {
211  Select(e_Aliases, NCBI_NS_NCBI::eDoNotResetVariant);
212  *m_string = value;
213 }
214 
216 {
217  Select(e_Private, NCBI_NS_NCBI::eDoNotResetVariant);
218  *m_string = value;
219 }
220 
222 {
223  CheckSelected(e_EmbedInteropTypes);
224  return *static_cast<const TEmbedInteropTypes*>(m_object);
225 }
226 
228 {
229  Select(e_EmbedInteropTypes, NCBI_NS_NCBI::eDoNotResetVariant);
230  return *static_cast<TEmbedInteropTypes*>(m_object);
231 }
232 
234 {
235  TEmbedInteropTypes* ptr = &value;
236  if ( m_choice != e_EmbedInteropTypes || m_object != ptr ) {
237  ResetSelection();
238  (m_object = ptr)->AddReference();
239  m_choice = e_EmbedInteropTypes;
240  }
241 }
242 
244 {
245  Select(e_RequiredTargetFramework, NCBI_NS_NCBI::eDoNotResetVariant);
246  *m_string = value;
247 }
248 
249 // helper methods
250 
251 // type info
253 {
254  SET_INTERNAL_NAME("Reference.Reference.E", "HNFSAPER");
255  SET_CHOICE_MODULE("msbuild_dataobj");
256  ADD_NAMED_BUF_CHOICE_VARIANT("HintPath", m_string, STD, (NCBI_NS_STD::string));
257  ADD_NAMED_BUF_CHOICE_VARIANT("Name", m_string, STD, (NCBI_NS_STD::string));
258  ADD_NAMED_BUF_CHOICE_VARIANT("FusionName", m_string, STD, (NCBI_NS_STD::string));
259  ADD_NAMED_BUF_CHOICE_VARIANT("SpecificVersion", m_string, STD, (NCBI_NS_STD::string));
260  ADD_NAMED_BUF_CHOICE_VARIANT("Aliases", m_string, STD, (NCBI_NS_STD::string));
261  ADD_NAMED_BUF_CHOICE_VARIANT("Private", m_string, STD, (NCBI_NS_STD::string));
262  ADD_NAMED_REF_CHOICE_VARIANT("EmbedInteropTypes", m_object, CEmbedInteropTypes);
263  ADD_NAMED_BUF_CHOICE_VARIANT("RequiredTargetFramework", m_string, STD, (NCBI_NS_STD::string));
264  info->CodeVersion(22400);
265  info->DataSpec(ncbi::EDataSpec::eXSD);
266 }
268 
269 // constructor
271  : m_choice(e_not_set)
272 {
273 }
274 
275 // destructor
277 {
278  Reset();
279 }
280 
281 
283 {
284  if ( !m_HNFSAPER ) {
285  m_HNFSAPER.Reset(new THNFSAPER());
286  return;
287  }
288  (*m_HNFSAPER).Reset();
289 }
290 
292 {
293  m_HNFSAPER.Reset(&value);
294 }
295 
297 {
298  ResetHNFSAPER();
299 }
300 
302 {
303  SET_INTERNAL_NAME("Reference.Reference", "E");
304  SET_CLASS_MODULE("msbuild_dataobj");
305  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
306  ADD_NAMED_REF_MEMBER("HNFSAPER", m_HNFSAPER, C_HNFSAPER)->SetNotag();
307  info->RandomOrder();
308  info->CodeVersion(22400);
309  info->DataSpec(ncbi::EDataSpec::eXSD);
310 }
312 
313 // constructor
315 {
316  memset(m_set_State,0,sizeof(m_set_State));
317  if ( !IsAllocatedInPool() ) {
318  ResetHNFSAPER();
319  }
320 }
321 
322 // destructor
324 {
325 }
326 
327 
329 {
330  if ( !m_Attlist ) {
331  m_Attlist.Reset(new TAttlist());
332  return;
333  }
334  (*m_Attlist).Reset();
335 }
336 
338 {
339  m_Attlist.Reset(&value);
340 }
341 
343 {
344  m_Reference.clear();
345  m_set_State[0] &= ~0xc;
346 }
347 
349 {
350  ResetAttlist();
351  ResetReference();
352 }
353 
355 {
356  SET_CLASS_MODULE("msbuild_dataobj");
357  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
358  ADD_NAMED_REF_MEMBER("Attlist", m_Attlist, C_Attlist)->SetAttlist();
359  ADD_NAMED_MEMBER("Reference", m_Reference, STL_list, (STL_CRef, (CLASS, (C_E_Reference))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNotag();
360  info->RandomOrder();
361  info->CodeVersion(22400);
362  info->DataSpec(ncbi::EDataSpec::eXSD);
363 }
365 
366 // constructor
368 {
369  memset(m_set_State,0,sizeof(m_set_State));
370  if ( !IsAllocatedInPool() ) {
371  ResetAttlist();
372  }
373 }
374 
375 // destructor
377 {
378 }
379 
380 
381 
382 END_msbuild_SCOPE // namespace msbuild::
383 
#define END_msbuild_SCOPE
#define BEGIN_msbuild_SCOPE
User-defined methods of the data storage class.
User-defined methods of the data storage class.
BEGIN_NAMED_BASE_CLASS_INFO("Reference", CReference)
Definition: Reference_.cpp:354
BEGIN_NAMED_CLASS_INFO("", CReference_Base::C_Attlist)
Definition: Reference_.cpp:88
BEGIN_NAMED_CHOICE_INFO("", CReference_Base::C_E_Reference::C_HNFSAPER)
Definition: Reference_.cpp:252
CEmbedInteropTypes –.
======================== ITEMS ===================================== Possible Types include SimpleIte...
Definition: Reference_.hpp:347
Class to keep track of the various BLAST references.
Definition: version.hpp:67
string
Definition: cgiapp.hpp:687
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:170
#define MEMBER_PTR(MemberName)
Definition: serialimpl.hpp:284
#define ADD_NAMED_MEMBER(MemberAlias, MemberName, TypeMacro, TypeMacroArgs)
Definition: serialimpl.hpp:342
#define ADD_NAMED_REF_MEMBER(MemberAlias, MemberName, ClassName)
Definition: serialimpl.hpp:357
#define END_CLASS_INFO
Definition: serialimpl.hpp:456
#define ADD_NAMED_REF_CHOICE_VARIANT(MemberAlias, MemberName, ClassName)
Definition: serialimpl.hpp:400
#define ADD_NAMED_STD_MEMBER(MemberAlias, MemberName)
Definition: serialimpl.hpp:345
#define SET_CLASS_MODULE(ModuleName)
Definition: serialimpl.hpp:444
#define SET_NAMESPACE(name)
Definition: serialimpl.hpp:450
#define END_CHOICE_INFO
Definition: serialimpl.hpp:506
#define SET_INTERNAL_NAME(OwnerName, MemberName)
Definition: serialimpl.hpp:447
#define SET_CHOICE_MODULE(ModuleName)
Definition: serialimpl.hpp:500
#define ADD_NAMED_BUF_CHOICE_VARIANT(MemberAlias, MemberName, TypeMacro, TypeMacroArgs)
Definition: serialimpl.hpp:385
@ eDoNotResetVariant
Definition: serialbase.hpp:78
TFusionName & SetFusionName(void)
Select the variant.
TSpecificVersion & SetSpecificVersion(void)
Select the variant.
NCBI_NS_STD::string m_Include
Definition: Reference_.hpp:333
TAliases & SetAliases(void)
Select the variant.
void Reset(void)
Reset the whole object.
Definition: Reference_.cpp:79
void ResetAttlist(void)
Reset Attlist data member.
Definition: Reference_.cpp:328
const TEmbedInteropTypes & GetEmbedInteropTypes(void) const
Get the variant data.
Definition: Reference_.cpp:221
void ResetInclude(void)
Reset Include data member.
Definition: Reference_.cpp:49
void DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool *pool=0)
Definition: Reference_.cpp:142
NCBI_NS_NCBI::CRef< THNFSAPER > m_HNFSAPER
Definition: Reference_.hpp:746
void ResetCondition(void)
Reset Condition data member.
Definition: Reference_.cpp:55
void Reset(void)
Reset the whole object.
Definition: Reference_.cpp:115
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_Reference > > m_Reference
Definition: Reference_.hpp:844
static NCBI_NS_STD::string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
Definition: Reference_.cpp:175
Uint4 m_set_State[1]
Definition: Reference_.hpp:842
THNFSAPER & SetHNFSAPER(void)
Assign a value to HNFSAPER data member.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
Definition: Reference_.cpp:180
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
Definition: Reference_.hpp:843
void ResetLabel(void)
Reset Label data member.
Definition: Reference_.cpp:73
virtual ~CReference_Base(void)
Definition: Reference_.cpp:376
TPrivate & SetPrivate(void)
Select the variant.
TRequiredTargetFramework & SetRequiredTargetFramework(void)
Select the variant.
static const char *const sm_SelectionNames[]
Definition: Reference_.hpp:678
THintPath & SetHintPath(void)
Select the variant.
TName & SetName(void)
Select the variant.
TEmbedInteropTypes & SetEmbedInteropTypes(void)
Select the variant.
Definition: Reference_.cpp:227
void ResetRemove(void)
Reset Remove data member.
Definition: Reference_.cpp:67
virtual void Reset(void)
Reset the whole object.
Definition: Reference_.cpp:348
void ResetExclude(void)
Reset Exclude data member.
Definition: Reference_.cpp:61
C_Attlist TAttlist
Definition: Reference_.hpp:749
void ResetSelection(void)
Reset the selection (set it to e_not_set).
Definition: Reference_.cpp:121
void Reset(void)
Reset the whole object.
Definition: Reference_.cpp:296
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
void ResetHNFSAPER(void)
Reset HNFSAPER data member.
Definition: Reference_.cpp:282
void ResetReference(void)
Reset Reference data member.
Definition: Reference_.cpp:342
@ e_not_set
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Tue May 07 08:16:42 2024 by modify_doxy.py rev. 669887