Skip to content

Commit

Permalink
Closes 66: Add static "make"-style method called create to Proxy (#67)
Browse files Browse the repository at this point in the history
Closes #66: Add static "make"-style method called "create" to Proxy
Co-authored-by: Kevin Gurney <kgurney@mathworks.com>
  • Loading branch information
sgilmore10 committed Jul 13, 2023
1 parent 3465900 commit d04f88d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libmexclass/matlab/+libmexclass/+proxy/Proxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,17 @@ function delete(obj)
n = listLength(obj.AddedFields,indexOp,indexContext);
end
end

methods(Static, Access = public)
function proxy = create(name, arg)
arguments
name(1, 1) string {mustBeNonmissing}
end
arguments(Repeating)
arg
end
id = libmexclass.proxy.gateway("Create", name, arg);
proxy = libmexclass.proxy.Proxy(Name=name, ID=id);
end
end
end

0 comments on commit d04f88d

Please sign in to comment.