NCBI C++ ToolKit
|
Search Toolkit Book for CGenBankAsyncWriter
#include <objtools/writers/async_writers.hpp>
Public Types | |
enum | EDuplicateIdPolicy { eIgnore , eThrowImmediately , eReportAll } |
using | TGetNextFunction = std::function< CConstRef< CSeq_entry >()> |
Public Member Functions | |
CGenBankAsyncWriter (CObjectOStream *o_stream, EDuplicateIdPolicy policy=eReportAll) | |
virtual | ~CGenBankAsyncWriter () |
void | Write (CConstRef< CSerialObject > topobject) |
void | Write (CConstRef< CSerialObject > topobject, TGetNextFunction get_next_entry) |
void | StartWriter (CConstRef< CSerialObject > topobject) |
void | PushNextEntry (CConstRef< CSeq_entry > entry) |
void | FinishWriter () |
void | CancelWriter () |
Protected Attributes | |
CObjectOStream * | m_ostream = nullptr |
EDuplicateIdPolicy | m_DuplicateIdPolicy |
CMessageQueue< CConstRef< CSeq_entry > > | m_write_queue |
std::future< void > | m_writer_task |
Definition at line 131 of file async_writers.hpp.
using CGenBankAsyncWriter::TGetNextFunction = std::function<CConstRef<CSeq_entry>()> |
Definition at line 148 of file async_writers.hpp.
Enumerator | |
---|---|
eIgnore | |
eThrowImmediately | |
eReportAll |
Definition at line 134 of file async_writers.hpp.
CGenBankAsyncWriter::CGenBankAsyncWriter | ( | CObjectOStream * | o_stream, |
EDuplicateIdPolicy | policy = eReportAll |
||
) |
Definition at line 51 of file async_writers.cpp.
|
virtual |
Definition at line 57 of file async_writers.cpp.
void CGenBankAsyncWriter::CancelWriter | ( | ) |
Definition at line 88 of file async_writers.cpp.
References m_write_queue, and m_writer_task.
Referenced by CCleanupApp::x_ProcessHugeFileBlob().
void CGenBankAsyncWriter::FinishWriter | ( | ) |
Definition at line 82 of file async_writers.cpp.
References m_write_queue, and m_writer_task.
Referenced by CCleanupApp::x_ProcessHugeFileBlob(), and CHugeFileDemoApp::x_ReadAndWritePush().
void CGenBankAsyncWriter::PushNextEntry | ( | CConstRef< CSeq_entry > | entry | ) |
Definition at line 77 of file async_writers.cpp.
References m_write_queue.
Referenced by CHugeFileDemoApp::x_ReadAndWritePush().
void CGenBankAsyncWriter::StartWriter | ( | CConstRef< CSerialObject > | topobject | ) |
Definition at line 64 of file async_writers.cpp.
References m_write_queue, m_writer_task, and Write().
Referenced by CCleanupApp::x_ProcessHugeFileBlob(), and CHugeFileDemoApp::x_ReadAndWritePush().
void CGenBankAsyncWriter::Write | ( | CConstRef< CSerialObject > | topobject | ) |
Definition at line 60 of file async_writers.cpp.
References CSerialObject::GetThisTypeInfo(), m_ostream, and CObjectOStream::Write().
Referenced by StartWriter().
void CGenBankAsyncWriter::Write | ( | CConstRef< CSerialObject > | topobject, |
TGetNextFunction | get_next_entry | ||
) |
Definition at line 113 of file async_writers.cpp.
References CObjectTypeInfo::FindMember(), m_ostream, out(), and SetLocalWriteHook().
|
protected |
Definition at line 159 of file async_writers.hpp.
|
protected |
Definition at line 158 of file async_writers.hpp.
Referenced by Write().
|
protected |
Definition at line 160 of file async_writers.hpp.
Referenced by CancelWriter(), FinishWriter(), PushNextEntry(), and StartWriter().
|
protected |
Definition at line 161 of file async_writers.hpp.
Referenced by CancelWriter(), FinishWriter(), and StartWriter().