function h = dffir(varargin)
%DFFIR  Constructor for the direct-form FIR filter object.
%   F = DFFIR(B) creates a direct-form FIR (DFFIR) filter object
%   F with coefficients specified in vector B. The direct-form
%   FIR filter structure is also knows as a tapped delay line
%   or a transversal filter.
%
%   F = DFFIR(B1,B2,...) creates a DFFIR object F of cascaded
%   direct-form FIR sections. The coefficients of the i-th
%   section are given in vector Bi.
%
%   DFFIR({{B1},{B2},...}) is equivalent to DFFIR(B1,B2,...).
%
%   F = DFFIR(...,C) creates a DFFIR object F of direct-form sections
%   connected as indicated in C.  C can be either 'cas'
%   (default) for cascaded connections or 'par' for parallel
%   connections.
%
%   See also DFTFIR, DF1, DF2, DF1T, DF2T, LATCMA, LATCMAX.

%   Author(s): R. Losada
%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.5 $  $Date: 2000/06/13 21:20:41 $ 

[coeffs,connection,msg] = dfiltparse('dffir',varargin{:});

% If msg returns with a 'conversion' string, the constructor is used as a converter
if strcmpi(msg,'conversion'),
    h = coeffs;
    return
end

error(msg);

h.version = 1;

h = class(h,'dffir',fir(coeffs,connection));
    
