classdef BaseRegionOwnerAccessor < rtw.pil.OwnerAccessor
%BASEREGIONOWNERACCESSOR provides access to the *Owner property 
%TargetRegions that expose the property via their BaseRegion
%
%   This is an undocumented class. Its methods and properties are likely to
%   change without warning from one release to the next.

%   Copyright 2020 The MathWorks, Inc.
    
    methods(Access = {?rtw.pil.OwnerAccessor})
        function this = BaseRegionOwnerAccessor(implementation)
            this.TargetRegion = implementation.BaseRegion;
            while isprop(this.TargetRegion, 'BaseRegion')
                this.TargetRegion = this.TargetRegion.BaseRegion;
            end
        end
    end
    
end
