diff options
Diffstat (limited to 'matlab/lib/+Ice')
-rw-r--r-- | matlab/lib/+Ice/Communicator.m | 10 | ||||
-rwxr-xr-x | matlab/lib/+Ice/Connection.m | 13 | ||||
-rw-r--r-- | matlab/lib/+Ice/ObjectPrx.m | 4 |
3 files changed, 21 insertions, 6 deletions
diff --git a/matlab/lib/+Ice/Communicator.m b/matlab/lib/+Ice/Communicator.m index 0b81eba4026..c79c70cb7a0 100644 --- a/matlab/lib/+Ice/Communicator.m +++ b/matlab/lib/+Ice/Communicator.m @@ -78,9 +78,12 @@ classdef Communicator < IceInternal.WrapperObject r = obj.callWithResult_('identityToString', id); end function r = getProperties(obj) - impl = libpointer('voidPtr'); - obj.call_('getProperties', impl); - r = Ice.Properties(impl); + if isempty(obj.properties_) + impl = libpointer('voidPtr'); + obj.call_('getProperties', impl); + obj.properties_ = Ice.Properties(impl); + end + r = obj.properties_; end function r = getLogger(obj) if isempty(obj.logger) @@ -164,5 +167,6 @@ classdef Communicator < IceInternal.WrapperObject classResolver encoding logger + properties_ end end diff --git a/matlab/lib/+Ice/Connection.m b/matlab/lib/+Ice/Connection.m index efdd01700fa..7d747d9a2fa 100755 --- a/matlab/lib/+Ice/Connection.m +++ b/matlab/lib/+Ice/Connection.m @@ -21,6 +21,19 @@ classdef Connection < IceInternal.WrapperObject obj = obj@IceInternal.WrapperObject(impl);
obj.communicator = communicator;
end
+ function r = eq(obj, other)
+ %
+ % Override == operator.
+ %
+ if isempty(other) || ~isa(other, 'Ice.Connection')
+ r = false;
+ else
+ %
+ % Call into C++ to compare the two objects.
+ %
+ r = obj.callWithResult_('equals', other.impl_);
+ end
+ end
function close(obj, mode)
obj.call_('close', mode);
end
diff --git a/matlab/lib/+Ice/ObjectPrx.m b/matlab/lib/+Ice/ObjectPrx.m index 668558cde56..fa41016b7e5 100644 --- a/matlab/lib/+Ice/ObjectPrx.m +++ b/matlab/lib/+Ice/ObjectPrx.m @@ -48,9 +48,7 @@ classdef ObjectPrx < IceInternal.WrapperObject % obj.instantiate_(); other.instantiate_(); - v = libpointer('uint8Ptr', 0); - obj.call_('equals', other.impl_, v); - r = v.Value == 1; + r = obj.callWithResult_('equals', other.impl_); end end |