Go to the documentation of this file.
7 #ifndef __IPJOURNALIST_HPP__
8 #define __IPJOURNALIST_HPP__
135 __attribute__((format(printf, 4, 5)))
158 const std::string& line
163 __attribute__((format(printf, 5, 6)))
232 const std::string& location_name,
233 const std::string& fname,
242 const std::string& location_name
287 const std::string& name,
331 PrintImpl(category, level, str);
342 PrintfImpl(category, level, pformat, ap);
420 const std::string& name,
501 const std::string& name,
@ J_USER5
This can be used by the user's application.
virtual void Printf(EJournalLevel level, EJournalCategory category, const char *format,...) const
Method to print a formatted string.
virtual void DeleteAllJournals()
Delete all journals currently known by the journalist.
virtual void PrintfImpl(EJournalCategory, EJournalLevel, const char *pformat, va_list ap)
Printf to the designated output location.
virtual void Printf(EJournalCategory category, EJournalLevel level, const char *pformat, va_list ap)
Printf to the designated output location.
@ J_USER10
This can be used by the user's application.
FileJournal(const std::string &name, EJournalLevel default_level)
Constructor.
Journal(const Journal &)
Copy Constructor.
virtual bool IsAccepted(EJournalCategory category, EJournalLevel level) const
Ask if a particular print level/category is accepted by the journal.
@ J_USER7
This can be used by the user's application.
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.
virtual void PrintfIndented(EJournalLevel level, EJournalCategory category, Index indent_level, const char *format,...) const
Method to print a formatted string with indentation.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
@ J_USER6
This can be used by the user's application.
@ J_USER9
This can be used by the user's application.
Journal(const std::string &name, EJournalLevel default_level)
Constructor.
@ J_USER13
This can be used by the user's application.
EJournalLevel
Print Level Enum.
void operator=(const StreamJournal &)
Default Assignment Operator.
virtual void FlushBuffer() const
Method that flushes the current buffer for all Journalists.
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 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...
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 ~Journal()
Destructor.
void SetOutputStream(std::ostream *os)
Setting the output stream pointer.
@ J_USER17
This can be used by the user's application.
virtual ~FileJournal()
Destructor.
Journal class (part of the Journalist implementation.).
virtual void FlushBufferImpl()=0
Flush output buffer.
Template class for Smart Pointers.
@ J_USER8
This can be used by the user's application.
@ J_USER15
This can be used by the user's application.
EJournalCategory
Category Selection Enum.
virtual void FlushBuffer()
Flush output buffer.
@ J_USER14
This can be used by the user's application.
virtual void SetPrintLevel(EJournalCategory category, EJournalLevel level)
Set the print level for a particular category.
ipindex Index
Type of all indices of vectors, matrices etc.
Journal()
Default Constructor.
virtual void PrintfImpl(EJournalCategory category, EJournalLevel level, const char *pformat, va_list ap)=0
Printf to the designated output location.
@ J_USER11
This can be used by the user's application.
virtual std::string Name()
Get the name of the Journal.
virtual void Print(EJournalCategory category, EJournalLevel level, const char *str)
Print to the designated output location.
virtual void FlushBufferImpl()
Flush output buffer.
virtual void SetAllPrintLevels(EJournalLevel level)
Set the print level for all category.
Class responsible for all message output.
StreamJournal(const std::string &name, EJournalLevel default_level)
Constructor.
virtual void FlushBufferImpl()
Flush output buffer.
virtual void PrintImpl(EJournalCategory, EJournalLevel, const char *str)
Print to the designated output location.
void operator=(const Journal &)
Default Assignment Operator.
virtual bool Open(const char *fname)
Open a new file for the output location.
virtual void PrintImpl(EJournalCategory, EJournalLevel, const char *str)
Print to the designated output location.
FILE * file_
FILE pointer for the output destination.
void operator=(const FileJournal &)
Default Assignment Operator.
@ J_USER12
This can be used by the user's application.
virtual SmartPtr< Journal > AddFileJournal(const std::string &location_name, const std::string &fname, EJournalLevel default_level=J_WARNING)
Add a new FileJournal.
FileJournal(const FileJournal &)
Copy Constructor.
@ J_HESSIAN_APPROXIMATION
virtual bool AddJournal(const SmartPtr< Journal > jrnl)
Add a new journal.
Journalist(const Journalist &)
Copy Constructor.
virtual void PrintfImpl(EJournalCategory, EJournalLevel, const char *pformat, va_list ap)
Printf to the designated output location.
virtual ~Journalist()
Destructor...
FileJournal()
Default Constructor.
virtual SmartPtr< Journal > GetJournal(const std::string &location_name)
Get an existing journal.
@ J_USER_APPLICATION
This can be used by the user's application.
void operator=(const Journalist &)
Default Assignment Operator.
std::ostream * os_
pointer to output stream for the output destination
std::vector< SmartPtr< Journal > > journals_
std::string name_
Name of the output location.
@ J_USER1
This can be used by the user's application.
virtual void PrintImpl(EJournalCategory category, EJournalLevel level, const char *str)=0
Print to the designated output location.
@ J_USER3
This can be used by the user's application.
StreamJournal()
Default Constructor.
@ J_USER4
This can be used by the user's application.
@ J_USER2
This can be used by the user's application.
Storing the reference count of all the smart pointers that currently reference it.
@ J_USER16
This can be used by the user's application.
StreamJournal(const StreamJournal &)
Copy Constructor.
virtual ~StreamJournal()
Destructor.