NCBI C++ ToolKit
|
Search Toolkit Book for CIStreamContainerIterator
Reading (iterating through) elements of containers (SET OF, SEQUENCE OF). More...
#include <serial/objectio.hpp>
Public Member Functions | |
CIStreamContainerIterator (CObjectIStream &in, const CObjectTypeInfo &containerType) | |
~CIStreamContainerIterator (void) | |
const CObjectTypeInfo & | GetContainerType (void) const |
const CObjectTypeInfo | GetElementType (void) const |
bool | HaveMore (void) const |
DECLARE_OPERATOR_BOOL (HaveMore()) | |
void | NextElement (void) |
CIStreamContainerIterator & | operator++ (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 | |
CObjectIStream & | GetStream (void) const |
Private Types | |
enum | EState { eElementBegin , eElementEnd , eNoMoreElements , eFinished , eError } |
typedef CIStreamFrame | CParent |
Private Member Functions | |
const CContainerTypeInfo * | GetContainerTypeInfo (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 CContainerTypeInfo * | m_ContainerTypeInfo |
const CItemInfo * | m_Container |
Additional Inherited Members | |
Protected Member Functions inherited from CIStreamFrame | |
CIStreamFrame (CObjectIStream &stream) | |
~CIStreamFrame (void) | |
bool | Good (void) const |
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.