mirror of
https://github.com/varun-r-mallya/pylibbpf.git
synced 2026-02-12 16:11:00 +00:00
21 lines
447 B
C++
21 lines
447 B
C++
#ifndef PYLIBBPF_STRUCT_PARSER_H
|
|
#define PYLIBBPF_STRUCT_PARSER_H
|
|
|
|
#include <pybind11/pybind11.h>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
namespace py = pybind11;
|
|
|
|
class StructParser {
|
|
private:
|
|
std::unordered_map<std::string, py::object> struct_types_;
|
|
|
|
public:
|
|
explicit StructParser(py::dict structs);
|
|
py::object parse(const std::string &struct_name, py::bytes data);
|
|
bool has_struct(const std::string &struct_name) const;
|
|
};
|
|
|
|
#endif
|