1 //
2 // Copyright (C) 2006-2007 Maciej Sobczak
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 
8 #ifndef SOURCEFILES_H_INCLUDED
9 #define SOURCEFILES_H_INCLUDED
10 
11 #include <string>
12 #include <set>
13 #include <stdexcept>
14 
15 
16 namespace Vera
17 {
18 namespace Structures
19 {
20 
21 
22 class SourceFileError : public std::runtime_error
23 {
24 public:
SourceFileError(const std::string & msg)25     SourceFileError(const std::string & msg) : std::runtime_error(msg) {}
26 };
27 
28 class SourceFiles
29 {
30 public:
31     typedef std::string FileName;
32     typedef std::set<FileName> FileNameSet;
33     typedef FileNameSet::const_iterator iterator;
34 
35     static void addFileName(const FileName & name);
36 
37     static bool empty();
38     static int count();
39 
40     static const FileNameSet & getAllFileNames();
41 };
42 
43 } // namespace Structures
44 
45 } // namespace Vera
46 
47 #endif // SOURCEFILES_H_INCLUDED
48