Sierra Toolkit Version of the Day
OutputLog.hpp
Go to the documentation of this file.
00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 #ifndef STK_UTIL_ENVIRONMENT_OUTPUTLOG_HPP
00010 #define STK_UTIL_ENVIRONMENT_OUTPUTLOG_HPP
00011 
00012 #include <iosfwd>
00013 #include <string>
00014 
00015 // #include <stk_util/util/TeeStreambuf.hpp>
00016 
00017 namespace stk {
00018 
00019 template<class Ch, class Tr>
00020 class basic_tee_streambuf;
00021 
00023 typedef stk::basic_tee_streambuf<char, std::char_traits<char> > tee_streambuf;
00024 
00029 
00065 void register_ostream(std::ostream &os, const std::string &name);
00066 
00073 void unregister_ostream(std::ostream &os);
00074 
00095 void bind_output_streams(const std::string &output_description);
00096 
00107 void register_log_ostream(std::ostream &os, const std::string &name);
00108 
00116 void unregister_log_ostream(std::ostream &os);
00117 
00131 void create_log_file(const std::string &name, const std::string &path);
00132 
00141 void close_log_file(const std::string &name);
00142 
00153 bool is_registered_ostream(const std::string &name);
00154 
00166 const std::string &get_log_path(const std::string &name);
00167 
00178 std::ostream *get_log_ostream(const std::string &name);
00179 
00190 std::ostream *get_ostream_ostream(const std::string &name);
00191 
00202 std::ostream *get_ostream_tee_ostream(const std::string &name);
00203 
00207 
00208 } // namespace stk
00209 
00210 #endif // STK_UTIL_ENVIRONMENT_OUTPUTLOG_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends