NCBI C++ ToolKit
ClInclude_.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_Condition.erase();
51  m_set_State[0] &= ~0x3;
52 }
53 
55 {
56  m_Include.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  ResetCondition();
81  ResetInclude();
82  ResetExclude();
83  ResetRemove();
84  ResetLabel();
85 }
86 
88 {
89  SET_INTERNAL_NAME("ClInclude", "Attlist");
90  SET_CLASS_MODULE("msbuild_dataobj");
91  ADD_NAMED_STD_MEMBER("Condition", m_Condition)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNsQualified(false);
92  ADD_NAMED_STD_MEMBER("Include", m_Include)->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_AdditionalIncludeDirectories:
124  m_string.Destruct();
125  break;
126  case e_AnyContent:
127  m_object->RemoveReference();
128  break;
129  default:
130  break;
131  }
132  m_choice = e_not_set;
133 }
134 
135 void CClInclude_Base::C_E_ClInclude::DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* pool)
136 {
137  switch ( index ) {
138  case e_AnyContent:
139  (m_object = new(pool) ncbi::CAnyContentObject())->AddReference();
140  break;
141  case e_AdditionalIncludeDirectories:
142  m_string.Construct();
143  break;
144  default:
145  break;
146  }
147  m_choice = index;
148 }
149 
151  "not set",
152  "AdditionalIncludeDirectories",
153  "AnyContent"
154 };
155 
157 {
158  return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
159 }
160 
162 {
163  throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));
164 }
165 
167 {
168  Select(e_AdditionalIncludeDirectories, NCBI_NS_NCBI::eDoNotResetVariant);
169  *m_string = value;
170 }
171 
173 {
174  CheckSelected(e_AnyContent);
175  return *static_cast<const TAnyContent*>(m_object);
176 }
177 
179 {
180  Select(e_AnyContent, NCBI_NS_NCBI::eDoNotResetVariant);
181  return *static_cast<TAnyContent*>(m_object);
182 }
183 
185 {
186  TAnyContent* ptr = &value;
187  if ( m_choice != e_AnyContent || m_object != ptr ) {
188  ResetSelection();
189  (m_object = ptr)->AddReference();
190  m_choice = e_AnyContent;
191  }
192 }
193 
194 // helper methods
195 
196 // type info
198 {
199  SET_INTERNAL_NAME("ClInclude.ClInclude", "E");
200  SET_CHOICE_MODULE("msbuild_dataobj");
201  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
202  ADD_NAMED_BUF_CHOICE_VARIANT("AdditionalIncludeDirectories", m_string, STD, (NCBI_NS_STD::string))->SetOptional();
203  ADD_NAMED_REF_CHOICE_VARIANT("AnyContent", m_object, NCBI_NS_NCBI::CAnyContentObject)->SetNotag();
204  info->CodeVersion(22400);
205  info->DataSpec(ncbi::EDataSpec::eXSD);
206 }
208 
209 // constructor
211  : m_choice(e_not_set)
212 {
213 }
214 
215 // destructor
217 {
218  Reset();
219 }
220 
221 
223 {
224  if ( !m_Attlist ) {
225  m_Attlist.Reset(new TAttlist());
226  return;
227  }
228  (*m_Attlist).Reset();
229 }
230 
232 {
233  m_Attlist.Reset(&value);
234 }
235 
237 {
238  m_ClInclude.clear();
239  m_set_State[0] &= ~0xc;
240 }
241 
243 {
244  ResetAttlist();
245  ResetClInclude();
246 }
247 
249 {
250  SET_CLASS_MODULE("msbuild_dataobj");
251  SET_NAMESPACE("http://schemas.microsoft.com/developer/msbuild/2003")->SetNsQualified(true);
252  ADD_NAMED_REF_MEMBER("Attlist", m_Attlist, C_Attlist)->SetAttlist();
253  ADD_NAMED_MEMBER("ClInclude", m_ClInclude, STL_list, (STL_CRef, (CLASS, (C_E_ClInclude))))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional()->SetNotag();
254  info->RandomOrder();
255  info->CodeVersion(22400);
256  info->DataSpec(ncbi::EDataSpec::eXSD);
257 }
259 
260 // constructor
262 {
263  memset(m_set_State,0,sizeof(m_set_State));
264  if ( !IsAllocatedInPool() ) {
265  ResetAttlist();
266  }
267 }
268 
269 // destructor
271 {
272 }
273 
274 
275 
276 END_msbuild_SCOPE // namespace msbuild::
277 
#define END_msbuild_SCOPE
#define BEGIN_msbuild_SCOPE
User-defined methods of the data storage class.
BEGIN_NAMED_BASE_CLASS_INFO("ClInclude", CClInclude)
Definition: ClInclude_.cpp:248
BEGIN_NAMED_CLASS_INFO("", CClInclude_Base::C_Attlist)
Definition: ClInclude_.cpp:87
BEGIN_NAMED_CHOICE_INFO("", CClInclude_Base::C_E_ClInclude)
Definition: ClInclude_.cpp:197
CClInclude –.
Definition: ClInclude.hpp:64
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
void Reset(void)
Reset the whole object.
Definition: ClInclude_.cpp:114
TAnyContent & SetAnyContent(void)
Select the variant.
Definition: ClInclude_.cpp:178
NCBI_NS_STD::string TAdditionalIncludeDirectories
Definition: ClInclude_.hpp:410
void ResetCondition(void)
Reset Condition data member.
Definition: ClInclude_.cpp:48
void ResetClInclude(void)
Reset ClInclude data member.
Definition: ClInclude_.cpp:236
void ResetAttlist(void)
Reset Attlist data member.
Definition: ClInclude_.cpp:222
TAdditionalIncludeDirectories & SetAdditionalIncludeDirectories(void)
Select the variant.
Definition: ClInclude_.hpp:872
NCBI_NS_NCBI::CAnyContentObject TAnyContent
Definition: ClInclude_.hpp:411
void ResetRemove(void)
Reset Remove data member.
Definition: ClInclude_.cpp:66
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
Definition: ClInclude_.cpp:161
Uint4 m_set_State[1]
Definition: ClInclude_.hpp:580
void DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool *pool=0)
Definition: ClInclude_.cpp:135
virtual void Reset(void)
Reset the whole object.
Definition: ClInclude_.cpp:242
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
Definition: ClInclude_.hpp:906
void Reset(void)
Reset the whole object.
Definition: ClInclude_.cpp:78
static const char *const sm_SelectionNames[]
Definition: ClInclude_.hpp:479
void ResetLabel(void)
Reset Label data member.
Definition: ClInclude_.cpp:72
void ResetInclude(void)
Reset Include data member.
Definition: ClInclude_.cpp:54
NCBI_NS_STD::string m_Condition
Definition: ClInclude_.hpp:327
const TAnyContent & GetAnyContent(void) const
Get the variant data.
Definition: ClInclude_.cpp:172
C_Attlist TAttlist
Definition: ClInclude_.hpp:487
void ResetExclude(void)
Reset Exclude data member.
Definition: ClInclude_.cpp:60
virtual ~CClInclude_Base(void)
Definition: ClInclude_.cpp:270
void ResetSelection(void)
Reset the selection (set it to e_not_set).
Definition: ClInclude_.cpp:120
static NCBI_NS_STD::string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
Definition: ClInclude_.cpp:156
NCBI_NS_NCBI::CRef< TAttlist > m_Attlist
Definition: ClInclude_.hpp:581
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_ClInclude > > m_ClInclude
Definition: ClInclude_.hpp:582
@ 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:17:09 2024 by modify_doxy.py rev. 669887