Skip to content

Commit 1ebb48b

Browse files
committed
added SETTER + removed unused line from nix_mx
1 parent f9c2e2c commit 1ebb48b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nix_mx.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ static void on_exit() {
5555
}
5656

5757
#define GETTER(type, class, name) static_cast<type(class::*)()const>(&class::name)
58+
#define SETTER(type, class, name) static_cast<void(class::*)(type)>(&class::name)
5859
#define GETBYSTR(type, class, name) static_cast<type(class::*)(const std::string &)const>(&class::name)
5960
#define GETCONTENT(type, class, name) static_cast<type(class::*)()const>(&class::name)
6061
#define GETSOURCES(base__) static_cast<std::vector<nix::Source>(nix::base::EntityWithSources<nix::base::base__>::*)(std::function<bool(const nix::Source &)>)const>(&nix::base::EntityWithSources<nix::base::base__>::sources)
@@ -104,7 +105,6 @@ void mexFunction(int nlhs,
104105
.reg("dataArrays", &nix::Block::dataArrays)
105106
.reg("createSource", &nix::Block::createSource)
106107
.reg("deleteSource", REMOVER(nix::Source, nix::Block, deleteSource))
107-
//.reg("createDataArray", static_cast<nix::DataArray(nix::Block::*)(const std::string &, const std::string &, nix::DataType, const nix::NDSize &)>(&nix::Block::createDataArray))
108108
.reg("createTag", &nix::Block::createTag)
109109
.reg("createMultiTag", &nix::Block::createMultiTag)
110110
.reg("sources", &nix::Block::sources)
@@ -173,6 +173,7 @@ void mexFunction(int nlhs,
173173
.reg("hasSection", GETBYSTR(bool, nix::Section, hasSection))
174174
.reg("link", GETCONTENT(nix::Section, nix::Section, link))
175175
.reg("parent", GETCONTENT(nix::Section, nix::Section, parent));
176+
//.reg("set_repository", SETTER(const std::string&, nix::Section, repository));
176177
methods->add("Section::properties", nixsection::properties);
177178

178179
classdef<nix::Feature>("Feature", methods)

0 commit comments

Comments
 (0)