|
Sierra Toolkit
Version of the Day
|
00001 #ifndef STK_UTIL_DIAG_WriterRegsitry_h 00002 #define STK_UTIL_DIAG_WriterRegsitry_h 00003 00004 #include <map> 00005 #include <string> 00006 #include <vector> 00007 00008 #include <stk_util/util/string_case_compare.hpp> 00009 #include <stk_util/diag/Writer.hpp> 00010 00011 #include <stk_util/util/FeatureTest.hpp> 00012 #include <stk_util/diag/Writer_fwd.hpp> 00013 #include <stk_util/diag/WriterParser.hpp> 00014 00015 namespace sierra { 00016 namespace Diag { 00017 00022 00028 class WriterRegistry : public std::map<std::string, std::pair<stk_classic::diag::Writer *, OptionMaskParser *>, stk_classic::LessCase> 00029 { 00030 public: 00031 WriterRegistry(); 00032 00033 ~WriterRegistry(); 00034 }; 00035 00036 class WriterThrowSafe 00037 { 00038 public: 00039 WriterThrowSafe(); 00040 00041 ~WriterThrowSafe(); 00042 00043 private: 00044 std::vector<stk_classic::diag::WriterThrowSafe *> m_writerVector; 00045 }; 00046 00054 WriterRegistry &getWriterRegistry(); 00055 00066 void registerWriter(const std::string &name, Writer &diag_writer, OptionMaskParser &option_parser); 00067 00078 void unregisterWriter(const std::string &name, Writer &diag_writer); 00079 00083 00084 } // namespace Diag 00085 } // namespace sierra 00086 00087 #include <stk_util/diag/WriterExt.hpp> 00088 00089 #endif // STK_UTIL_DIAG_WriterRegsitry_h 00090