7#ifndef __IPJOURNALIST_HPP__
8#define __IPJOURNALIST_HPP__
158 const std::string&
line
233 const std::string&
fname,
288 const std::string&
name,
421 const std::string&
name,
503 const std::string&
name,
Templated class which stores one entry for the CachedResult class.
virtual bool Open(const char *fname, bool fappend=false)
Open a new file for the output location.
FileJournal()
Default Constructor.
virtual ~FileJournal()
Destructor.
virtual void FlushBufferImpl()
Flush output buffer.
FILE * file_
FILE pointer for the output destination.
FileJournal(const std::string &name, EJournalLevel default_level)
Constructor.
virtual void PrintImpl(EJournalCategory, EJournalLevel, const char *str)
Print to the designated output location.
FileJournal(const FileJournal &)
Copy Constructor.
void operator=(const FileJournal &)
Default Assignment Operator.
virtual void PrintfImpl(EJournalCategory, EJournalLevel, const char *pformat, va_list ap)
Printf to the designated output location.
Journal class (part of the Journalist implementation.).
virtual void Printf(EJournalCategory category, EJournalLevel level, const char *pformat, va_list ap)
Printf to the designated output location.
void operator=(const Journal &)
Default Assignment Operator.
virtual void SetPrintLevel(EJournalCategory category, EJournalLevel level)
Set the print level for a particular category.
Journal()
Default Constructor.
virtual void Print(EJournalCategory category, EJournalLevel level, const char *str)
Print to the designated output location.
virtual std::string Name()
Get the name of the Journal.
virtual void PrintImpl(EJournalCategory category, EJournalLevel level, const char *str)=0
Print to the designated output location.
virtual bool IsAccepted(EJournalCategory category, EJournalLevel level) const
Ask if a particular print level/category is accepted by the journal.
Journal(const Journal &)
Copy Constructor.
std::string name_
Name of the output location.
Journal(const std::string &name, EJournalLevel default_level)
Constructor.
virtual void FlushBufferImpl()=0
Flush output buffer.
virtual ~Journal()
Destructor.
virtual void SetAllPrintLevels(EJournalLevel level)
Set the print level for all category.
virtual void PrintfImpl(EJournalCategory category, EJournalLevel level, const char *pformat, va_list ap)=0
Printf to the designated output location.
virtual void FlushBuffer()
Flush output buffer.
Class responsible for all message output.
virtual SmartPtr< Journal > AddFileJournal(const std::string &location_name, const std::string &fname, EJournalLevel default_level=J_WARNING, bool file_append=false)
Add a new FileJournal.
virtual void VPrintf(EJournalLevel level, EJournalCategory category, const char *pformat, va_list ap) const
Method to print a formatted string using the va_list argument.
Journalist(const Journalist &)
Copy Constructor.
virtual bool AddJournal(const SmartPtr< Journal > jrnl)
Add a new journal.
virtual SmartPtr< Journal > GetJournal(const std::string &location_name)
Get an existing journal.
virtual void FlushBuffer() const
Method that flushes the current buffer for all Journalists.
void operator=(const Journalist &)
Default Assignment Operator.
virtual void VPrintfIndented(EJournalLevel level, EJournalCategory category, Index indent_level, const char *pformat, va_list ap) const
Method to print a formatted string with indentation, using the va_list argument.
virtual void DeleteAllJournals()
Delete all journals currently known by the journalist.
virtual void PrintfIndented(EJournalLevel level, EJournalCategory category, Index indent_level, const char *format,...) const
Method to print a formatted string with indentation.
std::vector< SmartPtr< Journal > > journals_
virtual void PrintStringOverLines(EJournalLevel level, EJournalCategory category, Index indent_spaces, Index max_length, const std::string &line) const
Method to print a long string including indentation.
virtual void Printf(EJournalLevel level, EJournalCategory category, const char *format,...) const
Method to print a formatted string.
virtual ~Journalist()
Destructor...
virtual bool ProduceOutput(EJournalLevel level, EJournalCategory category) const
Method that returns true if there is a Journal that would write output for the given JournalLevel and...
Storing the reference count of all the smart pointers that currently reference it.
virtual void PrintImpl(EJournalCategory, EJournalLevel, const char *str)
Print to the designated output location.
virtual void FlushBufferImpl()
Flush output buffer.
virtual void PrintfImpl(EJournalCategory, EJournalLevel, const char *pformat, va_list ap)
Printf to the designated output location.
virtual ~StreamJournal()
Destructor.
StreamJournal(const std::string &name, EJournalLevel default_level)
Constructor.
StreamJournal(const StreamJournal &)
Copy Constructor.
StreamJournal()
Default Constructor.
void SetOutputStream(std::ostream *os)
Setting the output stream pointer.
void operator=(const StreamJournal &)
Default Assignment Operator.
std::ostream * os_
pointer to output stream for the output destination
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
EJournalCategory
Category Selection Enum.
@ J_USER16
This can be used by the user's application.
@ J_USER4
This can be used by the user's application.
@ J_USER7
This can be used by the user's application.
@ J_USER13
This can be used by the user's application.
@ J_USER14
This can be used by the user's application.
@ J_USER_APPLICATION
This can be used by the user's application.
@ J_USER9
This can be used by the user's application.
@ J_USER11
This can be used by the user's application.
@ J_USER2
This can be used by the user's application.
@ J_USER1
This can be used by the user's application.
@ J_USER17
This can be used by the user's application.
@ J_USER15
This can be used by the user's application.
@ J_USER3
This can be used by the user's application.
@ J_USER12
This can be used by the user's application.
@ J_USER8
This can be used by the user's application.
@ J_USER10
This can be used by the user's application.
@ J_USER6
This can be used by the user's application.
@ J_USER5
This can be used by the user's application.
@ J_HESSIAN_APPROXIMATION
EJournalLevel
Print Level Enum.