* <code>continue</code>, <code>break</code>, <code>return</code>,
* <code>throw</code>, or by simply reaching the closing brace. In all of
* these cases, it is not necessary to remember to pop the prefix manually
- * using LogStream::pop. In this, it works just like the better known
- * Threads::Mutex::ScopedLock class.
+ * using LogStream::pop(). In this, it works just like the better known
+ * std::unique_ptr and Threads::Mutex::ScopedLock classes.
*/
class Prefix
{
~Prefix ();
private:
+ /**
+ * A pointer to the LogStream object to which the prefix is
+ * applied.
+ */
SmartPointer<LogStream,LogStream::Prefix> stream;
};
}
-inline
-std::ostringstream &
-LogStream::get_stream()
-{
- // see if we have already created this stream. if not, do so and
- // set the default flags (why we set these flags is lost to
- // history, but this is what we need to keep several hundred tests
- // from producing different output)
- //
- // note that in all of this we need not worry about thread-safety
- // because we operate on a thread-local object and by definition
- // there can only be one access at a time
- if (outstreams.get().get() == nullptr)
- {
- outstreams.get().reset (new std::ostringstream);
- outstreams.get()->setf(std::ios::showpoint | std::ios::left);
- }
-
- // then return the stream
- return *outstreams.get();
-}
-
-
-
-inline
-LogStream::Prefix::Prefix(const std::string &text, LogStream &s)
- :
- stream(&s)
-{
- stream->push(text);
-}
-
-
-inline
-LogStream::Prefix::~Prefix()
-{
- stream->pop();
-}
/**
extern LogStream deallog;
-inline
-LogStream::Prefix::Prefix(const std::string &text)
- :
- stream(&deallog)
-{
- stream->push(text);
-}
-
DEAL_II_NAMESPACE_CLOSE
LogStream deallog;
+
+
+LogStream::Prefix::Prefix(const std::string &text)
+ :
+ stream(&deallog)
+{
+ stream->push(text);
+}
+
+
+
+LogStream::Prefix::Prefix(const std::string &text,
+ LogStream &s)
+ :
+ stream(&s)
+{
+ stream->push(text);
+}
+
+
+
+LogStream::Prefix::~Prefix()
+{
+ stream->pop();
+}
+
+
+
LogStream::LogStream()
:
std_out(&std::cout),
}
+
LogStream::~LogStream()
{
// if there was anything left in the stream that is current to this
}
+
+std::ostringstream &
+LogStream::get_stream()
+{
+ // see if we have already created this stream. if not, do so and
+ // set the default flags (why we set these flags is lost to
+ // history, but this is what we need to keep several hundred tests
+ // from producing different output)
+ //
+ // note that in all of this we need not worry about thread-safety
+ // because we operate on a thread-local object and by definition
+ // there can only be one access at a time
+ if (outstreams.get().get() == nullptr)
+ {
+ outstreams.get().reset (new std::ostringstream);
+ outstreams.get()->setf(std::ios::showpoint | std::ios::left);
+ }
+
+ // then return the stream
+ return *outstreams.get();
+}
+
+
+
std::ostream &
LogStream::get_file_stream()
{
}
+
bool
LogStream::has_file() const
{
}
+
const std::string &
LogStream::get_prefix() const
{
}
+
void
LogStream::push (const std::string &text)
{
}
+
void LogStream::pop ()
{
if (get_prefixes().size() > 0)
}
+
std::ios::fmtflags
LogStream::flags(const std::ios::fmtflags f)
{
}
+
std::streamsize
LogStream::precision (const std::streamsize prec)
{
}
+
std::streamsize
LogStream::width (const std::streamsize wide)
{
}
+
unsigned int
LogStream::depth_console (const unsigned int n)
{
}
+
unsigned int
LogStream::depth_file (const unsigned int n)
{
}
+
bool
LogStream::log_thread_id (const bool flag)
{
return h;
}
+
+
std::stack<std::string> &
LogStream::get_prefixes() const
{
}
+
void
LogStream::print_line_head()
{