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

Search Toolkit Book for CGenBankAsyncWriter

#include <objtools/writers/async_writers.hpp>

+ Inheritance diagram for CGenBankAsyncWriter:
+ Collaboration diagram for CGenBankAsyncWriter:

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

CObjectOStreamm_ostream = nullptr
EDuplicateIdPolicy m_DuplicateIdPolicy
CMessageQueue< CConstRef< CSeq_entry > > m_write_queue
std::future< void > m_writer_task

Detailed Description

Definition at line 131 of file async_writers.hpp.

Member Typedef Documentation

◆ TGetNextFunction

Definition at line 148 of file async_writers.hpp.

Member Enumeration Documentation

◆ EDuplicateIdPolicy


Definition at line 134 of file async_writers.hpp.

Constructor & Destructor Documentation

◆ CGenBankAsyncWriter()

CGenBankAsyncWriter::CGenBankAsyncWriter ( CObjectOStream o_stream,
EDuplicateIdPolicy  policy = eReportAll 

Definition at line 51 of file async_writers.cpp.

◆ ~CGenBankAsyncWriter()

CGenBankAsyncWriter::~CGenBankAsyncWriter ( )

Definition at line 57 of file async_writers.cpp.

Member Function Documentation

◆ CancelWriter()

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().

◆ FinishWriter()

void CGenBankAsyncWriter::FinishWriter ( )

◆ PushNextEntry()

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().

◆ StartWriter()

void CGenBankAsyncWriter::StartWriter ( CConstRef< CSerialObject topobject)

◆ Write() [1/2]

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().

◆ Write() [2/2]

void CGenBankAsyncWriter::Write ( CConstRef< CSerialObject topobject,
TGetNextFunction  get_next_entry 

Member Data Documentation

◆ m_DuplicateIdPolicy

EDuplicateIdPolicy CGenBankAsyncWriter::m_DuplicateIdPolicy

Definition at line 159 of file async_writers.hpp.

◆ m_ostream

CObjectOStream* CGenBankAsyncWriter::m_ostream = nullptr

Definition at line 158 of file async_writers.hpp.

Referenced by Write().

◆ m_write_queue

CMessageQueue<CConstRef<CSeq_entry> > CGenBankAsyncWriter::m_write_queue

Definition at line 160 of file async_writers.hpp.

Referenced by CancelWriter(), FinishWriter(), PushNextEntry(), and StartWriter().

◆ m_writer_task

std::future<void> CGenBankAsyncWriter::m_writer_task

Definition at line 161 of file async_writers.hpp.

Referenced by CancelWriter(), FinishWriter(), and StartWriter().

The documentation for this class was generated from the following files:
Modified on Sun Mar 03 03:17:25 2024 by rev. 669887