Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::StreamJournal Class Reference

StreamJournal class. More...

#include <IpJournalist.hpp>

+ Inheritance diagram for Ipopt::StreamJournal:

Public Member Functions

 StreamJournal (const std::string &name, EJournalLevel default_level)
 Constructor.
 
virtual ~StreamJournal ()
 Destructor.
 
void SetOutputStream (std::ostream *os)
 Setting the output stream pointer.
 
- Public Member Functions inherited from Ipopt::Journal
 Journal (const std::string &name, EJournalLevel default_level)
 Constructor.
 
virtual ~Journal ()
 Destructor.
 
virtual std::string Name ()
 Get the name of the Journal.
 
virtual void SetPrintLevel (EJournalCategory category, EJournalLevel level)
 Set the print level for a particular category.
 
virtual void SetAllPrintLevels (EJournalLevel level)
 Set the print level for all category.
 
virtual bool IsAccepted (EJournalCategory category, EJournalLevel level) const
 Ask if a particular print level/category is accepted by the journal.
 
virtual void Print (EJournalCategory category, EJournalLevel level, const char *str)
 Print to the designated output location.
 
virtual void Printf (EJournalCategory category, EJournalLevel level, const char *pformat, va_list ap)
 Printf to the designated output location.
 
virtual void FlushBuffer ()
 Flush output buffer.
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Protected Member Functions

Implementation version of Print methods

Overloaded from Journal base class.

virtual void PrintImpl (EJournalCategory, EJournalLevel, const char *str)
 Print to the designated output location.
 
virtual void PrintfImpl (EJournalCategory, EJournalLevel, const char *pformat, va_list ap)
 Printf to the designated output location.
 
virtual void FlushBufferImpl ()
 Flush output buffer.
 
Implementation version of Print methods.

Derived classes should overload the Impl methods.

Private Member Functions

Default Compiler Generated Methods

(Hidden to avoid implicit creation/calling).

These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.

 StreamJournal ()
 Default Constructor.
 
 StreamJournal (const StreamJournal &)
 Copy Constructor.
 
void operator= (const StreamJournal &)
 Default Assignment Operator.
 

Private Attributes

std::ostream * os_
 pointer to output stream for the output destination
 
char buffer_ [32768]
 buffer for vsnprintf.
 

Detailed Description

StreamJournal class.

This is a particular Journal implementation that writes to a stream for output.

Definition at line 498 of file IpJournalist.hpp.

Constructor & Destructor Documentation

◆ StreamJournal() [1/3]

Ipopt::StreamJournal::StreamJournal ( const std::string &  name,
EJournalLevel  default_level 
)

Constructor.

◆ ~StreamJournal()

virtual Ipopt::StreamJournal::~StreamJournal ( )
inlinevirtual

Destructor.

Definition at line 508 of file IpJournalist.hpp.

◆ StreamJournal() [2/3]

Ipopt::StreamJournal::StreamJournal ( )
private

Default Constructor.

◆ StreamJournal() [3/3]

Ipopt::StreamJournal::StreamJournal ( const StreamJournal )
private

Copy Constructor.

Member Function Documentation

◆ SetOutputStream()

void Ipopt::StreamJournal::SetOutputStream ( std::ostream *  os)

Setting the output stream pointer.

◆ PrintImpl()

virtual void Ipopt::StreamJournal::PrintImpl ( EJournalCategory  ,
EJournalLevel  ,
const char str 
)
protectedvirtual

Print to the designated output location.

Implements Ipopt::Journal.

◆ PrintfImpl()

virtual void Ipopt::StreamJournal::PrintfImpl ( EJournalCategory  ,
EJournalLevel  ,
const char pformat,
va_list  ap 
)
protectedvirtual

Printf to the designated output location.

Implements Ipopt::Journal.

◆ FlushBufferImpl()

virtual void Ipopt::StreamJournal::FlushBufferImpl ( )
protectedvirtual

Flush output buffer.

Implements Ipopt::Journal.

◆ operator=()

void Ipopt::StreamJournal::operator= ( const StreamJournal )
private

Default Assignment Operator.

Member Data Documentation

◆ os_

std::ostream* Ipopt::StreamJournal::os_
private

pointer to output stream for the output destination

Definition at line 567 of file IpJournalist.hpp.

◆ buffer_

char Ipopt::StreamJournal::buffer_[32768]
private

buffer for vsnprintf.

Being generous in size here...

Definition at line 570 of file IpJournalist.hpp.


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