2%> This is the base
class for generating
3%> subclass of MATLAB ``handle`` superclass whose annoying
4%> methods are forcefully hidden from the user view.<br>
9%>
Handle = pm.matlab.Handle()
14%> \include{lineno} example/matlab/
Handle/main.m
16%> \include{lineno} example/matlab/
Handle/main.out.m
21%> \JoshuaOsborne, May 21 2024, 11:31 PM, University of Texas at Arlington<br>
22%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
23%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28 methods(Access =
public)
30 %> Open the documentation of the
class
31 %> of the parent
object on MATLAB display.
34 %> This is a dynamic method of the
class [pm.matlab.Handle](@ref
Handle).
36 %> \param[inout] self : The **implicitly-passed** input argument representing the parent
object of the method.<br>
41 %> h = pm.matlab.Handle();
49 %> \JoshuaOsborne, May 21 2024, 11:34 PM, University of Texas at Arlington<br>
50 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
51 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 methods(Access =
public)
61 %> Print help about the
class of
62 %> the parent
object on MATLAB display.
65 %> This is a dynamic method of the
class [pm.matlab.Handle](@ref
Handle).
77 %> \JoshuaOsborne, May 21 2024, 11:36 PM, University of Texas at Arlington<br>
78 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
79 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
85 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 methods(Access =
public, Hidden)
89 hashlen = length(hash);
90 selfProp = string(properties(self));
91 selfPropLen = length(selfProp);
95 for i = 1 : 2 : hashlen % walk through input key val.
96 propertyDoesNotExist =
true;
97 hashItemString = string(hash{i});
98 for ip = 1 : selfPropLen % walk through
object prop val.
99 if strcmpi(hashItemString, selfProp(ip))
100 propertyDoesNotExist =
false;
101 if i < hashlen %
this must be here. checks
for the correct pairing of key, val.
102 if isa(hash{i + 1},
"cell") && (isstruct(self.(selfProp(ip))) || isa(self.(selfProp(ip)),
"handle") || ~isempty(properties(self.(selfProp(ip)))))
103 self.(selfProp(ip)) = pm.matlab.hashmap.hash2comp(hash{i + 1}, self.(selfProp(ip)), insensitive, extensible, recursive);
105 self.(selfProp(ip)) = hash{i + 1};
108 error(
"The corresponding value for the property """ +
string(selfProp(ip)) +
""" is missing as input argument.");
113 if propertyDoesNotExist
116 error(
"The requested object property displayed above does not exist:");
122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
124 methods(Access =
public, Hidden)
125 function setKeyVal(self, field, subfield, key, val)
127 if ~(isfield(self, field) || isprop(self, field)) || isempty(self.(field))
128 self.(field) = subfield;
131 if ~(isfield(self.(field), subfield) || isprop(self.(field), subfield)) || isempty(self.(field).(subfield))
132 self.(field).(subfield) = key;
135 if ~(isfield(self.(field).(subfield), key) || isprop(self.(field).(subfield), key)) || isempty(self.(field).(subfield).(key))
136 self.(field).(subfield).(key) = val;
142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144 methods(Access = public, Hidden)
145 function newprop(self, prop, val)
146 if ~any(strcmp(properties(self), prop))
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159 methods(Access = public, Hidden)
160 function lh = addlistener(varargin)
161 lh = addlistener@handle(varargin{:});
163 function lh = listener(varargin)
164 lh = listener@handle(varargin{:});
166 function notify(varargin)
167 notify@handle(varargin{:});
169 function
delete(varargin)
170 delete@handle(varargin{:});
172 function Hmatch = findobj(varargin)
173 Hmatch = findobj@handle(varargin{:});
175 function p = findprop(varargin)
176 p = findprop@handle(varargin{:});
178 function TF = eq(varargin)
179 TF = eq@handle(varargin{:});
181 function TF = ne(varargin)
182 TF = ne@handle(varargin{:});
184 function TF = lt(varargin)
185 TF = lt@handle(varargin{:});
187 function TF = le(varargin)
188 TF = le@handle(varargin{:});
190 function TF = gt(varargin)
191 TF = gt@handle(varargin{:});
193 function TF = ge(varargin)
194 TF = ge@handle(varargin{:});
196 %function TF = isvalid(varargin)
197 % TF = isvalid@handle(varargin{:});
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This is the base class for generating subclass of MATLAB handle superclass whose annoying methods are...
function newprop(in self, in prop, in val)
function doc(in self)
Open the documentation of the class of the parent object on MATLAB display.
function help(in self)
Print help about the class of the parent object on MATLAB display.
function hash2comp(in self, in hash)
function setKeyVal(in self, in field, in subfield, in key, in val)
function hash2comp(in hashmap, in object, in insensitive, in extensible, in recursive)
Return a copy of the input object whose property (or field) values are overwritten with the correspon...