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

FileJournal class. More...

#include <IpJournalist.hpp>

+ Inheritance diagram for Ipopt::FileJournal:

Public Member Functions

 FileJournal (const std::string &name, EJournalLevel default_level)
 Constructor.
 
virtual ~FileJournal ()
 Destructor.
 
virtual bool Open (const char *fname, bool fappend=false)
 Open a new file for the output location.
 
- 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.

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

Private Attributes

FILEfile_
 FILE pointer for the output destination.
 

Detailed Description

FileJournal class.

This is a particular Journal implementation that writes to a file for output. It can write to (stdout, stderr, or disk) by using "stdout" and "stderr" as filenames.

Definition at line 416 of file IpJournalist.hpp.

Constructor & Destructor Documentation

◆ FileJournal() [1/3]

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

Constructor.

◆ ~FileJournal()

virtual Ipopt::FileJournal::~FileJournal ( )
virtual

Destructor.

◆ FileJournal() [2/3]

Ipopt::FileJournal::FileJournal ( )
private

Default Constructor.

◆ FileJournal() [3/3]

Ipopt::FileJournal::FileJournal ( const FileJournal )
private

Copy Constructor.

Member Function Documentation

◆ Open()

virtual bool Ipopt::FileJournal::Open ( const char fname,
bool  fappend = false 
)
virtual

Open a new file for the output location.

Special Names: stdout means stdout, : stderr means stderr.

Returns
false only if the file with the given name could not be opened
Parameters
fnamename of file to open
fappendwhether to append or truncate file (since 3.14.13)

◆ PrintImpl()

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

Print to the designated output location.

Implements Ipopt::Journal.

◆ PrintfImpl()

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

Printf to the designated output location.

Implements Ipopt::Journal.

◆ FlushBufferImpl()

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

Flush output buffer.

Implements Ipopt::Journal.

◆ operator=()

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

Default Assignment Operator.

Member Data Documentation

◆ file_

FILE* Ipopt::FileJournal::file_
private

FILE pointer for the output destination.

Definition at line 491 of file IpJournalist.hpp.


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