32 #ifndef OBJTOOLS_WRITERS___WRITER__HPP
33 #define OBJTOOLS_WRITERS___WRITER__HPP
60 ICanceled* pCanceller) { mpCancelled = pCanceller; };
66 return mpCancelled->IsCanceled();
87 fDebugOutput = (1<<0),
88 fWriterBaseLast = fDebugOutput,
94 unsigned int uFlags=0 ) :
121 cerr <<
"Object type not supported!" << endl;
140 cerr <<
"Object type not supported!" << endl;
159 cerr <<
"Object type not supported!" << endl;
178 cerr <<
"Object type not supported!" << endl;
197 cerr <<
"Object type not supported!" << endl;
230 CWriterListener* pMessageListener) {mpMessageListener = pMessageListener;};
239 if (mpMessageListener) {
240 mpMessageListener->PutMessage(message);
247 if ( !m_Selector.get() ) {
255 return SetAnnotSelector();
286 if (!xWriteFeature(it)) {
302 const string& =
"") = 0;
310 if (!xWriteAlign(*it)) {
virtual bool xWriteAlign(const CSeq_align &, const string &="")=0
virtual ~CAlignWriter(void)=default
bool WriteAlignments(CAlign_CI first)
virtual bool xWriteFeature(CFeat_CI)
virtual ~CFeatWriter(void)=default
bool WriteFeatures(CFeat_CI &first)
virtual ~CInterruptable()
void SetCanceler(ICanceled *pCanceller)
Defines and provides stubs for a general interface to a variety of file formatters.
virtual bool WriteAnnot(const CSeq_annot &, const string &="", const string &="")
Write a raw Seq-annot to the internal output stream.
CWriterListener * mpMessageListener
virtual const CRange< TSeqPos > & GetRange(void) const
virtual bool WriteFooter()
Write a file trailer.
CRange< TSeqPos > m_Range
void SetMessageListener(CWriterListener *pMessageListener)
virtual bool WriteAlign(const CSeq_align &, const string &="", const string &="")
Write a raw Seq-align to the internal output stream.
SAnnotSelector & GetAnnotSelector(void)
virtual bool WriteBioseqHandle(CBioseq_Handle, const string &="", const string &="")
Write a Bioseq handle to the internal output stream.
virtual bool WriteHeader()
Write a file header.
unique_ptr< SAnnotSelector > m_Selector
virtual void PutMessage(const CWriterMessage &message)
virtual SAnnotSelector & SetAnnotSelector(void)
virtual bool WriteHeader(const CSeq_annot &)
Write a file header, using annotation information.
CWriterBase(CNcbiOstream &ostr, unsigned int uFlags=0)
virtual bool WriteSeqAnnotHandle(CSeq_annot_Handle, const string &="", const string &="")
Write a Seq-annot handle to the internal output stream.
virtual bool WriteSeqEntryHandle(CSeq_entry_Handle, const string &="", const string &="")
Write a Seq-entry handle to the internal output stream.
virtual CRange< TSeqPos > & SetRange(void)
Interface for testing cancellation request in a long lasting operation.
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
SAnnotSelector & SetSortOrder(ESortOrder sort_order)
Set sort order of annotations.
@ eSortOrder_Normal
default - increasing start, decreasing length
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_XOBJWRITE_EXPORT