LifeV
link_check.hpp
Go to the documentation of this file.
1 // link_check header -------------------------------------------------------//
2 
3 // Copyright Beman Dawes 2002
4 // Copyright Rene Rivera 2004.
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_LINK_CHECK_HPP
10 #define BOOST_LINK_CHECK_HPP
11 
12 #include "inspector.hpp"
13 
14 #include <map>
15 #include <utility> // for make_pair()
16 
17 namespace boost
18 {
19 namespace inspect
20 {
21 const int m_linked_to = 1;
22 const int m_present = 2;
23 
25 {
30 
31  typedef std::map< string, int > m_path_map;
32  m_path_map m_paths; // first() is relative initial_path()
33 
34  void do_url ( const string& url,
35  const string& library_name, const path& full_source_path );
36 public:
37 
38  link_check();
39  virtual const char* name() const
40  {
41  return "link-check";
42  }
43  virtual const char* desc() const
44  {
45  return "invalid bookmarks, invalid urls, broken links, unlinked files";
46  }
47 
48  virtual void inspect (
49  const std::string& library_name,
50  const path& full_path );
51 
52  virtual void inspect (
53  const std::string& library_name,
54  const path& full_path,
55  const std::string& contents );
56 
57  virtual void close();
58 
59  virtual ~link_check()
60  {
61  std::cout << " " << m_bookmark_errors << " bookmarks with invalid characters\n";
62  std::cout << " " << m_invalid_errors << " invalid urls\n";
63  std::cout << " " << m_broken_errors << " broken links\n";
64  std::cout << " " << m_unlinked_errors << " unlinked files\n";
65  }
66 };
67 }
68 }
69 
70 #endif // BOOST_LINK_CHECK_HPP
const int m_linked_to
Definition: link_check.hpp:21
const int m_present
Definition: link_check.hpp:22