Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c2cf77

Browse files
committed
Fix static definition
1 parent9068dc1 commit5c2cf77

File tree

1 file changed

+39
-12
lines changed

1 file changed

+39
-12
lines changed

‎bindings/storage/PathFinder.cpp‎

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,29 @@ namespace py = pybind11;
1313
//using namespace BPrivate::Storage;
1414
//using namespace BPrivate::Storage::Mime;
1515
//using namespace BPackageKit;
16+
classBPathFinderWrapper {
17+
public:
18+
static std::tuple<status_t, BStringList>FindPaths(BPathFinder& self,constchar* architecture, path_base_directory baseDirectory,constchar* subPath, uint32 flags) {
19+
BStringList _paths;
20+
status_t result = self.FindPaths(architecture, baseDirectory, subPath, flags, _paths);
21+
returnstd::make_tuple(result, _paths);
22+
}
23+
static std::tuple<status_t, BStringList>FindPaths(BPathFinder& self, path_base_directory baseDirectory,constchar* subPath, uint32 flags) {
24+
BStringList _paths;
25+
status_t result = self.FindPaths(baseDirectory, subPath, flags, _paths);
26+
returnstd::make_tuple(result, _paths);
27+
}
28+
static std::tuple<status_t, BStringList>FindPaths(BPathFinder& self, path_base_directory baseDirectory,constchar* subPath) {
29+
BStringList _paths;
30+
status_t result = self.FindPaths(baseDirectory, subPath, _paths);
31+
returnstd::make_tuple(result, _paths);
32+
}
33+
static std::tuple<status_t, BStringList>FindPaths(BPathFinder& self, path_base_directory baseDirectory) {
34+
BStringList _paths;
35+
status_t result = self.FindPaths(baseDirectory, _paths);
36+
returnstd::make_tuple(result, _paths);
37+
}
38+
};
1639

1740
PYBIND11_MODULE(PathFinder, m)
1841
{
@@ -51,30 +74,34 @@ py::class_<BPathFinder>(m, "BPathFinder")
5174
returnstd::make_tuple(r,_path);
5275
}
5376
,"",py::arg("baseDirectory"))
54-
.def("FindPaths", [](BPathFinder& self,constchar * architecture,path_base_directory baseDirectory,constchar * subPath,uint32 flags) {
77+
/*.def_static("FindPaths", [](BPathFinder& self,const char * architecture,path_base_directory baseDirectory,const char * subPath,uint32 flags) {
5578
BStringList _paths;
56-
staticstatus_t r = self.FindPaths(architecture, baseDirectory, subPath, flags, _paths);
79+
status_t r = self.FindPaths(architecture, baseDirectory, subPath, flags, _paths);
5780
return std::make_tuple(r,_paths);
5881
}
59-
,"",py::arg("architecture"),py::arg("baseDirectory"),py::arg("subPath"),py::arg("flags"))
60-
.def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory,constchar * subPath,uint32 flags) {
82+
, "", py::arg("architecture"), py::arg("baseDirectory"), py::arg("subPath"), py::arg("flags"))*/
83+
.def_static("FindPaths", py::overload_cast<BPathFinder&,constchar*, path_base_directory,constchar*, uint32>(&BPathFinderWrapper::FindPaths),"",py::arg("self"),py::arg("architecture"),py::arg("baseDirectory"),py::arg("subPath"),py::arg("flags"))
84+
/*.def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory,const char * subPath,uint32 flags) {
6185
BStringList _paths;
62-
staticstatus_t r = self.FindPaths(baseDirectory, subPath, flags, _paths);
86+
status_t r = self.FindPaths(baseDirectory, subPath, flags, _paths);
6387
return std::make_tuple(r,_paths);
6488
}
65-
,"",py::arg("baseDirectory"),py::arg("subPath"),py::arg("flags"))
66-
.def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory,constchar * subPath) {
89+
, "", py::arg("baseDirectory"), py::arg("subPath"), py::arg("flags"))*/
90+
.def_static("FindPaths", py::overload_cast<BPathFinder&,path_base_directory,constchar*, uint32>(&BPathFinderWrapper::FindPaths),"",py::arg("self"),py::arg("baseDirectory"),py::arg("subPath"),py::arg("flags"))
91+
/*.def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory,const char * subPath) {
6792
BStringList _paths;
68-
staticstatus_t r = self.FindPaths(baseDirectory, subPath, _paths);
93+
status_t r = self.FindPaths(baseDirectory, subPath, _paths);
6994
return std::make_tuple(r,_paths);
7095
}
71-
,"",py::arg("baseDirectory"),py::arg("subPath"))
72-
.def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory) {
96+
, "", py::arg("baseDirectory"), py::arg("subPath"))*/
97+
.def_static("FindPaths", py::overload_cast<BPathFinder&, path_base_directory,constchar*>(&BPathFinderWrapper::FindPaths),"",py::arg("self"),py::arg("baseDirectory"),py::arg("subPath"))
98+
/*.def("FindPaths", [](BPathFinder& self,path_base_directory baseDirectory) {
7399
BStringList _paths;
74-
staticstatus_t r = self.FindPaths(baseDirectory, _paths);
100+
status_t r = self.FindPaths(baseDirectory, _paths);
75101
return std::make_tuple(r,_paths);
76102
}
77-
,"",py::arg("baseDirectory"))
103+
, "", py::arg("baseDirectory"))*/
104+
.def_static("FindPaths", py::overload_cast<BPathFinder&, path_base_directory>(&BPathFinderWrapper::FindPaths),"",py::arg("self"),py::arg("baseDirectory"))
78105
;
79106

80107

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp