summaryrefslogtreecommitdiff
path: root/matlab/lib/+Ice/protocolVersionToString.m
blob: fc69f142b1fd436812fffdf2ff7962f0924bf469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function r = protocolVersionToString(v)
    % protocolVersionToString  Converts a protocol version to a string.
    %
    % Parameters:
    %   v (Ice.ProtocolVersion) - The protocol version to convert.
    %
    % Returns (char) - The protocol version as a string.

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

    if ~isa(v, 'Ice.ProtocolVersion')
        throw(MException('Ice:ArgumentException', 'expecting an Ice.ProtocolVersion'));
    end
    r = sprintf('%d.%d', v.major, v.minor);
end