NCBI C++ ToolKit
COMReference_.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("COMReference", "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_Name:
125  case e_Guid:
126  case e_VersionMajor:
127  case e_VersionMinor:
128  case e_Lcid:
129  case e_WrapperTool:
130  case e_Isolated:
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 CCOMReference_Base::C_E_COMReference::C_NGVVLWIE::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_Name:
149  case e_Guid:
150  case e_VersionMajor:
151  case e_VersionMinor:
152  case e_Lcid:
153  case e_WrapperTool:
154  case e_Isolated:
155  m_string.Construct();
156  break;
157  default:
158  break;
159  }
160  m_choice = index;
161 }
162 
164  "not set",
165  "Name",
166  "Guid",
167  "VersionMajor",
168  "VersionMinor",
169  "Lcid",
170  "WrapperTool",
171  "Isolated",
172  "EmbedInteropTypes"
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_Name, NCBI_NS_NCBI::eDoNotResetVariant);
188  *m_string = value;
189 }
190 
192 {
193  Select(e_Guid, NCBI_NS_NCBI::eDoNotResetVariant);
194  *m_string = value;
195 }
196 
198 {
199  Select(e_VersionMajor, NCBI_NS_NCBI::eDoNotResetVariant);
200  *m_string = value;
201 }
202 
204 {
205  Select(e_VersionMinor, NCBI_NS_NCBI::eDoNotResetVariant);
206  *m_string = value;
207 }
208 
210 {
211  Select(e_Lcid, NCBI_NS_NCBI::eDoNotResetVariant);
212  *m_string = value;
213 }
214 
216 {
217  Select(e_WrapperTool, NCBI_NS_NCBI::eDoNotResetVariant);
218  *m_string = value;
219 }
220 
222 {
223  Select(e_Isolated, NCBI_NS_NCBI::eDoNotResetVariant);
224  *m_string = value;
225 }
226 
228 {
229  CheckSelected(e_EmbedInteropTypes);
230  return *static_cast<const TEmbedInteropTypes*>(m_object);
231 }
232 
234 {
235  Select(e_EmbedInteropTypes, NCBI_NS_NCBI::eDoNotResetVariant);
236  return *static_cast<TEmbedInteropTypes*>(m_object);
237 }
238 
240 {
241  TEmbedInteropTypes* ptr = &value;
242  if ( m_choice != e_EmbedInteropTypes || m_object != ptr ) {
243  ResetSelection();
244  (m_object = ptr)->AddReference();
245  m_choice = e_EmbedInteropTypes;
246  }
247 }
248 
249 // helper methods
250 
251 // type info
253 {
254  SET_INTERNAL_NAME("COMReference.COMReference.E", "NGVVLWIE");
255  SET_CHOICE_MODULE("msbuild_dataobj");
256  ADD_NAMED_BUF_CHOICE_VARIANT("Name", m_string, STD, (NCBI_NS_STD::string));
257  ADD_NAMED_BUF_CHOICE_VARIANT("Guid", m_string, STD, (NCBI_NS_STD::string));
258  ADD_NAMED_BUF_CHOICE_VARIANT("VersionMajor", m_string, STD, (NCBI_NS_STD::string));
259  ADD_NAMED_BUF_CHOICE_VARIANT("VersionMinor", m_string, STD, (NCBI_NS_STD::string));
260  ADD_NAMED_BUF_CHOICE_VARIANT("Lcid", m_string, STD, (NCBI_NS_STD::string));
261  ADD_NAMED_BUF_CHOICE_VARIANT("WrapperTool", m_string, STD, (NCBI_NS_STD::string));
262  ADD_NAMED_BUF_CHOICE_VARIANT("Isolated", m_string, STD, (NCBI_NS_STD::string));
263  ADD_NAMED_REF_CHOICE_VARIANT("EmbedInteropTypes", m_object, CEmbedInteropTypes);
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_NGVVLWIE ) {
285  m_NGVVLWIE.Reset(new TNGVVLWIE());
286  return;
287  }
288  (*m_NGVVLWIE).Reset();
289 }
290 
292 {
293  m_NGVVLWIE.Reset(&value);
294 }
295 
297 {
298  ResetNGVVLWIE();
299 }
300 
302 {
303  SET_INTERNAL_NAME("COMReference.COMReference", "E");
304  SET_CLASS_MODULE("msbuild_dataobj");
305  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
306  ADD_NAMED_REF_MEMBER("NGVVLWIE", m_NGVVLWIE, C_NGVVLWIE)->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  ResetNGVVLWIE();
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_COMReference.clear();
345  m_set_State[0] &= ~0xc;
346 }
347 
349 {
350  ResetAttlist();
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("COMReference", m_COMReference, STL_list, (STL_CRef, (CLASS, (C_E_COMReference))))->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.
BEGIN_NAMED_BASE_CLASS_INFO("COMReference", CCOMReference)
BEGIN_NAMED_CLASS_INFO("", CCOMReference_Base::C_Attlist)
BEGIN_NAMED_CHOICE_INFO("", CCOMReference_Base::C_E_COMReference::C_NGVVLWIE)
User-defined methods of the data storage class.
Reference to a COM component.
CCOMReference –.
CEmbedInteropTypes –.
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
virtual ~CCOMReference_Base(void)
void Reset(void)
Reset the whole object.
void ResetCondition(void)
Reset Condition data member.
void ResetInclude(void)
Reset Include data member.
void ResetNGVVLWIE(void)
Reset NGVVLWIE data member.
TEmbedInteropTypes & SetEmbedInteropTypes(void)
Select the variant.
TVersionMinor & SetVersionMinor(void)
Select the variant.
void ResetSelection(void)
Reset the selection (set it to e_not_set).
void ResetRemove(void)
Reset Remove data member.
TNGVVLWIE & SetNGVVLWIE(void)
Assign a value to NGVVLWIE data member.
TWrapperTool & SetWrapperTool(void)
Select the variant.
static NCBI_NS_STD::string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
void ResetExclude(void)
Reset Exclude data member.
void DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool *pool=0)
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_COMReference > > m_COMReference
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void Reset(void)
Reset the whole object.
NCBI_NS_STD::string m_Include
void ResetAttlist(void)
Reset Attlist data member.
void ResetCOMReference(void)
Reset COMReference data member.
virtual void Reset(void)
Reset the whole object.
void ResetLabel(void)
Reset Label data member.
TVersionMajor & SetVersionMajor(void)
Select the variant.
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
void Reset(void)
Reset the whole object.
const TEmbedInteropTypes & GetEmbedInteropTypes(void) const
Get the variant data.
TIsolated & SetIsolated(void)
Select the variant.
NCBI_NS_NCBI::CRef< TNGVVLWIE > m_NGVVLWIE
@ 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 Mon May 06 04:51:42 2024 by modify_doxy.py rev. 669887