Skip to content

Commit 143c2b5

Browse files
authored
Merge pull request #85 from robotpy/nt-struct-topic-ctor
pyntcore: Add struct topics constructors
2 parents 89cd0e7 + 1d69815 commit 143c2b5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

subprojects/pyntcore/gen/StructArrayTopic.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,14 @@ classes:
114114
NT_Topic, I...:
115115
ignore: true
116116
Topic, I...:
117-
ignore: true
117+
param_override:
118+
info:
119+
name: type
120+
cpp_code: |
121+
[](Topic topic, const py::type &t) {
122+
WPyStructInfo info(t);
123+
return nt::StructArrayTopic<T, I>(topic, info);
124+
}
118125
Subscribe:
119126
overloads:
120127
U&&, const PubSubOptions&:

subprojects/pyntcore/gen/StructTopic.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,14 @@ classes:
104104
NT_Topic, I...:
105105
ignore: true
106106
Topic, I...:
107-
ignore: true
107+
param_override:
108+
info:
109+
name: type
110+
cpp_code: |
111+
[](Topic topic, const py::type &t) {
112+
WPyStructInfo info(t);
113+
return nt::StructTopic<T, I>(topic, info);
114+
}
108115
Subscribe:
109116
Publish:
110117
PublishEx:

0 commit comments

Comments
 (0)