NCBI C++ ToolKit
objectiter.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: objectiter.cpp 79110 2017-08-11 17:00:17Z gouriano $
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 * Author: Eugene Vasilchenko
27 *
28 * File Description:
29 * !!! PUT YOUR DESCRIPTION HERE !!!
30 */
31 
32 #include <ncbi_pch.hpp>
33 #include <corelib/ncbistd.hpp>
34 #include <serial/exception.hpp>
35 #include <serial/objectiter.hpp>
36 #include <serial/delaybuf.hpp>
37 #include <serial/objistr.hpp>
38 
40 
41 // container iterators
42 
44  : m_Iterator(object.GetObjectPtr(), object.GetContainerTypeInfo())
45 {
46 }
47 
50 {
51  m_Iterator.Init(object.GetObjectPtr(), object.GetContainerTypeInfo());
52  return *this;
53 }
54 
56  : m_Iterator(object.GetObjectPtr(), object.GetContainerTypeInfo())
57 {
58 }
59 
62 {
63  m_Iterator.Init(object.GetObjectPtr(), object.GetContainerTypeInfo());
64  return *this;
65 }
66 
67 // class iterators
68 
69 bool CObjectTypeInfoMI::IsSet(const CConstObjectInfo& object) const
70 {
71  const CMemberInfo* memberInfo = GetMemberInfo();
72  if ( memberInfo->HaveSetFlag() )
73  return memberInfo->GetSetFlagYes(object.GetObjectPtr());
74 
75  if ( memberInfo->CanBeDelayed() &&
76  memberInfo->GetDelayBuffer(object.GetObjectPtr()).Delayed() )
77  return true;
78 
79  if ( memberInfo->Optional() ) {
80  TConstObjectPtr defaultPtr = memberInfo->GetDefault();
81  TConstObjectPtr memberPtr =
82  memberInfo->GetMemberPtr(object.GetObjectPtr());
83  TTypeInfo memberType = memberInfo->GetTypeInfo();
84  if ( !defaultPtr ) {
85  if ( memberType->IsDefault(memberPtr) )
86  return false; // DEFAULT
87  }
88  else {
89  if ( memberType->Equals(memberPtr, defaultPtr) )
90  return false; // OPTIONAL
91  }
92  }
93  return true;
94 }
95 
97  CReadClassMemberHook* hook) const
98 {
99  GetNCMemberInfo()->SetLocalReadHook(stream, hook);
100 }
101 
103 {
105 }
106 
108 {
110 }
111 
113 {
115 }
116 
118  CReadClassMemberHook* hook) const
119 {
120  GetNCMemberInfo()->SetPathReadHook(in, path, hook);
121 }
122 
124  CWriteClassMemberHook* hook) const
125 {
126  GetNCMemberInfo()->SetLocalWriteHook(stream, hook);
127 }
128 
130 {
132 }
133 
135 {
137 }
138 
140 {
142 }
143 
144 void CObjectTypeInfoMI::SetPathWriteHook(CObjectOStream* stream, const string& path,
145  CWriteClassMemberHook* hook) const
146 {
147  GetNCMemberInfo()->SetPathWriteHook(stream, path, hook);
148 }
149 
151  CSkipClassMemberHook* hook) const
152 {
153  GetNCMemberInfo()->SetLocalSkipHook(stream, hook);
154  stream.AddMonitorType(GetClassType().GetTypeInfo());
155 }
156 
158 {
160 }
161 
162 void CObjectTypeInfoMI::SetPathSkipHook(CObjectIStream* stream, const string& path,
163  CSkipClassMemberHook* hook) const
164 {
165  GetNCMemberInfo()->SetPathSkipHook(stream, path, hook);
166 }
167 
169  CCopyClassMemberHook* hook) const
170 {
171  GetNCMemberInfo()->SetLocalCopyHook(stream, hook);
172 }
173 
175 {
177 }
178 
180 {
182 }
183 
185 {
187 }
188 
190  const string& path,
191  CCopyClassMemberHook* hook) const
192 {
193  GetNCMemberInfo()->SetPathCopyHook(stream,path,hook);
194 }
195 
197 {
198  const CMemberInfo* memberInfo = GetMemberInfo();
199  return !memberInfo->HaveSetFlag() ||
200  memberInfo->GetSetFlagYes(m_Object.GetObjectPtr());
201 }
202 
203 pair<TConstObjectPtr, TTypeInfo> CConstObjectInfoMI::GetMemberPair(void) const
204 {
205  const CMemberInfo* memberInfo = GetMemberInfo();
206  return make_pair(memberInfo->GetMemberPtr(m_Object.GetObjectPtr()),
207  memberInfo->GetTypeInfo());
208 }
209 
210 bool CObjectInfoMI::CanGet(void) const
211 {
212  const CMemberInfo* memberInfo = GetMemberInfo();
213  return !memberInfo->HaveSetFlag() ||
214  memberInfo->GetSetFlagYes(m_Object.GetObjectPtr());
215 }
216 
217 pair<TObjectPtr, TTypeInfo> CObjectInfoMI::GetMemberPair(void) const
218 {
219  TObjectPtr objectPtr = m_Object.GetObjectPtr();
220  const CMemberInfo* memberInfo = GetMemberInfo();
221  memberInfo->UpdateSetFlagMaybe(objectPtr);
222  return make_pair(memberInfo->GetMemberPtr(objectPtr),
223  memberInfo->GetTypeInfo());
224 }
225 
227 {
228  const CMemberInfo* mInfo = GetMemberInfo();
229  if ( !mInfo->Optional() && flag != eErase_Mandatory)
230  NCBI_THROW(CSerialException,eIllegalCall, "cannot reset non OPTIONAL member");
231 
232  TObjectPtr objectPtr = m_Object.GetObjectPtr();
233  // check 'set' flag
234  bool haveSetFlag = mInfo->HaveSetFlag();
235  if ( haveSetFlag && mInfo->GetSetFlagNo(objectPtr) ) {
236  // member not set
237  return;
238  }
239  // reset member
240  mInfo->GetTypeInfo()->SetDefault(mInfo->GetMemberPtr(objectPtr));
241  // assign default
242  if (mInfo->GetDefault()) {
243  mInfo->GetTypeInfo()->Assign(mInfo->GetMemberPtr(objectPtr),mInfo->GetDefault());
244  }
245  // update 'set' flag
246  if ( haveSetFlag )
247  mInfo->UpdateSetFlagNo(objectPtr);
248 }
249 
250 // choice iterators
251 
253  CReadChoiceVariantHook* hook) const
254 {
255  GetNCVariantInfo()->SetLocalReadHook(stream, hook);
256 }
257 
259 {
261 }
262 
264 {
266 }
267 
269 {
271 }
272 
273 void CObjectTypeInfoVI::SetPathReadHook(CObjectIStream* stream, const string& path,
274  CReadChoiceVariantHook* hook) const
275 {
276  GetNCVariantInfo()->SetPathReadHook(stream, path, hook);
277 }
278 
280  CWriteChoiceVariantHook* hook) const
281 {
282  GetNCVariantInfo()->SetLocalWriteHook(stream, hook);
283 }
284 
286 {
288 }
289 
291 {
293 }
294 
296 {
298 }
299 void CObjectTypeInfoVI::SetPathWriteHook(CObjectOStream* stream, const string& path,
300  CWriteChoiceVariantHook* hook) const
301 {
302  GetNCVariantInfo()->SetPathWriteHook(stream, path, hook);
303 }
304 
306  CSkipChoiceVariantHook* hook) const
307 {
308  GetNCVariantInfo()->SetLocalSkipHook(stream, hook);
309  stream.AddMonitorType(GetChoiceType().GetTypeInfo());
310 }
311 
313 {
315 }
316 
317 void CObjectTypeInfoVI::SetPathSkipHook(CObjectIStream* stream, const string& path,
318  CSkipChoiceVariantHook* hook) const
319 {
320  GetNCVariantInfo()->SetPathSkipHook(stream, path, hook);
321 }
322 
324  CCopyChoiceVariantHook* hook) const
325 {
326  GetNCVariantInfo()->SetLocalCopyHook(stream, hook);
327 }
328 
330 {
332 }
333 
335 {
337 }
338 
340 {
342 }
343 
345  CCopyChoiceVariantHook* hook) const
346 {
347  GetNCVariantInfo()->SetPathCopyHook(stream, path, hook);
348 }
349 
351  CReadChoiceVariantHook* hook) const
352 {
353  GetNCVariantInfo()->SetLocalReadHook(stream, hook);
354 }
355 
357 {
359 }
360 
362 {
364 }
365 
367 {
369 }
370 
371 void CObjectTypeInfoCV::SetPathReadHook(CObjectIStream* stream, const string& path,
372  CReadChoiceVariantHook* hook) const
373 {
374  GetNCVariantInfo()->SetPathReadHook(stream, path, hook);
375 }
376 
378  CWriteChoiceVariantHook* hook) const
379 {
380  GetNCVariantInfo()->SetLocalWriteHook(stream, hook);
381 }
382 
384 {
386 }
387 
389 {
391 }
392 
394 {
396 }
397 
398 void CObjectTypeInfoCV::SetPathWriteHook(CObjectOStream* stream, const string& path,
399  CWriteChoiceVariantHook* hook) const
400 {
401  GetNCVariantInfo()->SetPathWriteHook(stream, path, hook);
402 }
403 
405  CCopyChoiceVariantHook* hook) const
406 {
407  GetNCVariantInfo()->SetLocalCopyHook(stream, hook);
408 }
409 
411 {
413 }
414 
416 {
418 }
419 
421 {
423 }
424 
426  CCopyChoiceVariantHook* hook) const
427 {
428  GetNCVariantInfo()->SetPathCopyHook(stream, path, hook);
429 }
430 
432 {
433  m_ChoiceTypeInfo = object.GetChoiceTypeInfo();
434  m_VariantIndex = object.GetCurrentChoiceVariantIndex();
435 }
436 
437 pair<TConstObjectPtr, TTypeInfo> CConstObjectInfoCV::GetVariantPair(void) const
438 {
439  const CVariantInfo* variantInfo = GetVariantInfo();
440  return make_pair(variantInfo->GetVariantPtr(m_Object.GetObjectPtr()),
441  variantInfo->GetTypeInfo());
442 }
443 
444 pair<TObjectPtr, TTypeInfo> CObjectInfoCV::GetVariantPair(void) const
445 {
446  TObjectPtr choicePtr = m_Object.GetObjectPtr();
447  const CChoiceTypeInfo* choiceTypeInfo = m_Object.GetChoiceTypeInfo();
448  TMemberIndex index = GetVariantIndex();
449  choiceTypeInfo->SetIndex(choicePtr, index);
450  const CVariantInfo* variantInfo = choiceTypeInfo->GetVariantInfo(index);
451  return make_pair(variantInfo->GetVariantPtr(choicePtr),
452  variantInfo->GetTypeInfo());
453 }
454 
CConstObjectInfoEI –.
Definition: objectiter.hpp:56
CConstObjectInfo –.
Definition: objectinfo.hpp:421
Copy hook for a choice variant (CHOICE)
Definition: objhook.hpp:280
Copy hook for data member of a containing object (eg, SEQUENCE)
Definition: objhook.hpp:266
CObjectIStream –.
Definition: objistr.hpp:93
CObjectInfoEI –.
Definition: objectiter.hpp:125
CObjectInfo –.
Definition: objectinfo.hpp:597
CObjectOStream –.
Definition: objostr.hpp:83
CObjectStreamCopier –.
Definition: objcopy.hpp:71
Read hook for a choice variant (CHOICE)
Definition: objhook.hpp:117
Read hook for data member of a containing object (eg, SEQUENCE)
Definition: objhook.hpp:78
Root class for all serialization exceptions.
Definition: exception.hpp:50
Skip hook for a choice variant (CHOICE)
Definition: objhook.hpp:239
Skip hook for data member of a containing object (eg, SEQUENCE)
Definition: objhook.hpp:223
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Definition: typeinfo.hpp:76
Write hook for a choice variant (CHOICE)
Definition: objhook.hpp:190
Write hook for data member of a containing object (eg, SEQUENCE)
Definition: objhook.hpp:175
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
void ResetLocalSkipHook(CObjectIStream &in)
Definition: member.cpp:609
void SetPathCopyHook(CObjectStreamCopier *copier, const string &path, CCopyClassMemberHook *hook)
Definition: member.cpp:647
void SetPathReadHook(CObjectIStream *in, const string &path, CReadClassMemberHook *hook)
Definition: member.cpp:563
bool Optional(void) const
void SetPathCopyHook(CObjectStreamCopier *copier, const string &path, CCopyChoiceVariantHook *hook)
Definition: variant.cpp:869
void SetLocalSkipHook(CObjectIStream &in, CSkipClassMemberHook *hook)
Definition: member.cpp:602
void SetGlobalWriteHook(CWriteClassMemberHook *hook)
Definition: member.cpp:570
void SetLocalCopyHook(CObjectStreamCopier &copier, CCopyChoiceVariantHook *hook)
Definition: variant.cpp:850
void ResetGlobalReadHook(void)
Definition: member.cpp:551
void ResetLocalWriteHook(CObjectOStream &out)
Definition: member.cpp:589
bool UpdateSetFlagNo(TObjectPtr object) const
set 'setFlag' to eSetNo and return true if previous value wasn't eSetNo
bool GetSetFlagNo(TConstObjectPtr object) const
true if 'setFlag' is eSetNo
void SetGlobalCopyHook(CCopyChoiceVariantHook *hook)
Definition: variant.cpp:844
void SetPathSkipHook(CObjectIStream *in, const string &path, CSkipChoiceVariantHook *hook)
Definition: variant.cpp:837
TConstObjectPtr GetDefault(void) const
void SetLocalWriteHook(CObjectOStream &out, CWriteChoiceVariantHook *hook)
Definition: variant.cpp:798
void SetPathReadHook(CObjectIStream *in, const string &path, CReadChoiceVariantHook *hook)
Definition: variant.cpp:785
void ResetLocalWriteHook(CObjectOStream &out)
Definition: variant.cpp:811
TObjectPtr GetMemberPtr(TObjectPtr classPtr) const
void SetLocalReadHook(CObjectIStream &in, CReadClassMemberHook *hook)
Definition: member.cpp:544
void UpdateSetFlagMaybe(TObjectPtr object) const
set 'setFlag' to eSetMaybe
void ResetGlobalWriteHook(void)
Definition: variant.cpp:805
void ResetGlobalCopyHook(void)
Definition: variant.cpp:857
void ResetLocalSkipHook(CObjectIStream &in)
Definition: variant.cpp:831
void SetPathWriteHook(CObjectOStream *out, const string &path, CWriteClassMemberHook *hook)
Definition: member.cpp:595
TConstObjectPtr GetVariantPtr(TConstObjectPtr choicePtr) const
CDelayBuffer & GetDelayBuffer(TObjectPtr object) const
void SetLocalCopyHook(CObjectStreamCopier &copier, CCopyClassMemberHook *hook)
Definition: member.cpp:628
void ResetLocalReadHook(CObjectIStream &in)
Definition: member.cpp:557
void ResetGlobalCopyHook(void)
Definition: member.cpp:635
void SetGlobalWriteHook(CWriteChoiceVariantHook *hook)
Definition: variant.cpp:792
bool CanBeDelayed(void) const
void SetGlobalReadHook(CReadChoiceVariantHook *hook)
Definition: variant.cpp:760
void SetGlobalCopyHook(CCopyClassMemberHook *hook)
Definition: member.cpp:622
void ResetGlobalWriteHook(void)
Definition: member.cpp:583
void SetGlobalReadHook(CReadClassMemberHook *hook)
Definition: member.cpp:538
TTypeInfo GetTypeInfo(void) const
bool HaveSetFlag(void) const
void SetLocalWriteHook(CObjectOStream &out, CWriteClassMemberHook *hook)
Definition: member.cpp:576
void SetPathWriteHook(CObjectOStream *out, const string &path, CWriteChoiceVariantHook *hook)
Definition: variant.cpp:817
void ResetLocalCopyHook(CObjectStreamCopier &copier)
Definition: member.cpp:641
void ResetLocalCopyHook(CObjectStreamCopier &copier)
Definition: variant.cpp:863
void ResetLocalReadHook(CObjectIStream &in)
Definition: variant.cpp:779
void ResetGlobalReadHook(void)
Definition: variant.cpp:773
void SetLocalReadHook(CObjectIStream &in, CReadChoiceVariantHook *hook)
Definition: variant.cpp:766
void SetLocalSkipHook(CObjectIStream &in, CSkipChoiceVariantHook *hook)
Definition: variant.cpp:824
void SetPathSkipHook(CObjectIStream *in, const string &path, CSkipClassMemberHook *hook)
Definition: member.cpp:615
bool GetSetFlagYes(TConstObjectPtr object) const
true if 'setFlag' is not eSetNo
void * TObjectPtr
Definition: serialdef.hpp:55
size_t TMemberIndex
Type used for indexing class members and choice variants.
Definition: serialdef.hpp:230
const void * TConstObjectPtr
Definition: serialdef.hpp:59
void SetPathCopyHook(CObjectStreamCopier *stream, const string &path, CCopyChoiceVariantHook *hook) const
Definition: objectiter.cpp:344
void ResetLocalReadHook(CObjectIStream &stream) const
Definition: objectiter.cpp:263
void SetPathCopyHook(CObjectStreamCopier *stream, const string &path, CCopyChoiceVariantHook *hook) const
Definition: objectiter.cpp:425
void SetPathReadHook(CObjectIStream *stream, const string &path, CReadChoiceVariantHook *hook) const
Definition: objectiter.cpp:273
void ResetLocalWriteHook(CObjectOStream &stream) const
Definition: objectiter.cpp:388
bool Delayed(void) const
Check if there is input data in the buffer.
Definition: delaybuf.hpp:69
void ResetLocalReadHook(CObjectIStream &stream) const
Definition: objectiter.cpp:361
CVariantInfo * GetNCVariantInfo(void) const
void ResetGlobalReadHook(void) const
Definition: objectiter.cpp:268
bool CanGet(void) const
Definition: objectiter.cpp:210
CObjectTypeInfo GetChoiceType(void) const
Get containing choice type.
void SetLocalSkipHook(CObjectIStream &stream, CSkipChoiceVariantHook *hook) const
Definition: objectiter.cpp:305
void SetPathWriteHook(CObjectOStream *stream, const string &path, CWriteChoiceVariantHook *hook) const
Definition: objectiter.cpp:398
void ResetGlobalWriteHook(void) const
Definition: objectiter.cpp:295
void SetLocalReadHook(CObjectIStream &stream, CReadChoiceVariantHook *hook) const
Definition: objectiter.cpp:252
void ResetLocalCopyHook(CObjectStreamCopier &stream) const
Definition: objectiter.cpp:179
pair< TObjectPtr, TTypeInfo > GetMemberPair(void) const
Definition: objectiter.cpp:217
void ResetLocalReadHook(CObjectIStream &stream) const
Definition: objectiter.cpp:107
void SetLocalSkipHook(CObjectIStream &stream, CSkipClassMemberHook *hook) const
Definition: objectiter.cpp:150
CVariantInfo * GetNCVariantInfo(void) const
void AddMonitorType(TTypeInfo type)
Definition: objistr.cpp:626
void SetPathSkipHook(CObjectIStream *stream, const string &path, CSkipChoiceVariantHook *hook) const
Definition: objectiter.cpp:317
const CMemberInfo * GetMemberInfo(void) const
void ResetGlobalReadHook(void) const
Definition: objectiter.cpp:366
CConstObjectInfo m_Object
Definition: objectiter.hpp:577
TMemberIndex m_VariantIndex
Definition: objectiter.hpp:543
CObjectInfo m_Object
Definition: objectiter.hpp:466
void SetPathWriteHook(CObjectOStream *stream, const string &path, CWriteClassMemberHook *hook) const
Definition: objectiter.cpp:144
void SetLocalCopyHook(CObjectStreamCopier &stream, CCopyChoiceVariantHook *hook) const
Definition: objectiter.cpp:404
TObjectPtr GetObjectPtr(void) const
Get pointer to object.
pair< TConstObjectPtr, TTypeInfo > GetMemberPair(void) const
Definition: objectiter.cpp:203
void SetGlobalCopyHook(CCopyChoiceVariantHook *hook) const
Definition: objectiter.cpp:329
void ResetGlobalCopyHook(void) const
Definition: objectiter.cpp:184
CConstObjectInfoEI & operator=(const CConstObjectInfo &object)
Definition: objectiter.cpp:49
bool IsSet(const CConstObjectInfo &object) const
Definition: objectiter.cpp:69
void SetLocalWriteHook(CObjectOStream &stream, CWriteChoiceVariantHook *hook) const
Definition: objectiter.cpp:377
void SetGlobalWriteHook(CWriteChoiceVariantHook *hook) const
Definition: objectiter.cpp:383
void SetLocalCopyHook(CObjectStreamCopier &stream, CCopyChoiceVariantHook *hook) const
Definition: objectiter.cpp:323
void SetGlobalWriteHook(CWriteClassMemberHook *hook) const
Definition: objectiter.cpp:129
CConstContainerElementIterator m_Iterator
Definition: objectiter.hpp:113
CObjectInfo m_Object
Definition: objectiter.hpp:608
CObjectTypeInfo GetClassType(void) const
Get containing class type.
void ResetLocalCopyHook(CObjectStreamCopier &stream) const
Definition: objectiter.cpp:334
void ResetGlobalWriteHook(void) const
Definition: objectiter.cpp:393
void ResetLocalSkipHook(CObjectIStream &stream) const
Definition: objectiter.cpp:157
void ResetLocalSkipHook(CObjectIStream &stream) const
Definition: objectiter.cpp:312
void Init(const CObjectTypeInfo &info)
const CChoiceTypeInfo * GetChoiceTypeInfo(void) const
Definition: objectinfo.cpp:67
pair< TConstObjectPtr, TTypeInfo > GetVariantPair(void) const
Definition: objectiter.cpp:437
CObjectInfoEI & operator=(const CObjectInfo &object)
Definition: objectiter.cpp:61
void ResetGlobalCopyHook(void) const
Definition: objectiter.cpp:420
void SetGlobalCopyHook(CCopyClassMemberHook *hook) const
Definition: objectiter.cpp:174
pair< TObjectPtr, TTypeInfo > GetVariantPair(void) const
Definition: objectiter.cpp:444
bool CanGet(void) const
Definition: objectiter.cpp:196
void SetLocalReadHook(CObjectIStream &stream, CReadClassMemberHook *hook) const
Definition: objectiter.cpp:96
void SetPathWriteHook(CObjectOStream *stream, const string &path, CWriteChoiceVariantHook *hook) const
Definition: objectiter.cpp:299
TMemberIndex GetVariantIndex(void) const
Get index of the variant in the choice.
void ResetGlobalWriteHook(void) const
Definition: objectiter.cpp:139
void Erase(EEraseFlag flag=eErase_Optional)
Erase member value.
Definition: objectiter.cpp:226
void SetPathReadHook(CObjectIStream *stream, const string &path, CReadChoiceVariantHook *hook) const
Definition: objectiter.cpp:371
void SetGlobalWriteHook(CWriteChoiceVariantHook *hook) const
Definition: objectiter.cpp:285
const CChoiceTypeInfo * m_ChoiceTypeInfo
Definition: objectiter.hpp:542
void SetGlobalCopyHook(CCopyChoiceVariantHook *hook) const
Definition: objectiter.cpp:410
void ResetGlobalReadHook(void) const
Definition: objectiter.cpp:112
void ResetGlobalCopyHook(void) const
Definition: objectiter.cpp:339
void SetLocalWriteHook(CObjectOStream &stream, CWriteChoiceVariantHook *hook) const
Definition: objectiter.cpp:279
CConstObjectInfo m_Object
Definition: objectiter.hpp:421
void SetPathCopyHook(CObjectStreamCopier *stream, const string &path, CCopyClassMemberHook *hook) const
Definition: objectiter.cpp:189
void ResetLocalWriteHook(CObjectOStream &stream) const
Definition: objectiter.cpp:290
CMemberInfo * GetNCMemberInfo(void) const
void SetLocalReadHook(CObjectIStream &stream, CReadChoiceVariantHook *hook) const
Definition: objectiter.cpp:350
EEraseFlag
Erase types.
Definition: objectiter.hpp:453
void ResetLocalCopyHook(CObjectStreamCopier &stream) const
Definition: objectiter.cpp:415
TConstObjectPtr GetObjectPtr(void) const
Get pointer to object.
CContainerElementIterator m_Iterator
Definition: objectiter.hpp:179
const CVariantInfo * GetVariantInfo(void) const
void SetGlobalReadHook(CReadChoiceVariantHook *hook) const
Definition: objectiter.cpp:356
CObjectInfoEI(void)
void SetLocalCopyHook(CObjectStreamCopier &stream, CCopyClassMemberHook *hook) const
Definition: objectiter.cpp:168
void SetGlobalReadHook(CReadClassMemberHook *hook) const
Definition: objectiter.cpp:102
void SetPathSkipHook(CObjectIStream *stream, const string &path, CSkipClassMemberHook *hook) const
Definition: objectiter.cpp:162
void SetPathReadHook(CObjectIStream *in, const string &path, CReadClassMemberHook *hook) const
Definition: objectiter.cpp:117
void ResetLocalWriteHook(CObjectOStream &stream) const
Definition: objectiter.cpp:134
void SetLocalWriteHook(CObjectOStream &stream, CWriteClassMemberHook *hook) const
Definition: objectiter.cpp:123
void SetGlobalReadHook(CReadChoiceVariantHook *hook) const
Definition: objectiter.cpp:258
@ eErase_Mandatory
allow erasing mandatory members, may be dangerous!
Definition: objectiter.hpp:455
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
virtual bool IsDefault(TConstObjectPtr object) const =0
Check, whether the object contains default value.
void Init(TObjectPtr containerPtr, const CContainerTypeInfo *containerType)
const CVariantInfo * GetVariantInfo(TMemberIndex index) const
virtual void Assign(TObjectPtr dst, TConstObjectPtr src, ESerialRecursionMode how=eRecursive) const =0
Set object to copy of another one.
virtual bool Equals(TConstObjectPtr object1, TConstObjectPtr object2, ESerialRecursionMode how=eRecursive) const =0
Check if both objects contain the same values.
virtual void SetDefault(TObjectPtr dst) const =0
Set object to default value.
void Init(TConstObjectPtr containerPtr, const CContainerTypeInfo *containerType)
void SetIndex(TObjectPtr object, TMemberIndex index, CObjectMemoryPool *pool=0) const
std::istream & in(std::istream &in_, double &x_)
Modified on Thu Jul 18 16:03:15 2024 by modify_doxy.py rev. 669887