NCBI C++ ToolKit
NativeReference_.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("NativeReference", "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(22301);
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_Name:
124  case e_HintPath:
125  m_string.Destruct();
126  break;
127  default:
128  break;
129  }
130  m_choice = e_not_set;
131 }
132 
133 void CNativeReference_Base::C_E_NativeReference::C_NH::DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* )
134 {
135  switch ( index ) {
136  case e_Name:
137  case e_HintPath:
138  m_string.Construct();
139  break;
140  default:
141  break;
142  }
143  m_choice = index;
144 }
145 
147  "not set",
148  "Name",
149  "HintPath"
150 };
151 
153 {
154  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
155 }
156 
158 {
159  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
160 }
161 
163 {
164  Select(e_Name, NCBI_NS_NCBI::eDoNotResetVariant);
165  *m_string = value;
166 }
167 
169 {
170  Select(e_HintPath, NCBI_NS_NCBI::eDoNotResetVariant);
171  *m_string = value;
172 }
173 
174 // helper methods
175 
176 // type info
178 {
179  SET_INTERNAL_NAME("NativeReference.NativeReference.E", "NH");
180  SET_CHOICE_MODULE("msbuild_dataobj");
181  ADD_NAMED_BUF_CHOICE_VARIANT("Name", m_string, STD, (NCBI_NS_STD::string));
182  ADD_NAMED_BUF_CHOICE_VARIANT("HintPath", m_string, STD, (NCBI_NS_STD::string));
183  info->CodeVersion(22301);
184  info->DataSpec(ncbi::EDataSpec::eXSD);
185 }
187 
188 // constructor
190  : m_choice(e_not_set)
191 {
192 }
193 
194 // destructor
196 {
197  Reset();
198 }
199 
200 
202 {
203  if ( !m_NH ) {
204  m_NH.Reset(new TNH());
205  return;
206  }
207  (*m_NH).Reset();
208 }
209 
211 {
212  m_NH.Reset(&value);
213 }
214 
216 {
217  ResetNH();
218 }
219 
221 {
222  SET_INTERNAL_NAME("NativeReference.NativeReference", "E");
223  SET_CLASS_MODULE("msbuild_dataobj");
224  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
225  ADD_NAMED_REF_MEMBER("NH", m_NH, C_NH)->SetNotag();
226  info->RandomOrder();
227  info->CodeVersion(22301);
228  info->DataSpec(ncbi::EDataSpec::eXSD);
229 }
231 
232 // constructor
234 {
235  memset(m_set_State,0,sizeof(m_set_State));
236  if ( !IsAllocatedInPool() ) {
237  ResetNH();
238  }
239 }
240 
241 // destructor
243 {
244 }
245 
246 
248 {
249  if ( !m_Attlist ) {
250  m_Attlist.Reset(new TAttlist());
251  return;
252  }
253  (*m_Attlist).Reset();
254 }
255 
257 {
258  m_Attlist.Reset(&value);
259 }
260 
262 {
263  m_NativeReference.clear();
264  m_set_State[0] &= ~0xc;
265 }
266 
268 {
269  ResetAttlist();
271 }
272 
274 {
275  SET_CLASS_MODULE("msbuild_dataobj");
276  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
277  ADD_NAMED_REF_MEMBER("Attlist", m_Attlist, C_Attlist)->SetAttlist();
278  ADD_NAMED_MEMBER("NativeReference", m_NativeReference, STL_list, (STL_CRef, (CLASS, (C_E_NativeReference))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNotag();
279  info->RandomOrder();
280  info->CodeVersion(22301);
281  info->DataSpec(ncbi::EDataSpec::eXSD);
282 }
284 
285 // constructor
287 {
288  memset(m_set_State,0,sizeof(m_set_State));
289  if ( !IsAllocatedInPool() ) {
290  ResetAttlist();
291  }
292 }
293 
294 // destructor
296 {
297 }
298 
299 
300 
301 END_msbuild_SCOPE // namespace msbuild::
302 
#define END_msbuild_SCOPE
#define BEGIN_msbuild_SCOPE
User-defined methods of the data storage class.
BEGIN_NAMED_CHOICE_INFO("", CNativeReference_Base::C_E_NativeReference::C_NH)
BEGIN_NAMED_BASE_CLASS_INFO("NativeReference", CNativeReference)
BEGIN_NAMED_CLASS_INFO("", CNativeReference_Base::C_Attlist)
Reference to a native manifest file, or to a file that contains a native manifest.
CNativeReference –.
char value[7]
Definition: config.c:431
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_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
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_NativeReference > > m_NativeReference
void Reset(void)
Reset the whole object.
static NCBI_NS_STD::string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
virtual void Reset(void)
Reset the whole object.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void ResetNativeReference(void)
Reset NativeReference data member.
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
void ResetLabel(void)
Reset Label data member.
void ResetRemove(void)
Reset Remove data member.
void DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool *pool=0)
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
void ResetInclude(void)
Reset Include data member.
THintPath & SetHintPath(void)
Select the variant.
void ResetSelection(void)
Reset the selection (set it to e_not_set).
void Reset(void)
Reset the whole object.
virtual ~CNativeReference_Base(void)
void ResetExclude(void)
Reset Exclude data member.
void ResetCondition(void)
Reset Condition data member.
TNH & SetNH(void)
Assign a value to NH data member.
void ResetAttlist(void)
Reset Attlist data member.
void ResetNH(void)
Reset NH data member.
@ e_not_set
static MDB_envinfo info
Definition: mdb_load.c:37
Modified on Wed Dec 06 07:13:22 2023 by modify_doxy.py rev. 669887