Mercurial > repos > public > sbplib
diff +multiblock/InterfaceOptions.m @ 911:f7306f03f77a feature/utux2D
Improve comments and names. Change InterfaceOptions.union to merge.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Sat, 24 Nov 2018 15:43:34 -0800 |
parents | ab1759166a8c |
children |
line wrap: on
line diff
--- a/+multiblock/InterfaceOptions.m Fri Nov 23 20:39:40 2018 -0800 +++ b/+multiblock/InterfaceOptions.m Sat Nov 24 15:43:34 2018 -0800 @@ -54,7 +54,7 @@ % % optStr -- string % val -- anything - % i,j -- integers + % i,j -- integers (or empty) function setOption(obj, optStr, val, i ,j) default_arg('i',[]); default_arg('j',[]); @@ -93,10 +93,12 @@ end - % Constructs the union of two InterfaceOptions - function union(obj, obj2) - localOpts = obj.optsCell; - remoteOpts = obj2.optsCell; + % Merges with another InterfaceOptions-object. + % Errors if there are merge conflicts. + % TODO: merge with preference? + function merge(obj, obj2) + localOpts = obj.getOptions(); + remoteOpts = obj2.getOptions(); assert( numel(localOpts) == numel(remoteOpts), ... 'multiblock.InterfaceOptions: The two InterfaceOptions do not have the same dimension.');