NCBI C++ ToolKit
EmbeddedResource_.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
43 BEGIN_msbuild_SCOPE // namespace msbuild::
44 
45 
46 // generated classes
47 
49 {
50  m_Include.erase();
51  m_set_State[0] &= ~0x3;
52 }
53 
55 {
56  m_Condition.erase();
57  m_set_State[0] &= ~0xc;
58 }
59 
61 {
62  m_Exclude.erase();
63  m_set_State[0] &= ~0x30;
64 }
65 
67 {
68  m_Remove.erase();
69  m_set_State[0] &= ~0xc0;
70 }
71 
73 {
74  m_Label.erase();
75  m_set_State[0] &= ~0x300;
76 }
77 
79 {
80  ResetInclude();
81  ResetCondition();
82  ResetExclude();
83  ResetRemove();
84  ResetLabel();
85 }
86 
88 {
89  SET_INTERNAL_NAME("EmbeddedResource", "Attlist");
90  SET_CLASS_MODULE("msbuild_dataobj");
91  ADD_NAMED_STD_MEMBER("Include", m_Include)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
92  ADD_NAMED_STD_MEMBER("Condition", m_Condition)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
93  ADD_NAMED_STD_MEMBER("Exclude", m_Exclude)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
94  ADD_NAMED_STD_MEMBER("Remove", m_Remove)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
95  ADD_NAMED_STD_MEMBER("Label", m_Label)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
96  info->SetRandomOrder(true);
97  info->CodeVersion(22400);
98  info->DataSpec(ncbi::EDataSpec::eXSD);
99 }
101 
102 // constructor
104 {
105  memset(m_set_State,0,sizeof(m_set_State));
106 }
107 
108 // destructor
110 {
111 }
112 
113 
115 {
116  if ( m_choice != e_not_set )
117  ResetSelection();
118 }
119 
121 {
122  switch ( m_choice ) {
123  case e_DependentUpon:
124  case e_Generator:
125  case e_LastGenOutput:
126  case e_CustomToolNamespace:
127  case e_Link:
128  case e_Visible:
129  case e_SubType:
130  case e_CopyToOutputDirectory:
131  case e_LogicalName:
132  m_string.Destruct();
133  break;
134  default:
135  break;
136  }
137  m_choice = e_not_set;
138 }
139 
141 {
142  switch ( index ) {
143  case e_DependentUpon:
144  case e_Generator:
145  case e_LastGenOutput:
146  case e_CustomToolNamespace:
147  case e_Link:
148  case e_Visible:
149  case e_SubType:
150  case e_CopyToOutputDirectory:
151  case e_LogicalName:
152  m_string.Construct();
153  break;
154  default:
155  break;
156  }
157  m_choice = index;
158 }
159 
161  "not set",
162  "DependentUpon",
163  "Generator",
164  "LastGenOutput",
165  "CustomToolNamespace",
166  "Link",
167  "Visible",
168  "SubType",
169  "CopyToOutputDirectory",
170  "LogicalName"
171 };
172 
174 {
175  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
176 }
177 
179 {
180  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
181 }
182 
184 {
185  Select(e_DependentUpon, NCBI_NS_NCBI::eDoNotResetVariant);
186  *m_string = value;
187 }
188 
190 {
191  Select(e_Generator, NCBI_NS_NCBI::eDoNotResetVariant);
192  *m_string = value;
193 }
194 
196 {
197  Select(e_LastGenOutput, NCBI_NS_NCBI::eDoNotResetVariant);
198  *m_string = value;
199 }
200 
202 {
203  Select(e_CustomToolNamespace, NCBI_NS_NCBI::eDoNotResetVariant);
204  *m_string = value;
205 }
206 
208 {
209  Select(e_Link, NCBI_NS_NCBI::eDoNotResetVariant);
210  *m_string = value;
211 }
212 
214 {
215  Select(e_Visible, NCBI_NS_NCBI::eDoNotResetVariant);
216  *m_string = value;
217 }
218 
220 {
221  Select(e_SubType, NCBI_NS_NCBI::eDoNotResetVariant);
222  *m_string = value;
223 }
224 
226 {
227  Select(e_CopyToOutputDirectory, NCBI_NS_NCBI::eDoNotResetVariant);
228  *m_string = value;
229 }
230 
232 {
233  Select(e_LogicalName, NCBI_NS_NCBI::eDoNotResetVariant);
234  *m_string = value;
235 }
236 
237 // helper methods
238 
239 // type info
241 {
242  SET_INTERNAL_NAME("EmbeddedResource.EmbeddedResource.E", "DGLCLVSCL");
243  SET_CHOICE_MODULE("msbuild_dataobj");
244  ADD_NAMED_BUF_CHOICE_VARIANT("DependentUpon", m_string, STD, (NCBI_NS_STD::string));
245  ADD_NAMED_BUF_CHOICE_VARIANT("Generator", m_string, STD, (NCBI_NS_STD::string));
246  ADD_NAMED_BUF_CHOICE_VARIANT("LastGenOutput", m_string, STD, (NCBI_NS_STD::string));
247  ADD_NAMED_BUF_CHOICE_VARIANT("CustomToolNamespace", m_string, STD, (NCBI_NS_STD::string));
249  ADD_NAMED_BUF_CHOICE_VARIANT("Visible", m_string, STD, (NCBI_NS_STD::string));
250  ADD_NAMED_BUF_CHOICE_VARIANT("SubType", m_string, STD, (NCBI_NS_STD::string));
251  ADD_NAMED_BUF_CHOICE_VARIANT("CopyToOutputDirectory", m_string, STD, (NCBI_NS_STD::string));
252  ADD_NAMED_BUF_CHOICE_VARIANT("LogicalName", m_string, STD, (NCBI_NS_STD::string));
253  info->CodeVersion(22400);
254  info->DataSpec(ncbi::EDataSpec::eXSD);
255 }
257 
258 // constructor
260  : m_choice(e_not_set)
261 {
262 }
263 
264 // destructor
266 {
267  Reset();
268 }
269 
270 
272 {
273  if ( !m_DGLCLVSCL ) {
274  m_DGLCLVSCL.Reset(new TDGLCLVSCL());
275  return;
276  }
277  (*m_DGLCLVSCL).Reset();
278 }
279 
281 {
282  m_DGLCLVSCL.Reset(&value);
283 }
284 
286 {
287  ResetDGLCLVSCL();
288 }
289 
291 {
292  SET_INTERNAL_NAME("EmbeddedResource.EmbeddedResource", "E");
293  SET_CLASS_MODULE("msbuild_dataobj");
294  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
295  ADD_NAMED_REF_MEMBER("DGLCLVSCL", m_DGLCLVSCL, C_DGLCLVSCL)->SetNotag();
296  info->RandomOrder();
297  info->CodeVersion(22400);
298  info->DataSpec(ncbi::EDataSpec::eXSD);
299 }
301 
302 // constructor
304 {
305  memset(m_set_State,0,sizeof(m_set_State));
306  if ( !IsAllocatedInPool() ) {
307  ResetDGLCLVSCL();
308  }
309 }
310 
311 // destructor
313 {
314 }
315 
316 
318 {
319  if ( !m_Attlist ) {
320  m_Attlist.Reset(new TAttlist());
321  return;
322  }
323  (*m_Attlist).Reset();
324 }
325 
327 {
328  m_Attlist.Reset(&value);
329 }
330 
332 {
333  m_EmbeddedResource.clear();
334  m_set_State[0] &= ~0xc;
335 }
336 
338 {
339  ResetAttlist();
341 }
342 
344 {
345  SET_CLASS_MODULE("msbuild_dataobj");
346  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
347  ADD_NAMED_REF_MEMBER("Attlist", m_Attlist, C_Attlist)->SetAttlist();
348  ADD_NAMED_MEMBER("EmbeddedResource", m_EmbeddedResource, STL_list, (STL_CRef, (CLASS, (C_E_EmbeddedResource))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNotag();
349  info->RandomOrder();
350  info->CodeVersion(22400);
351  info->DataSpec(ncbi::EDataSpec::eXSD);
352 }
354 
355 // constructor
357 {
358  memset(m_set_State,0,sizeof(m_set_State));
359  if ( !IsAllocatedInPool() ) {
360  ResetAttlist();
361  }
362 }
363 
364 // destructor
366 {
367 }
368 
369 
370 
371 END_msbuild_SCOPE // namespace msbuild::
372 
#define END_msbuild_SCOPE
#define BEGIN_msbuild_SCOPE
User-defined methods of the data storage class.
BEGIN_NAMED_BASE_CLASS_INFO("EmbeddedResource", CEmbeddedResource)
BEGIN_NAMED_CLASS_INFO("", CEmbeddedResource_Base::C_Attlist)
BEGIN_NAMED_CHOICE_INFO("", CEmbeddedResource_Base::C_E_EmbeddedResource::C_DGLCLVSCL)
Resources to be embedded in the generated assembly.
CEmbeddedResource –.
string
Definition: cgiapp.hpp:690
#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_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 void Reset(void)
Reset the whole object.
TLastGenOutput & SetLastGenOutput(void)
Select the variant.
void ResetCondition(void)
Reset Condition data member.
TDGLCLVSCL & SetDGLCLVSCL(void)
Assign a value to DGLCLVSCL data member.
void ResetEmbeddedResource(void)
Reset EmbeddedResource data member.
void Reset(void)
Reset the whole object.
void ResetAttlist(void)
Reset Attlist data member.
TCopyToOutputDirectory & SetCopyToOutputDirectory(void)
Select the variant.
NCBI_NS_NCBI::CRef< TDGLCLVSCL > m_DGLCLVSCL
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool *pool=0)
void ResetExclude(void)
Reset Exclude data member.
void ResetDGLCLVSCL(void)
Reset DGLCLVSCL data member.
void ResetLabel(void)
Reset Label data member.
TCustomToolNamespace & SetCustomToolNamespace(void)
Select the variant.
TLogicalName & SetLogicalName(void)
Select the variant.
virtual ~CEmbeddedResource_Base(void)
void ResetInclude(void)
Reset Include data member.
void Reset(void)
Reset the whole object.
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_EmbeddedResource > > m_EmbeddedResource
TDependentUpon & SetDependentUpon(void)
Select the variant.
void ResetSelection(void)
Reset the selection (set it to e_not_set).
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
void ResetRemove(void)
Reset Remove data member.
static NCBI_NS_STD::string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
@ e_not_set
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
#define STD
Modified on Fri Sep 20 14:58:09 2024 by modify_doxy.py rev. 669887