ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
python_class.h
Go to the documentation of this file.
1#pragma once
2
3#include <unordered_set>
4#include <vector>
5#include <nlohmann/json.hpp>
6
7using json = nlohmann::json;
8
10{
11public:
12 python_class() = default;
13
14 void parse(const json &class_def);
15
16 const std::string &name() const
17 {
18 return name_;
19 }
20
21 const std::unordered_set<std::string> &methods() const
22 {
23 return methods_;
24 }
25
26 const std::unordered_set<std::string> &attributes() const
27 {
28 return attrs_;
29 }
30
33 const std::vector<std::string> &bases() const
34 {
35 return bases_;
36 }
37
38private:
39 std::string name_;
40 std::unordered_set<std::string> methods_;
41 std::unordered_set<std::string> attrs_;
42 std::vector<std::string> bases_;
43};
const std::string & name() const
Definition python_class.h:16
void parse(const json &class_def)
Definition python_class.cpp:5
const std::unordered_set< std::string > & attributes() const
Definition python_class.h:26
const std::vector< std::string > & bases() const
In declaration order: the first base's fields must lead the derived struct, since a base method recei...
Definition python_class.h:33
const std::unordered_set< std::string > & methods() const
Definition python_class.h:21
python_class()=default
nlohmann::json json
Definition json.cpp:12