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

Commit267e21f

Browse files
committed
add Job.cpp
1 parentc07422d commit267e21f

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

‎Jamfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ local sourceFiles =
221221
Url.cpp
222222
UTF8.cpp
223223
TLS.cpp
224+
Job.cpp
224225

225226
#Kernel
226227
fs_attr.cpp

‎bindings/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
from .Urlimport*
112112
from .UTF8import*
113113
from .TLSimport*
114+
from .Jobimport*
114115

115116
from .fs_attrimport*
116117
from .OSimport*

‎bindings/support/Job.cpp‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@
88
namespacepy= pybind11;
99
usingnamespaceBSupportKit;
1010

11-
voiddefine_Job(py::module_& m)
11+
classPyBJob :publicBJob{
12+
public:
13+
using BJob::BJob;
14+
status_tRun()override {
15+
PYBIND11_OVERLOAD(status_t, BJob, Run);
16+
}
17+
status_tExecute()override {
18+
PYBIND11_OVERLOAD_PURE(status_t, BJob, Execute);
19+
}
20+
};
21+
22+
23+
PYBIND11_MODULE(Job, m)
1224
{
1325
py::enum_<BJobState>(m,"BJobState","")
1426
.value("B_JOB_STATE_WAITING_TO_RUN", BJobState::B_JOB_STATE_WAITING_TO_RUN,"")
@@ -27,7 +39,7 @@ py::class_<BJobStateListener>(m, "BJobStateListener")
2739
.def("JobAborted", &BJobStateListener::JobAborted,"",py::arg("job"))
2840
;
2941

30-
py::class_<BJob>(m,"BJob")
42+
py::class_<BJob,PyBJob>(m,"BJob")
3143
.def(py::init<const BString &>(),"",py::arg("title"))
3244
.def("InitCheck", &BJob::InitCheck,"")
3345
.def("Run", &BJob::Run,"")
@@ -43,7 +55,7 @@ py::class_<BJob>(m, "BJob")
4355
.def("RemoveDependency", &BJob::RemoveDependency,"",py::arg("job"))
4456
.def("CountDependencies", &BJob::CountDependencies,"")
4557
.def("DependantJobAt", &BJob::DependantJobAt,"",py::arg("index"))
46-
.def_readwrite("Private", &BJob::Private,"")
58+
//.def_readwrite("Private", &BJob::Private, "")
4759
;
4860

4961

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp