49 in.BeginContainer(containerType);
54 while (
in.BeginContainerElement(elementType) ) {
56 in.EndContainerElement();
67 : m_Stream(stream), m_Depth(stream.GetStackDepth())
79 "object stack frame error");
92 : m_Stream(stream), m_Depth(stream.GetStackDepth())
110 "object stack frame error");
115 #ifdef NCBI_COMPILER_ICC
116 void* COStreamFrame::operator
new(
size_t size)
118 return ::operator
new(
size);
121 void* COStreamFrame::operator
new[](
size_t size)
123 return ::operator
new[](
size);
126 void* CIStreamFrame::operator
new(
size_t size)
128 return ::operator
new(
size);
131 void* CIStreamFrame::operator
new[](
size_t size)
133 return ::operator
new[](
size);
171 IllegalCall(
"bad CIStreamClassMemberIterator state");
180 in.BeginClass(classTypeInfo);
199 "class member iterator error");
246 out.BeginClassMember(memberInfo->
GetId());
258 "class member write error");
284 IllegalCall(
"bad CIStreamContainerIterator state");
289 :
CParent(
in), m_ContainerType(containerType), m_State(eElementEnd)
310 in.BeginContainer(containerTypeInfo);
339 "not all elements read");
429 out.GetStream().EndContainerElement();
451 :
CParent(
out), m_ContainerType(containerType)
468 out.BeginContainer(containerTypeInfo);
489 "container write error");
Reading (iterating through) elements of containers (SET OF, SEQUENCE OF).
Writing containers (SET OF, SEQUENCE OF).
Read hook for a container element (SEQUENCE OF)
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
const CMemberId & GetId(void) const
TObjectPtr GetItemPtr(TObjectPtr object) const
const CItemInfo * GetItemInfo(TMemberIndex index) const
static TMemberIndex FirstIndex(void)
TTypeInfo GetTypeInfo(void) const
void ReadMember(CObjectIStream &in, TObjectPtr classPtr) const
const TMemberIndex kFirstMemberIndex
Start if member indexing.
const TMemberIndex kInvalidMember
Special value returned from FindMember.
static const TObjectType * SafeCast(TTypeInfo type)
CObjectInfo ReadElement(TObjectPtr container)
CObjectTypeInfo m_ContainerType
virtual void EndClassMember(void)
virtual void EndClassMember(void)
CIStreamContainerIterator(CObjectIStream &in, const CObjectTypeInfo &containerType)
TMemberIndex m_MemberIndex
const CObjectTypeInfo & GetContainerType(void) const
virtual void EndContainerElement(void)
~COStreamClassMember(void)
virtual void EndContainer(void)=0
COStreamContainer(CObjectOStream &out, const CObjectTypeInfo &containerType)
const CContainerTypeInfo * m_ContainerTypeInfo
virtual void EndContainerElement(void)
virtual TMemberIndex BeginClassMember(const CClassTypeInfo *classType)=0
CObjectTypeInfo m_ClassType
void BadState(void) const
const CMemberInfo * GetMemberInfo(void) const
const CMemberInfo * GetMemberInfo(void) const
const CObjectTypeInfo & GetContainerType(void) const
void SkipObject(const CObjectTypeInfo &objectType)
Skip child object.
COStreamFrame(CObjectOStream &stream)
TObjectPtr GetObjectPtr(void) const
Get pointer to object.
void ReadClassMember(const CObjectInfo &classMember)
void BadState(void) const
void BeginClassMember(void)
virtual void EndNamedType(void)
~CIStreamClassMemberIterator(void)
virtual void ReadContainerElement(CObjectIStream &in, const CObjectInfo &container)=0
TTypeInfo GetTypeInfo(void) const
#define BEGIN_OBJECT_FRAME_OF2(Stream, Type, Arg)
const CItemInfo * m_Container
bool InGoodState(void)
Check fail flags and also the state of input data source.
void ReadContainer(CObjectIStream &in, CReadContainerElementHook &hook)
Read element data from stream.
CIStreamClassMemberIterator(CObjectIStream &in, const CObjectTypeInfo &classMemberType)
bool InGoodState(void)
Check fail flags and also the state of output stream.
CObjectTypeInfo m_ContainerType
const CClassTypeInfo * GetClassTypeInfo(void) const
~CIStreamContainerIterator(void)
TFailFlags SetFailFlags(TFailFlags flags, const char *message=0)
Set fail flags.
void SetTopMemberId(const CMemberId &memberId)
TTypeInfo m_ElementTypeInfo
ETypeFamily GetTypeFamily(void) const
Get data type family.
const CObjectTypeInfo GetElementType(void) const
TTypeInfo m_ElementTypeInfo
CIStreamContainerIterator & operator++(void)
void CheckState(EState state)
void SkipClassMember(void)
void NextClassMember(void)
CObjectOStream & GetStream(void) const
CObjectIStream & GetStream(void) const
CIStreamFrame(CObjectIStream &stream)
void ReadSeparateObject(const CObjectInfo &object)
Temporary reader.
void BeginElementData(void)
void WriteElement(const CConstObjectInfo &element)
void IllegalCall(const char *message) const
virtual void EndClass(void)
virtual void EndNamedType(void)
void WriteSeparateObject(const CConstObjectInfo &object)
TFailFlags SetFailFlags(TFailFlags flags, const char *message)
Set fail flags.
const CContainerTypeInfo * GetContainerTypeInfo(void) const
void IllegalCall(const char *message) const
#define END_OBJECT_FRAME_OF(Stream)
virtual void BeginContainerElement(TTypeInfo elementType)
COStreamClassMember(CObjectOStream &out, const CObjectTypeInfo::CMemberIterator &member)
virtual void EndContainer(void)
void CopyObject(TTypeInfo type)
Copy object, omitting file header both in input and output streams.
void CopyElement(CObjectStreamCopier &copier, COStreamContainer &out)
@ fIllegalCall
Illegal in a given context function call.
@ fIllegalCall
Illegal in a given context function call.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const CItemsInfo & GetItems(void) const
ETypeFamily GetTypeFamily(void) const
TObjectPtr AddElement(TObjectPtr containerPtr, TConstObjectPtr elementPtr, ESerialRecursionMode how=eRecursive) const
bool RandomOrder(void) const
const CMemberInfo * GetMemberInfo(TMemberIndex index) const
TTypeInfo GetElementType(void) const
const struct ncbi::grid::netcache::search::fields::SIZE size
std::istream & in(std::istream &in_, double &x_)