SAGA C++ API 1.6
module_needs_logging.hpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2011 Hartmut Kaiser
00002 // 
00003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00005 
00006 #ifndef SAGA_DETAIL_MODULE_NEEDS_LOGGING_HPP
00007 #define SAGA_DETAIL_MODULE_NEEDS_LOGGING_HPP
00008 
00009 #include <saga/saga/util.hpp>
00010 #include <saga/saga/export_definitions.hpp>
00011 
00012 // suppress warnings about dependent classes not being exported from the dll
00013 #if defined(BOOST_MSVC)
00014 #pragma warning(push)
00015 #pragma warning(disable: 4251 4231 4660)
00016 #endif
00017 
00018 namespace saga 
00019 { 
00020     // forward declaration
00021     class session;
00022 
00023     namespace detail 
00024     {
00026         // the default session as singleton, and the no-session singleton
00027         SAGA_EXPORT session& get_the_session();
00029 
00031         // This is the main API for adaptors query whether log messages from 
00032         // the given module name (adaptor name) need to be processed.
00033         SAGA_EXPORT bool module_needs_logging(char const* module_name, 
00034             saga::session const& s = saga::detail::get_the_session());
00035     }
00036 }
00037 
00038 #if defined(BOOST_MSVC)
00039 #pragma warning(pop)
00040 #endif
00041 
00042 #endif
00043 
00044 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines