OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | List of all members
kdu_stream_message Class Reference

#include <ossimKakaduMessaging.h>

Inheritance diagram for kdu_stream_message:

Public Member Functions

 kdu_stream_message (std::ostream *stream, bool throw_exc)
 
virtual void put_text (const char *string)
 
virtual void flush (bool end_of_message=false)
 

Private Attributes

std::ostream * m_stream
 
bool m_throw_exc
 

Detailed Description

Definition at line 23 of file ossimKakaduMessaging.h.

Constructor & Destructor Documentation

◆ kdu_stream_message()

kdu_stream_message::kdu_stream_message ( std::ostream *  stream,
bool  throw_exc 
)
inline

Definition at line 26 of file ossimKakaduMessaging.h.

27  : kdu_core::kdu_thread_safe_message(),
28  m_stream(stream),
29  m_throw_exc(throw_exc)
30  {}

Member Function Documentation

◆ flush()

virtual void kdu_stream_message::flush ( bool  end_of_message = false)
inlinevirtual

Definition at line 37 of file ossimKakaduMessaging.h.

References m_stream, and m_throw_exc.

38  {
39  m_stream->flush();
40 
41  // This call unlocks mutex in kakadu_thread_safe_message:
42  kdu_core::kdu_thread_safe_message::flush(end_of_message);
43 
44  if (end_of_message && m_throw_exc)
45  {
46  //---
47  // Using ossimException caused hang. From kakadu kdu_messaging.h:
48  // Unless you have good reason to do otherwise, you are strongly
49  // recommended to use the default `exception_val' of
50  // `KDU_ERROR_EXCEPTION'
51  //---
52  throw KDU_ERROR_EXCEPTION;
53  }
54  }

◆ put_text()

virtual void kdu_stream_message::put_text ( const char *  string)
inlinevirtual

Definition at line 32 of file ossimKakaduMessaging.h.

33  {
34  (*m_stream) << string;
35  }

Member Data Documentation

◆ m_stream

std::ostream* kdu_stream_message::m_stream
private

Definition at line 57 of file ossimKakaduMessaging.h.

Referenced by flush().

◆ m_throw_exc

bool kdu_stream_message::m_throw_exc
private

Definition at line 58 of file ossimKakaduMessaging.h.

Referenced by flush().


The documentation for this class was generated from the following file: