Journal Class Reference

#include <IpJournalist.hpp>

Inheritance diagram for Journal:

ReferencedObject FileJournal

List of all members.


Detailed Description

Journal class (part of the Journalist implementation.

). This class is the base class for all Journals. It controls the acceptance criteria for print statements etc. Derived classes like the FileJournal - output those messages to specific locations

Public Member Functions

 Journal (const std::string &name, EJournalLevel default_level)
 Constructor.
virtual ~Journal ()
 Destructor.
std::string Name ()
 Get the name of the Journal.
void SetPrintLevel (EJournalCategory category, EJournalLevel level)
 Set the print level for a particular category.
void SetAllPrintLevels (EJournalLevel level)
 Set the print level for all category.
Journal Output Methods. These methods are called by the
Journalist who first checks if the output print level and category are acceptable.

Calling the Print methods explicitly (instead of through the Journalist will output the message regardless of print level and category. You should use the Journalist to print & flush instead

bool IsAccepted (EJournalCategory category, EJournalLevel level) const
 Ask if a particular print level/category is accepted by the journal.
void Print (const char *str)
 Print to the designated output location.
void Printf (const char *pformat, va_list ap)
 Printf to the designated output location.
void FlushBuffer ()
 Flush output buffer.

Protected Member Functions

Implementation version of Print methods. Derived classes
should overload the Impl methods.

virtual void PrintImpl (const char *str)=0
 Print to the designated output location.
virtual void PrintfImpl (const char *pformat, va_list ap)=0
 Printf to the designated output location.
virtual void FlushBufferImpl ()=0
 Flush output buffer.


Constructor & Destructor Documentation

Journal ( const std::string &  name,
EJournalLevel  default_level 
)

Constructor.

References fkinkryx::i, and Ipopt::J_LAST_CATEGORY.

~Journal (  )  [virtual]

Destructor.


Member Function Documentation

std::string Name (  ) 

Get the name of the Journal.

void SetPrintLevel ( EJournalCategory  category,
EJournalLevel  level 
)

Set the print level for a particular category.

void SetAllPrintLevels ( EJournalLevel  level  ) 

Set the print level for all category.

References Ipopt::J_DBG, and Ipopt::J_LAST_CATEGORY.

bool IsAccepted ( EJournalCategory  category,
EJournalLevel  level 
) const

Ask if a particular print level/category is accepted by the journal.

void Print ( const char *  str  )  [inline]

Print to the designated output location.

References Journal::PrintImpl().

void Printf ( const char *  pformat,
va_list  ap 
) [inline]

Printf to the designated output location.

References Journal::PrintfImpl().

void FlushBuffer (  )  [inline]

Flush output buffer.

References Journal::FlushBufferImpl().

virtual void PrintImpl ( const char *  str  )  [protected, pure virtual]

Print to the designated output location.

Implemented in FileJournal.

Referenced by Journal::Print().

virtual void PrintfImpl ( const char *  pformat,
va_list  ap 
) [protected, pure virtual]

Printf to the designated output location.

Implemented in FileJournal.

Referenced by Journal::Printf().

virtual void FlushBufferImpl (  )  [protected, pure virtual]

Flush output buffer.

Implemented in FileJournal.

Referenced by Journal::FlushBuffer().


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

Generated on Fri Sep 26 07:44:26 2008 for SimTKcore by  doxygen 1.5.6