NCBI C++ ToolKit
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CIStreamContainerIterator Class Reference

Search Toolkit Book for CIStreamContainerIterator

Reading (iterating through) elements of containers (SET OF, SEQUENCE OF). More...

#include <serial/objectio.hpp>

+ Inheritance diagram for CIStreamContainerIterator:
+ Collaboration diagram for CIStreamContainerIterator:

Public Member Functions

 CIStreamContainerIterator (CObjectIStream &in, const CObjectTypeInfo &containerType)
 
 ~CIStreamContainerIterator (void)
 
const CObjectTypeInfoGetContainerType (void) const
 
const CObjectTypeInfo GetElementType (void) const
 
bool HaveMore (void) const
 
 DECLARE_OPERATOR_BOOL (HaveMore())
 
void NextElement (void)
 
CIStreamContainerIteratoroperator++ (void)
 
CObjectInfo ReadElement (TObjectPtr container)
 
void ReadElement (const CObjectInfo &element)
 
void SkipElement (const CObjectTypeInfo &elementType)
 
void SkipElement (void)
 
void CopyElement (CObjectStreamCopier &copier, COStreamContainer &out)
 
- Public Member Functions inherited from CIStreamFrame
CObjectIStreamGetStream (void) const
 

Private Types

enum  EState {
  eElementBegin , eElementEnd , eNoMoreElements , eFinished ,
  eError
}
 
typedef CIStreamFrame CParent
 

Private Member Functions

const CContainerTypeInfoGetContainerTypeInfo (void) const
 
void BeginElement (void)
 
void BeginElementData (void)
 
void BeginElementData (const CObjectTypeInfo &elementType)
 
void IllegalCall (const char *message) const
 
void BadState (void) const
 
void CheckState (EState state)
 

Private Attributes

CObjectTypeInfo m_ContainerType
 
TTypeInfo m_ElementTypeInfo
 
EState m_State
 
const CContainerTypeInfom_ContainerTypeInfo
 
const CItemInfom_Container
 

Additional Inherited Members

- Protected Member Functions inherited from CIStreamFrame
 CIStreamFrame (CObjectIStream &stream)
 
 ~CIStreamFrame (void)
 
bool Good (void) const
 

Detailed Description

Reading (iterating through) elements of containers (SET OF, SEQUENCE OF).

Suggested use: CObjectIStream& in; CObjectTypeInfo containerType; for ( CIStreamContainerIterator i(in, containerType); i; ++i ) { CElementClass element; i >> element; }

Definition at line 163 of file objectio.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:48 2024 by modify_doxy.py rev. 669887