function flag = issigned(xfi)
% MATLAB Code Generation Library function for @fi/issigned.
%
% ISSIGNED(A) will return true if A is signed, false  if unsigned.

% $INCLUDE(DOC) toolbox/eml/lib/fixedpoint/issigned.m $
% Copyright 2002-2014 The MathWorks, Inc.
%#codegen
% $Revision $  

eml_allow_mx_inputs;

% Check for nargin and assert if not 1
eml_invariant(nargin == 1, 'fixed:coder:incorrectNumberOfInputs');

if eml_ambiguous_types
    flag = 1;
    return;
end

eml_invariant(isfi(xfi), 'fixed:coder:functionNotDefinedFor1stArgType', 'issigned', class(xfi));
    
Tx = eml_typeof(xfi);
flag = coder.const(get(Tx,'Signed'));

%----------------------------------------------------
