1 // deprecated_macro_check header --------------------------------------------------------// 2 3 // Copyright Eric Niebler 2010. 4 // Based on the apple_macro_check checker by Marshall Clow 5 // Distributed under the Boost Software License, Version 1.0. 6 // (See accompanying file LICENSE_1_0.txt or copy at 7 // http://www.boost.org/LICENSE_1_0.txt) 8 9 #ifndef BOOST_DEPRECATED_MACRO_CHECK_HPP 10 #define BOOST_DEPRECATED_MACRO_CHECK_HPP 11 12 #include "inspector.hpp" 13 14 15 namespace boost 16 { 17 namespace inspect 18 { 19 class deprecated_macro_check : public inspector 20 { 21 long m_files_with_errors; 22 bool m_from_boost_root; 23 public: 24 25 deprecated_macro_check(); name() const26 virtual const char * name() const { return "*DEPRECATED-MACROS*"; } desc() const27 virtual const char * desc() const { return "presence of deprecated BOOST macro in file (see docs for replacements)"; } 28 29 virtual void inspect( 30 const std::string & library_name, 31 const path & full_path, 32 const std::string & contents ); 33 ~deprecated_macro_check()34 virtual ~deprecated_macro_check() 35 { std::cout << " " << m_files_with_errors << " files with a deprecated BOOST macro" << line_break(); } 36 }; 37 } 38 } 39 40 #endif // BOOST_DEPRECATED_MACRO_CHECK_HPP 41