Browse Source

bind cppreference

python
Jørgen Lien Sellæg 7 years ago committed by Jørgen Sverre Lien Sellæg
parent
commit
e08504e250
  1. 5
      src/documentation.cpp
  2. 2
      src/documentation.hpp

5
src/documentation.cpp

@ -12711,3 +12711,8 @@ std::experimental::filesystem::status_known cpp/experimental/fs/status_known
return std::string();
return "http://en.cppreference.com/w/" + it->second;
}
void Documentation::CppReference::init_module(py::module &api) {
py::class_<CppReference>(api, "CppReference")
.def("get_url", &CppReference::get_url);
}

2
src/documentation.hpp

@ -1,4 +1,5 @@
#pragma once
#include "python_bind.h"
#include <string>
#include <vector>
@ -7,5 +8,6 @@ namespace Documentation {
public:
static std::vector<std::string> get_headers(const std::string &symbol) noexcept;
static std::string get_url(const std::string &symbol) noexcept;
static void init_module(py::module &api);
};
} // namespace Documentation

Loading…
Cancel
Save