cprover
Loading...
Searching...
No Matches
source_lines.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Source Lines
4
5Author: Mark R. Tuttle
6
7\*******************************************************************/
8
11
19
20#ifndef CPROVER_GOTO_INSTRUMENT_SOURCE_LINES_H
21#define CPROVER_GOTO_INSTRUMENT_SOURCE_LINES_H
22
23#include <map>
24#include <set>
25#include <string>
26
28
30{
31public:
33 source_linest() = default;
34 explicit source_linest(const source_locationt &loc)
35 {
36 insert(loc);
37 }
38
41 void insert(const source_locationt &loc);
42
50 std::string to_string() const;
51
52private:
54 typedef std::set<std::size_t> linest;
56 typedef std::map<std::string, linest> block_linest;
57
59};
60
61#endif // CPROVER_GOTO_INSTRUMENT_SOURCE_LINES_H
void insert(const source_locationt &loc)
Insert a line (a source location) into the set of lines.
source_linest(const source_locationt &loc)
block_linest block_lines
std::set< std::size_t > linest
A set of lines from a single file.
std::map< std::string, linest > block_linest
A set of lines from multiple files.
std::string to_string() const
Construct a string representing the set of lines.
source_linest()=default
Constructors.