summaryrefslogtreecommitdiff
path: root/matlab/lib/+Ice/InterfaceByValue.m
blob: 0d6c25bae33b2b5439f80a547512d22afa1f5c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
classdef InterfaceByValue < Ice.Value
    % InterfaceByValue   Summary of InterfaceByValue
    %
    % Base class for interoperating with existing applications that pass
    % interfaces by value. The constructor expects the Slice type ID of
    % the interface.

    % Copyright (c) ZeroC, Inc. All rights reserved.

    methods
        function obj = InterfaceByValue(id)
            obj.id = id;
        end
        function id = ice_id(obj)
            id = obj.id;
        end
    end
    methods(Access=protected)
        function iceWriteImpl(obj, os)
            os.startSlice(obj.id, -1, true);
            os.endSlice();
        end
        function iceReadImpl(~, is)
            is.startSlice();
            is.endSlice();
        end
    end
    properties(Access=private)
        id
    end
end