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

Go to the SVN repository for this file.

1 #ifndef OBJECTITER__HPP
2 #define OBJECTITER__HPP
3 
4 /* $Id: objectiter.hpp 100316 2023-07-20 14:18:57Z vasilche $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Author: Eugene Vasilchenko
30 *
31 * File Description:
32 * Iterators, which work on object information data
33 */
34 
35 #include <corelib/ncbistd.hpp>
36 #include <serial/objectinfo.hpp>
37 
38 
39 /** @addtogroup ObjStreamSupport
40  *
41  * @{
42  */
43 
44 
46 
47 /////////////////////////////////////////////////////////////////////////////
48 ///
49 /// CConstObjectInfoEI --
50 ///
51 /// Container iterator
52 /// Provides read access to elements of container
53 /// @sa CConstObjectInfo::BeginElements
54 
56 {
57 public:
59  CConstObjectInfoEI(const CConstObjectInfo& object);
60 
61  CConstObjectInfoEI& operator=(const CConstObjectInfo& object);
62 
63  /// Is iterator valid
64  bool Valid(void) const;
65  /// Is iterator valid
67 
68  bool operator==(const CConstObjectInfoEI& obj) const
69  {
70  return GetElement() == obj.GetElement();
71  }
72  bool operator!=(const CConstObjectInfoEI& obj) const
73  {
74  return GetElement() != obj.GetElement();
75  }
76 
77  /// Get index of the element in the container
78  TMemberIndex GetIndex(void) const
79  {
80  return m_Iterator.GetIndex();
81  }
82 
83  /// Advance to next element
84  void Next(void);
85 
86  /// Advance to next element
88 
89  /// Get element data and type information
91 
92  /// Get element data and type information
94 
95  bool CanGet(void) const
96  {
97  return true;
98  }
99  const CItemInfo* GetItemInfo(void) const
100  {
101  return 0;
102  }
103 
104  size_t GetElementCount(void) const
105  {
106  return m_Iterator.GetElementCount();
107  }
108 
109 protected:
110  bool CheckValid(void) const;
111 
112 private:
114 };
115 
116 /////////////////////////////////////////////////////////////////////////////
117 ///
118 /// CObjectInfoEI --
119 ///
120 /// Container iterator
121 /// Provides read/write access to elements of container
122 /// @sa CObjectInfo::BeginElements
123 
125 {
126 public:
128  CObjectInfoEI(const CObjectInfo& object);
129 
130  CObjectInfoEI& operator=(const CObjectInfo& object);
131 
132  /// Is iterator valid
133  bool Valid(void) const;
134  /// Is iterator valid
136 
137  bool operator==(const CObjectInfoEI& obj) const
138  {
139  return GetElement() == obj.GetElement();
140  }
141  bool operator!=(const CObjectInfoEI& obj) const
142  {
143  return GetElement() != obj.GetElement();
144  }
145 
146  /// Get index of the element in the container
147  TMemberIndex GetIndex(void) const
148  {
149  return m_Iterator.GetIndex();
150  }
151 
152  /// Advance to next element
153  void Next(void);
154 
155  /// Advance to next element
157 
158  /// Get element data and type information
159  CObjectInfo GetElement(void) const;
160 
161  /// Get element data and type information
162  CObjectInfo operator*(void) const;
163 
164  void Erase(void);
165 
166  bool CanGet(void) const
167  {
168  return true;
169  }
170  const CItemInfo* GetItemInfo(void) const
171  {
172  return 0;
173  }
174 
175 protected:
176  bool CheckValid(void) const;
177 
178 private:
180 };
181 
182 /////////////////////////////////////////////////////////////////////////////
183 ///
184 /// CObjectTypeInfoII --
185 ///
186 /// Item iterator (either class member or choice variant)
187 /// provides access to the data type information.
188 
190 {
191 public:
192  const string& GetAlias(void) const;
193 
194  /// Is iterator valid
195  bool Valid(void) const;
196  /// Is iterator valid
198 
199  bool operator==(const CObjectTypeInfoII& iter) const;
200  bool operator!=(const CObjectTypeInfoII& iter) const;
201 
202  /// Advance to next element
203  void Next(void);
204 
205  const CItemInfo* GetItemInfo(void) const;
206 
207  /// Get index of the element in the container (class or choice)
208  TMemberIndex GetIndex(void) const
209  {
210  return GetItemIndex();
211  }
212 
213 protected:
217 
218  const CObjectTypeInfo& GetOwnerType(void) const;
221 
222  void Init(const CClassTypeInfoBase* typeInfo);
223  void Init(const CClassTypeInfoBase* typeInfo, TMemberIndex index);
224 
225  bool CanGet(void) const
226  {
227  return true;
228  }
229 
230  bool CheckValid(void) const;
231 
232 private:
236 };
237 
238 /////////////////////////////////////////////////////////////////////////////
239 ///
240 /// CObjectTypeInfoMI --
241 ///
242 /// Class member iterator
243 /// provides access to the data type information.
244 
246 {
248 public:
252 
253  /// Get index of the member in the class
255 
256  /// Advance to next element
258 
260 
261  /// Get containing class type
263 
264  /// Get data type information
265  operator CObjectTypeInfo(void) const;
266  /// Get data type information
268  /// Get data type information
270 
271  void SetLocalReadHook(CObjectIStream& stream,
272  CReadClassMemberHook* hook) const;
273  void SetGlobalReadHook(CReadClassMemberHook* hook) const;
274  void ResetLocalReadHook(CObjectIStream& stream) const;
275  void ResetGlobalReadHook(void) const;
276  void SetPathReadHook(CObjectIStream* in, const string& path,
277  CReadClassMemberHook* hook) const;
278 
279  void SetLocalWriteHook(CObjectOStream& stream,
280  CWriteClassMemberHook* hook) const;
281  void SetGlobalWriteHook(CWriteClassMemberHook* hook) const;
282  void ResetLocalWriteHook(CObjectOStream& stream) const;
283  void ResetGlobalWriteHook(void) const;
284  void SetPathWriteHook(CObjectOStream* stream, const string& path,
285  CWriteClassMemberHook* hook) const;
286 
287  void SetLocalSkipHook(CObjectIStream& stream,
288  CSkipClassMemberHook* hook) const;
289  void ResetLocalSkipHook(CObjectIStream& stream) const;
290  void SetPathSkipHook(CObjectIStream* stream, const string& path,
291  CSkipClassMemberHook* hook) const;
292 
294  CCopyClassMemberHook* hook) const;
295  void SetGlobalCopyHook(CCopyClassMemberHook* hook) const;
296  void ResetLocalCopyHook(CObjectStreamCopier& stream) const;
297  void ResetGlobalCopyHook(void) const;
298  void SetPathCopyHook(CObjectStreamCopier* stream, const string& path,
299  CCopyClassMemberHook* hook) const;
300 
301 public: // mostly for internal use
302  const CMemberInfo* GetMemberInfo(void) const;
303 
304 protected:
305  void Init(const CObjectTypeInfo& info);
306  void Init(const CObjectTypeInfo& info, TMemberIndex index);
307 
308  const CClassTypeInfo* GetClassTypeInfo(void) const;
309 
310  bool IsSet(const CConstObjectInfo& object) const;
311 
312 private:
314 };
315 
316 /////////////////////////////////////////////////////////////////////////////
317 ///
318 /// CObjectTypeInfoVI --
319 ///
320 /// Choice variant iterator
321 /// provides access to the data type information.
322 
324 {
326 public:
329 
330  /// Get index of the variant in the choice
332 
333  /// Advance to next element
335 
337 
338  /// Get containing choice type
340 
341  /// Get data type information
343  /// Get data type information
345 
346  void SetLocalReadHook(CObjectIStream& stream,
347  CReadChoiceVariantHook* hook) const;
348  void SetGlobalReadHook(CReadChoiceVariantHook* hook) const;
349  void ResetLocalReadHook(CObjectIStream& stream) const;
350  void ResetGlobalReadHook(void) const;
351  void SetPathReadHook(CObjectIStream* stream, const string& path,
352  CReadChoiceVariantHook* hook) const;
353 
354  void SetLocalWriteHook(CObjectOStream& stream,
355  CWriteChoiceVariantHook* hook) const;
356  void SetGlobalWriteHook(CWriteChoiceVariantHook* hook) const;
357  void ResetLocalWriteHook(CObjectOStream& stream) const;
358  void ResetGlobalWriteHook(void) const;
359  void SetPathWriteHook(CObjectOStream* stream, const string& path,
360  CWriteChoiceVariantHook* hook) const;
361 
362  void SetLocalSkipHook(CObjectIStream& stream,
363  CSkipChoiceVariantHook* hook) const;
364  void ResetLocalSkipHook(CObjectIStream& stream) const;
365  void SetPathSkipHook(CObjectIStream* stream, const string& path,
366  CSkipChoiceVariantHook* hook) const;
367 
369  CCopyChoiceVariantHook* hook) const;
370  void SetGlobalCopyHook(CCopyChoiceVariantHook* hook) const;
371  void ResetLocalCopyHook(CObjectStreamCopier& stream) const;
372  void ResetGlobalCopyHook(void) const;
373  void SetPathCopyHook(CObjectStreamCopier* stream, const string& path,
374  CCopyChoiceVariantHook* hook) const;
375 
376 public: // mostly for internal use
377  const CVariantInfo* GetVariantInfo(void) const;
378 
379 protected:
380  void Init(const CObjectTypeInfo& info);
381  void Init(const CObjectTypeInfo& info, TMemberIndex index);
382 
383  const CChoiceTypeInfo* GetChoiceTypeInfo(void) const;
384 
385 private:
387 };
388 
389 /////////////////////////////////////////////////////////////////////////////
390 ///
391 /// CConstObjectInfoMI --
392 ///
393 /// Class member iterator
394 /// provides read access to class member data.
395 
397 {
399 public:
403 
404  /// Get containing class data
405  const CConstObjectInfo& GetClassObject(void) const;
406 
408 
409  /// Is member assigned a value
410  bool IsSet(void) const;
411 
412  /// Get class member data
414  /// Get class member data
416 
417  bool CanGet(void) const;
418 private:
419  pair<TConstObjectPtr, TTypeInfo> GetMemberPair(void) const;
420 
422 };
423 
424 /////////////////////////////////////////////////////////////////////////////
425 ///
426 /// CObjectInfoMI --
427 ///
428 /// Class member iterator
429 /// provides read/write access to class member data.
430 
432 {
434 public:
436  CObjectInfoMI(const CObjectInfo& object);
437  CObjectInfoMI(const CObjectInfo& object, TMemberIndex index);
438 
439  /// Get containing class data
440  const CObjectInfo& GetClassObject(void) const;
441 
443 
444  /// Is member assigned a value
445  bool IsSet(void) const;
446 
447  /// Get class member data
448  CObjectInfo GetMember(void) const;
449  /// Get class member data
450  CObjectInfo operator*(void) const;
451 
452  /// Erase types
453  enum EEraseFlag {
454  eErase_Optional, ///< default - erase optional member only
455  eErase_Mandatory ///< allow erasing mandatory members, may be dangerous!
456  };
457  /// Erase member value
458  void Erase(EEraseFlag flag = eErase_Optional);
459  /// Reset value of member to default state
460  void Reset(void);
461 
462  bool CanGet(void) const;
463 private:
464  pair<TObjectPtr, TTypeInfo> GetMemberPair(void) const;
465 
467 };
468 
469 /////////////////////////////////////////////////////////////////////////////
470 ///
471 /// CObjectTypeInfoCV --
472 ///
473 /// Choice variant
474 /// provides access to the data type information.
475 
477 {
478 public:
483 
484  /// Get index of the variant in the choice
486 
487  const string& GetAlias(void) const;
488 
489  bool Valid(void) const;
491 
492  bool operator==(const CObjectTypeInfoCV& iter) const;
493  bool operator!=(const CObjectTypeInfoCV& iter) const;
494 
497 
498  /// Get containing choice
500 
501  operator CObjectTypeInfo(void) const;
502  /// Get variant data type
504  /// Get variant data type
506 
507  void SetLocalReadHook(CObjectIStream& stream,
508  CReadChoiceVariantHook* hook) const;
509  void SetGlobalReadHook(CReadChoiceVariantHook* hook) const;
510  void ResetLocalReadHook(CObjectIStream& stream) const;
511  void ResetGlobalReadHook(void) const;
512  void SetPathReadHook(CObjectIStream* stream, const string& path,
513  CReadChoiceVariantHook* hook) const;
514 
515  void SetLocalWriteHook(CObjectOStream& stream,
516  CWriteChoiceVariantHook* hook) const;
517  void SetGlobalWriteHook(CWriteChoiceVariantHook* hook) const;
518  void ResetLocalWriteHook(CObjectOStream& stream) const;
519  void ResetGlobalWriteHook(void) const;
520  void SetPathWriteHook(CObjectOStream* stream, const string& path,
521  CWriteChoiceVariantHook* hook) const;
522 
524  CCopyChoiceVariantHook* hook) const;
525  void SetGlobalCopyHook(CCopyChoiceVariantHook* hook) const;
526  void ResetLocalCopyHook(CObjectStreamCopier& stream) const;
527  void ResetGlobalCopyHook(void) const;
528  void SetPathCopyHook(CObjectStreamCopier* stream, const string& path,
529  CCopyChoiceVariantHook* hook) const;
530 
531 public: // mostly for internal use
532  const CVariantInfo* GetVariantInfo(void) const;
533 
534 protected:
535  const CChoiceTypeInfo* GetChoiceTypeInfo(void) const;
536 
537  void Init(const CObjectTypeInfo& info);
538  void Init(const CObjectTypeInfo& info, TMemberIndex index);
539  void Init(const CConstObjectInfo& object);
540 
541 private:
544 
545 private:
547 };
548 
549 /////////////////////////////////////////////////////////////////////////////
550 ///
551 /// CConstObjectInfoCV --
552 ///
553 /// Choice variant
554 /// provides read access to the variant data.
555 
557 {
559 public:
563 
564  /// Get containing choice
565  const CConstObjectInfo& GetChoiceObject(void) const;
566 
568 
569  /// Get variant data
571  /// Get variant data
573 
574 private:
575  pair<TConstObjectPtr, TTypeInfo> GetVariantPair(void) const;
576 
578 };
579 
580 /////////////////////////////////////////////////////////////////////////////
581 ///
582 /// CObjectInfoCV --
583 ///
584 /// Choice variant
585 /// provides read/write access to the variant data.
586 
588 {
590 public:
592  CObjectInfoCV(const CObjectInfo& object);
593  CObjectInfoCV(const CObjectInfo& object, TMemberIndex index);
594 
595  /// Get containing choice
596  const CObjectInfo& GetChoiceObject(void) const;
597 
599 
600  /// Get variant data
601  CObjectInfo GetVariant(void) const;
602  /// Get variant data
603  CObjectInfo operator*(void) const;
604 
605 private:
606  pair<TObjectPtr, TTypeInfo> GetVariantPair(void) const;
607 
609 };
610 
611 
612 template <typename TObj>
613 typename TObj::TmemberIndex Serial_GetAssignedMembers(TObj& obj) {
614  typename TObj::TmemberIndex mi;
615  mi.TObj::TmemberIndex::Tparent::reset();
616  CConstObjectInfo oi(&obj, obj.GetThisTypeInfo());
617  if (oi.GetTypeFamily() == eTypeFamilyClass) {
618  bool allmandatory = true;
619  size_t i = kFirstMemberIndex;
620  for (CConstObjectInfoMI member = oi.BeginMembers(); member; ++member, ++i) {
621  if ( member.IsSet()) {
622  mi.TObj::TmemberIndex::Tparent::set(i);
623  } else if (!member.GetItemInfo()->Optional()) {
624  allmandatory = false;
625  }
626  }
627  mi.TObj::TmemberIndex::Tparent::set(kInvalidMember, allmandatory);
628  } else if (oi.GetTypeFamily() == eTypeFamilyChoice) {
629  mi.TObj::TmemberIndex::Tparent::set(oi.GetCurrentChoiceVariantIndex());
630  }
631  return mi;
632 }
633 
634 template <typename TObj>
635 void Serial_ResetMembers(TObj& obj, typename TObj::TmemberIndex& mi) {
636  CObjectInfo oi(&obj, obj.GetThisTypeInfo());
637  if (oi.GetTypeFamily() == eTypeFamilyClass) {
638  bool allmandatory = mi.TObj::TmemberIndex::Tparent::test(0);
639  size_t i = kFirstMemberIndex;
640  for (CObjectInfoMI member = oi.BeginMembers(); member; ++member, ++i) {
641  if ((allmandatory && !member.GetItemInfo()->Optional()) ||
642  mi.TObj::TmemberIndex::Tparent::test(i)) {
643  member.Erase(CObjectInfoMI::eErase_Mandatory);
644  }
645  }
646  }
647 }
648 
649 /* @} */
650 
651 
653 
655 
656 #endif /* OBJECTITER__HPP */
CConstObjectInfoCV –.
Definition: objectiter.hpp:557
CConstObjectInfoEI –.
Definition: objectiter.hpp:56
CConstObjectInfoMI –.
Definition: objectiter.hpp:397
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
CObjectInfoCV –.
Definition: objectiter.hpp:588
CObjectInfoEI –.
Definition: objectiter.hpp:125
CObjectInfoMI –.
Definition: objectiter.hpp:432
CObjectInfo –.
Definition: objectinfo.hpp:597
CObjectOStream –.
Definition: objostr.hpp:83
CObjectStreamCopier –.
Definition: objcopy.hpp:71
CObjectTypeInfoCV –.
Definition: objectiter.hpp:477
CObjectTypeInfoII –.
Definition: objectiter.hpp:190
CObjectTypeInfoMI –.
Definition: objectiter.hpp:246
CObjectTypeInfoVI –.
Definition: objectiter.hpp:324
CObjectTypeInfo –.
Definition: objectinfo.hpp:94
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
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
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.
static void Init(void)
Definition: cursor6.c:76
size_t TMemberIndex
Type used for indexing class members and choice variants.
Definition: serialdef.hpp:230
const TMemberIndex kFirstMemberIndex
Start if member indexing.
Definition: serialdef.hpp:235
const TMemberIndex kInvalidMember
Special value returned from FindMember.
Definition: serialdef.hpp:237
@ eTypeFamilyClass
Definition: serialdef.hpp:140
@ eTypeFamilyChoice
Definition: serialdef.hpp:141
void Init(const CObjectTypeInfo &info, TMemberIndex index)
CObjectTypeInfoII CParent
Definition: objectiter.hpp:247
const string & GetAlias(void) const
void Init(const CObjectTypeInfo &info, TMemberIndex index)
const CConstObjectInfo & GetChoiceObject(void) const
Get containing choice.
DECLARE_OPERATOR_BOOL(Valid())
Is iterator valid.
bool Valid(void) const
Is iterator valid.
CObjectTypeInfo m_OwnerType
Definition: objectiter.hpp:233
CConstObjectInfoMI(const CConstObjectInfo &object, TMemberIndex index)
CObjectTypeInfoMI CParent
Definition: objectiter.hpp:398
CConstObjectInfo operator*(void) const
Get class member data.
TMemberIndex GetVariantIndex(void) const
Get index of the variant in the choice.
const CClassTypeInfoBase * GetClassTypeInfoBase(void) const
void Reset(void)
Reset value of member to default state.
bool CanGet(void) const
Definition: objectiter.hpp:225
const CObjectInfo & GetChoiceObject(void) const
Get containing choice.
CObjectInfo operator*(void) const
Get variant data.
TObj::TmemberIndex Serial_GetAssignedMembers(TObj &obj)
Definition: objectiter.hpp:613
CConstObjectInfoEI & operator++(void)
Advance to next element.
bool Valid(void) const
Is iterator valid.
bool operator==(const CConstObjectInfoEI &obj) const
Definition: objectiter.hpp:68
CObjectTypeInfoMI CParent
Definition: objectiter.hpp:433
CObjectTypeInfo GetVariantType(void) const
Get variant data type.
CVariantInfo * GetNCVariantInfo(void) const
TMemberIndex GetMemberIndex(void) const
Get index of the member in the class.
CObjectTypeInfo GetChoiceType(void) const
Get containing choice type.
bool CanGet(void) const
Definition: objectiter.hpp:95
CObjectTypeInfo operator*(void) const
Get variant data type.
size_t GetElementCount(void) const
Definition: objectiter.hpp:104
void Serial_ResetMembers(TObj &obj, typename TObj::TmemberIndex &mi)
Definition: objectiter.hpp:635
CObjectTypeInfoMI(const CObjectTypeInfo &info, TMemberIndex index)
CObjectTypeInfoII CParent
Definition: objectiter.hpp:325
CObjectTypeInfoMI & operator++(void)
Advance to next element.
void Init(const CClassTypeInfoBase *typeInfo)
CVariantInfo * GetNCVariantInfo(void) const
CObjectInfo GetElement(void) const
Get element data and type information.
CObjectInfoMI & operator=(const CObjectInfo &object)
CObjectTypeInfoVI(const CObjectTypeInfo &info, TMemberIndex index)
TMemberIndex GetItemIndex(void) const
CObjectInfoCV & operator=(const CObjectInfo &object)
const CMemberInfo * GetMemberInfo(void) const
CConstObjectInfo m_Object
Definition: objectiter.hpp:577
TMemberIndex m_VariantIndex
Definition: objectiter.hpp:543
CObjectInfo m_Object
Definition: objectiter.hpp:466
void Next(void)
Advance to next element.
CObjectTypeInfo GetMemberType(void) const
Get data type information.
CObjectTypeInfoVI & operator=(const CObjectTypeInfo &info)
CMemberIterator BeginMembers(void) const
Create class member iterator.
TMemberIndex m_LastItemIndex
Definition: objectiter.hpp:235
const CItemInfo * GetItemInfo(void) const
DECLARE_OPERATOR_BOOL(Valid())
CObjectTypeInfoCV & operator=(const CConstObjectInfo &object)
CObjectInfo GetMember(void) const
Get class member data.
bool IsSet(void) const
Is member assigned a value.
void Init(const CObjectTypeInfo &info)
const CObjectInfo & GetClassObject(void) const
Get containing class data.
bool CanGet(void) const
Definition: objectiter.hpp:166
TMemberIndex GetCurrentChoiceVariantIndex(void) const
Get index of currently selected choice variant.
Definition: objectinfo.cpp:302
CObjectInfoCV(void)
CObjectTypeInfoVI(const CObjectTypeInfo &info)
CObjectTypeInfoCV CParent
Definition: objectiter.hpp:558
CObjectTypeInfoCV(const CObjectTypeInfo &info)
const CConstObjectInfo & GetClassObject(void) const
Get containing class data.
CObjectTypeInfoMI(const CObjectTypeInfo &info)
CConstContainerElementIterator m_Iterator
Definition: objectiter.hpp:113
void Init(const CObjectTypeInfo &info, TMemberIndex index)
void Next(void)
Advance to next element.
CObjectInfo m_Object
Definition: objectiter.hpp:608
CObjectTypeInfo GetClassType(void) const
Get containing class type.
const CChoiceTypeInfo * GetChoiceTypeInfo(void) const
bool CheckValid(void) const
bool operator!=(const CConstObjectInfoEI &obj) const
Definition: objectiter.hpp:72
bool operator!=(const CObjectTypeInfoII &iter) const
CObjectTypeInfo operator*(void) const
Get data type information.
CObjectInfoEI & operator++(void)
Advance to next element.
void Init(const CObjectTypeInfo &info)
CConstObjectInfoCV(const CConstObjectInfo &object, TMemberIndex index)
CConstObjectInfo operator*(void) const
Get variant data.
CObjectInfoCV(const CObjectInfo &object, TMemberIndex index)
CObjectTypeInfoCV CParent
Definition: objectiter.hpp:589
CConstObjectInfoMI & operator=(const CConstObjectInfo &object)
CObjectTypeInfo GetChoiceType(void) const
Get containing choice.
void Init(const CClassTypeInfoBase *typeInfo, TMemberIndex index)
const CItemInfo * GetItemInfo(void) const
Definition: objectiter.hpp:99
CObjectInfo GetVariant(void) const
Get variant data.
bool Valid(void) const
Is iterator valid.
const CObjectTypeInfo & GetOwnerType(void) const
bool operator==(const CObjectTypeInfoII &iter) const
CConstObjectInfo operator*(void) const
Get element data and type information.
CConstObjectInfo GetVariant(void) const
Get variant data.
TMemberIndex GetIndex(void) const
Get index of the element in the container.
Definition: objectiter.hpp:78
CObjectTypeInfo operator*(void) const
Get data type information.
CObjectInfoMI(const CObjectInfo &object)
CObjectTypeInfoCV(const CObjectTypeInfo &info, TMemberIndex index)
CConstObjectInfo GetMember(void) const
Get class member data.
TMemberIndex GetVariantIndex(void) const
Get index of the variant in the choice.
const CChoiceTypeInfo * m_ChoiceTypeInfo
Definition: objectiter.hpp:542
CObjectInfo operator*(void) const
Get class member data.
CObjectTypeInfoVI & operator++(void)
Advance to next element.
CMemberIterator BeginMembers(void) const
Create class member iterator.
CConstObjectInfoMI(const CConstObjectInfo &object)
CObjectTypeInfoII(const CClassTypeInfoBase *typeInfo)
ETypeFamily GetTypeFamily(void) const
Get data type family.
CObjectTypeInfoCV & operator=(const CObjectTypeInfo &info)
CConstObjectInfoCV & operator=(const CConstObjectInfo &object)
CConstObjectInfo m_Object
Definition: objectiter.hpp:421
void Next(void)
Advance to next element.
const CChoiceTypeInfo * GetChoiceTypeInfo(void) const
bool operator!=(const CObjectTypeInfoCV &iter) const
DECLARE_OPERATOR_BOOL(Valid())
Is iterator valid.
TMemberIndex GetIndex(void) const
Get index of the element in the container (class or choice)
Definition: objectiter.hpp:208
TMemberIndex m_ItemIndex
Definition: objectiter.hpp:234
bool Valid(void) const
CMemberInfo * GetNCMemberInfo(void) const
bool CheckValid(void) const
CObjectTypeInfoCV(const CConstObjectInfo &object)
EEraseFlag
Erase types.
Definition: objectiter.hpp:453
TMemberIndex GetIndex(void) const
Get index of the element in the container.
Definition: objectiter.hpp:147
bool CheckValid(void) const
void Erase(void)
DECLARE_OPERATOR_BOOL(Valid())
Is iterator valid.
CObjectTypeInfo GetVariantType(void) const
Get data type information.
const CClassTypeInfo * GetClassTypeInfo(void) const
CContainerElementIterator m_Iterator
Definition: objectiter.hpp:179
CObjectInfo operator*(void) const
Get element data and type information.
CConstObjectInfoCV(const CConstObjectInfo &object)
bool operator!=(const CObjectInfoEI &obj) const
Definition: objectiter.hpp:141
const CVariantInfo * GetVariantInfo(void) const
const string & GetAlias(void) const
CObjectTypeInfoMI & operator=(const CObjectTypeInfo &info)
CObjectTypeInfoII(const CClassTypeInfoBase *typeInfo, TMemberIndex index)
CObjectInfoEI(void)
CObjectInfoMI(const CObjectInfo &object, TMemberIndex index)
const CVariantInfo * GetVariantInfo(void) const
bool IsSet(void) const
Is member assigned a value.
bool operator==(const CObjectTypeInfoCV &iter) const
const CItemInfo * GetItemInfo(void) const
Definition: objectiter.hpp:170
CConstObjectInfo GetElement(void) const
Get element data and type information.
CObjectInfoCV(const CObjectInfo &object)
void Init(const CObjectTypeInfo &info)
bool operator==(const CObjectInfoEI &obj) const
Definition: objectiter.hpp:137
CObjectInfoMI(void)
@ eErase_Mandatory
allow erasing mandatory members, may be dangerous!
Definition: objectiter.hpp:455
@ eErase_Optional
default - erase optional member only
Definition: objectiter.hpp:454
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_XSERIAL_EXPORT
Definition: ncbi_export.h:1435
int i
static MDB_envinfo info
Definition: mdb_load.c:37
std::istream & in(std::istream &in_, double &x_)
void SetLocalCopyHook(const CObjectTypeInfo &obj_type_info, CObjectStreamCopier &copier, _Func _func)
void SetLocalSkipHook(const CObjectTypeInfo &obj_type_info, CObjectIStream &istr, _Func _func)
void SetLocalWriteHook(const CObjectTypeInfo &obj_type_info, CObjectOStream &ostr, _Func _func)
void SetLocalReadHook(const CObjectTypeInfo &obj_type_info, CObjectIStream &ostr, _Func _func)
Modified on Wed May 29 18:36:03 2024 by modify_doxy.py rev. 669887