Skip to content

Commit 125d268

Browse files
committed
migrateToGlue: refactor Feature entity
1 parent 365d9b6 commit 125d268

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

nix_mx.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ const std::vector<fendpoint> funcs = {
9898
// Feature
9999
{ "Feature::describe", nixfeature::describe },
100100
{ "Feature::linkType", nixfeature::link_type },
101-
{ "Feature::openData", nixfeature::open_data },
102101

103102
// Section
104103
{ "Section::describe", nixsection::describe },
@@ -208,6 +207,9 @@ void mexFunction(int nlhs,
208207
.reg("link", GETCONTENT(nix::Section, nix::Section, link))
209208
.reg("parent", GETCONTENT(nix::Section, nix::Section, parent));
210209

210+
classdef<nix::Feature>("Feature", methods)
211+
.reg("openData", GETCONTENT(nix::DataArray, nix::Feature, data));
212+
211213
mexAtExit(on_exit);
212214
});
213215

src/nixfeature.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ namespace nixfeature {
1919
output.set(0, sb.array());
2020
}
2121

22-
void open_data(const extractor &input, infusor &output)
23-
{
24-
nix::Feature currFeat = input.entity < nix::Feature >(1);
25-
output.set(0, nixgen::open_data_array(currFeat.data()));
26-
}
27-
2822
void link_type(const extractor &input, infusor &output)
2923
{
3024
nix::Feature currFeat = input.entity<nix::Feature>(1);

src/nixfeature.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ namespace nixfeature {
77

88
void describe(const extractor &input, infusor &output);
99

10-
void open_data(const extractor &input, infusor &output);
11-
1210
void link_type(const extractor &input, infusor &output);
1311

1412
} // namespace nixfeature

0 commit comments

Comments
 (0)