Skip to content

Commit fabdf67

Browse files
authored
[bindings] Remove expose-stage-data.cpp (#299)
+ didn't help much with compile times
1 parent 8e0d285 commit fabdf67

File tree

2 files changed

+14
-27
lines changed

2 files changed

+14
-27
lines changed

bindings/python/src/expose-stage-data.cpp

Lines changed: 0 additions & 25 deletions
This file was deleted.

bindings/python/src/expose-stage.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,20 @@ namespace python {
1414
using proxsuite::nlp::python::PolymorphicVisitor;
1515
using proxsuite::nlp::python::register_polymorphic_to_python;
1616

17-
// fwd
18-
void exposeStageData();
17+
void exposeStageData() {
18+
using context::StageData;
19+
using context::StageModel;
20+
21+
bp::register_ptr_to_python<shared_ptr<StageData>>();
22+
StdVectorPythonVisitor<std::vector<shared_ptr<StageData>>, true>::expose(
23+
"StdVec_StageData");
24+
25+
bp::class_<StageData>("StageData", "Data struct for StageModel objects.",
26+
bp::init<const StageModel &>())
27+
.def_readonly("cost_data", &StageData::cost_data)
28+
.def_readwrite("dynamics_data", &StageData::dynamics_data)
29+
.def_readwrite("constraint_data", &StageData::constraint_data);
30+
}
1931

2032
void exposeStage() {
2133
using context::ConstraintSet;

0 commit comments

Comments
 (0)