23 #include "pybind11/pybind11.h"
29 using namespace pybind11::literals;
36 py::class_<UrnPolicyFile, std::shared_ptr<UrnPolicyFile>,
DefaultPolicyFile>
cls(mod,
"UrnPolicyFile");
38 cls.def(py::init<const std::string&, bool, bool>(),
"urn"_a,
"strictUrn"_a =
false,
39 "strictLoads"_a =
true);
41 cls.def_static(
"productNameFromUrn", &UrnPolicyFile::productNameFromUrn);
42 cls.def_static(
"filePathFromUrn", &UrnPolicyFile::filePathFromUrn);
43 cls.def_static(
"reposFromUrn", &UrnPolicyFile::reposFromUrn);
44 cls.def_readonly_static(
"URN_PREFIX", &UrnPolicyFile::URN_PREFIX);
45 cls.def_readonly_static(
"URN_PREFIX_ABBREV", &UrnPolicyFile::URN_PREFIX_ABBREV);
46 cls.def_static(
"looksLikeUrn", &UrnPolicyFile::looksLikeUrn);