23 #include "pybind11/pybind11.h" 28 namespace py = pybind11;
36 py::module mod(
"urnPolicyFile");
38 py::class_<UrnPolicyFile, std::shared_ptr<UrnPolicyFile>,
DefaultPolicyFile> cls(mod,
"UrnPolicyFile");
40 cls.def(py::init<const std::string&, bool, bool>(),
"urn"_a,
"strictUrn"_a =
false,
41 "strictLoads"_a =
true);
43 cls.def_static(
"productNameFromUrn", &UrnPolicyFile::productNameFromUrn);
44 cls.def_static(
"filePathFromUrn", &UrnPolicyFile::filePathFromUrn);
45 cls.def_static(
"reposFromUrn", &UrnPolicyFile::reposFromUrn);
46 cls.def_readonly_static(
"URN_PREFIX", &UrnPolicyFile::URN_PREFIX);
47 cls.def_readonly_static(
"URN_PREFIX_ABBREV", &UrnPolicyFile::URN_PREFIX_ABBREV);
48 cls.def_static(
"looksLikeUrn", &UrnPolicyFile::looksLikeUrn);
PYBIND11_PLUGIN(urnPolicyFile)
the definition of the DefaultPolicyFile class
a representation of a default Policy file that is stored as a file in the installation directory of a...
the definition of the UrnPolicyFile class