@@ -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)
@@ -189,9 +189,12 @@ void mexFunction(int nlhs,
189
189
.reg (" hasSection" , GETBYSTR (bool , nix::Section, hasSection))
190
190
.reg (" link" , GETCONTENT (nix::Section, nix::Section, link))
191
191
.reg (" parent" , GETCONTENT (nix::Section, nix::Section, parent))
192
+ .reg (" set_repository" , SETTER (const std::string&, nix::Section, repository))
193
+ .reg (" set_none_repository" , SETTER (const boost::none_t , nix::Section, repository))
194
+ .reg (" set_mapping" , SETTER (const std::string&, nix::Section, mapping))
195
+ .reg (" set_none_mapping" , SETTER (const boost::none_t , nix::Section, mapping))
192
196
.reg (" createSection" , &nix::Section::createSection)
193
197
.reg (" deleteSection" , REMOVER (nix::Section, nix::Section, deleteSection));
194
- // .reg("set_repository", SETTER(const std::string&, nix::Section, repository));
195
198
methods->add (" Section::properties" , nixsection::properties);
196
199
197
200
classdef<nix::Feature>(" Feature" , methods)
0 commit comments