ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
symbol_id.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
6{
7public:
9 const std::string &file,
10 const std::string &clazz,
11 const std::string &function);
12
13 symbol_id() = default;
14
15 static symbol_id from_string(const std::string &str);
16
17 void set_object(const std::string &obj)
18 {
19 object_ = obj;
20 }
21
22 void set_attribute(const std::string &attr)
23 {
24 attribute_ = attr;
25 }
26
27 void set_class(const std::string &clazz)
28 {
29 classname_ = clazz;
30 }
31
32 void set_function(const std::string &func)
33 {
34 function_name_ = func;
35 }
36
37 void set_prefix(const std::string &prefix)
38 {
39 prefix_ = prefix;
40 }
41
42 void set_filename(const std::string &filename)
43 {
44 filename_ = filename;
45 }
46
47 const std::string &get_prefix() const
48 {
49 return prefix_;
50 }
51
52 const std::string &get_function() const
53 {
54 return function_name_;
55 }
56
57 const std::string &get_class() const
58 {
59 return classname_;
60 }
61
62 const std::string &get_filename() const
63 {
64 return filename_;
65 }
66
67 const std::string &get_object() const
68 {
69 return object_;
70 }
71
72 void clear();
73
74 std::string to_string() const;
75
76 std::string global_to_string() const;
77
78private:
79 std::string filename_;
80 std::string classname_ = "";
81 std::string function_name_ = "";
82 std::string object_ = "";
83 std::string attribute_ = "";
84 std::string prefix_ = "py:";
85};
void set_class(const std::string &clazz)
Definition symbol_id.h:27
const std::string & get_object() const
Definition symbol_id.h:67
const std::string & get_filename() const
Definition symbol_id.h:62
const std::string & get_class() const
Definition symbol_id.h:57
std::string global_to_string() const
Definition symbol_id.cpp:79
const std::string & get_function() const
Definition symbol_id.h:52
void clear()
Definition symbol_id.cpp:90
const std::string & get_prefix() const
Definition symbol_id.h:47
symbol_id(const std::string &file, const std::string &clazz, const std::string &function)
Definition symbol_id.cpp:5
void set_attribute(const std::string &attr)
Definition symbol_id.h:22
void set_filename(const std::string &filename)
Definition symbol_id.h:42
std::string to_string() const
Definition symbol_id.cpp:59
void set_prefix(const std::string &prefix)
Definition symbol_id.h:37
void set_object(const std::string &obj)
Definition symbol_id.h:17
symbol_id()=default
static symbol_id from_string(const std::string &str)
Definition symbol_id.cpp:13
void set_function(const std::string &func)
Definition symbol_id.h:32
Definition module.h:12