classdef (Hidden = true) FIAdaptor < rtw.connectivity.BaseAdaptor
% FIAdaptor - Adaptor class from coder.descriptor.CodeDescObj to
% RTW.CodeDescObj
%
%   This is an undocumented class. Its methods and properties are likely to
%   change without warning from one release to the next.

%   Copyright 2018-2019 The MathWorks, Inc.
    
    properties
        Prototype;
        ActualReturn;
        VariantInfo;
        Timing;
        ActualArgs;
        DirectReads;
        DirectWrites;
        FunctionOwner;
    end
    
    methods
        
        function res = get.Prototype(this)
            res = this.CodeDescObj.Prototype;
        end
        
        function res = get.ActualReturn(this)
            res = this.CodeDescObj.ActualReturn;
        end
        
        function res = get.VariantInfo(this)
            res = this.CodeDescObj.VariantInfo;
        end
        
        function res = get.Timing(this)
            res = this.CodeDescObj.Timing;
        end
        
        function res = get.FunctionOwner(this)
            res = this.CodeDescObj.FunctionOwner;
        end
        
        % getter for the Sequence of ActualArgs
        function res = get.ActualArgs(this)
            res = this.CodeDescObj.ActualArgs.toArray;
            
        end
        % getter for the Sequence of DirectReads
        function res = get.DirectReads(this)
            res = this.CodeDescObj.DirectReads.toArray;
            
        end
        % getter for the Sequence of DirectWrites
        function res = get.DirectWrites(this)
            res = this.CodeDescObj.DirectWrites.toArray;
            
        end
        
        
        
    end
    
    methods(Access = public)
        function this = FIAdaptor(aFunctionInterface)
            
            assert(isa(aFunctionInterface, 'coder.descriptor.FunctionInterface'), ...
               'Unexpected class in FIAdaptor');
            if isempty(aFunctionInterface)
                this = rtw.connectivity.FIAdaptor.empty;
            else
                this.CodeDescObj = aFunctionInterface;
            end
        end
        
        function functionCall = getFunctionCall(this)
            functionCall = this.CodeDescObj.getFunctionCall;
        end
        
    end    
end
