@@ -55,7 +55,7 @@ static void on_exit() {
55
55
}
56
56
57
57
#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)
58
+ #define SETTER (type, class, name ) static_cast <void (class ::*)(type)>(&class ::name)
59
59
#define GETBYSTR (type, class, name ) static_cast <type(class ::*)(const std::string &)const >(&class ::name)
60
60
#define GETCONTENT (type, class, name ) static_cast <type(class ::*)()const >(&class ::name)
61
61
#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)
@@ -184,8 +184,11 @@ void mexFunction(int nlhs,
184
184
.reg (" hasProperty" , GETBYSTR (bool , nix::Section, hasProperty))
185
185
.reg (" hasSection" , GETBYSTR (bool , nix::Section, hasSection))
186
186
.reg (" link" , GETCONTENT (nix::Section, nix::Section, link))
187
- .reg (" parent" , GETCONTENT (nix::Section, nix::Section, parent));
188
- // .reg("set_repository", SETTER(const std::string&, nix::Section, repository));
187
+ .reg (" parent" , GETCONTENT (nix::Section, nix::Section, parent))
188
+ .reg (" set_repository" , SETTER (const std::string&, nix::Section, repository))
189
+ .reg (" set_none_repository" , SETTER (const boost::none_t , nix::Section, repository))
190
+ .reg (" set_mapping" , SETTER (const std::string&, nix::Section, mapping))
191
+ .reg (" set_none_mapping" , SETTER (const boost::none_t , nix::Section, mapping));
189
192
methods->add (" Section::properties" , nixsection::properties);
190
193
191
194
classdef<nix::Feature>(" Feature" , methods)
0 commit comments