%TallInternalProperties
% Internal properties of tall.
%
% Holding these properties here instead of tall directly is slight more
% performant with respect to cycle detection.

%   Copyright 2018 The MathWorks, Inc.

classdef (Abstract, AllowedSubclasses={?tall}) TallInternalProperties
    properties (GetAccess = protected, SetAccess = immutable)
        ValueImpl;
    end
    
    properties (Access = protected)
        Adaptor;
    end
    
    methods
        function obj = TallInternalProperties(valueImpl, adaptor)
            obj.ValueImpl = valueImpl;
            obj.Adaptor = adaptor;
        end
        
        function obj = set.Adaptor(obj, adaptor)
            obj.Adaptor = adaptor;
            hSetMetadata(obj.ValueImpl, buildMetadata(adaptor)); %#ok<MCSUP>
        end
    end
end
