Skip to content

Commit

Permalink
[pybindings] pykmllib fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Arsentiy Milchakov authored and Polas committed Nov 23, 2020
1 parent ab1cb3c commit 25fc47e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kml/pykmlib/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,12 @@ BOOST_PYTHON_MODULE(pykmlib)
.def("set_list", &VectorAdapter<std::string>::Set)
.def("__str__", &VectorAdapter<std::string>::ToString);

class_<std::vector<uint64_t>>("Uint64List")
.def(vector_indexing_suite<std::vector<uint64_t>>())
.def("get_list", &VectorAdapter<uint64_t>::Get)
.def("set_list", &VectorAdapter<uint64_t>::Set)
.def("__str__", &VectorAdapter<uint64_t>::ToString);

class_<std::vector<uint32_t>>("Uint32List")
.def(vector_indexing_suite<std::vector<uint32_t>>())
.def("get_list", &VectorAdapter<uint32_t>::Get)
Expand Down
1 change: 1 addition & 0 deletions kml/pykmlib/bindings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def make_compilation():
bookmark.nearest_toponym = '12345'
bookmark.properties.set_dict({'bm_property1':'value1', 'bm_property2':'value2'})
bookmark.bound_tracks.set_list([0])
bookmark.compilations.set_list([1, 2, 3])

layer1 = pykmlib.TrackLayer()
layer1.line_width = 6.0
Expand Down

0 comments on commit 25fc47e

Please sign in to comment.