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).
39 %> h = pm.matlab.Handle();
47 %> \JoshuaOsborne, May 21 2024, 11:34 PM, University of Texas at Arlington<br>
48 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
49 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 methods(Access =
public)
59 %> Print help about the
class of
60 %> the parent
object on MATLAB display.
63 %> This is a dynamic method of the
class [pm.matlab.Handle](@ref
Handle).
75 %> \JoshuaOsborne, May 21 2024, 11:36 PM, University of Texas at Arlington<br>
76 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
77 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
85 methods(Access =
public, Hidden)
87 hashlen = length(hash);
88 selfProp = string(properties(self));
89 selfPropLen = length(selfProp);
93 for i = 1 : 2 : hashlen % walk through input key val.
94 propertyDoesNotExist =
true;
95 hashItemString = string(hash{i});
96 for ip = 1 : selfPropLen % walk through
object prop val.
97 if strcmpi(hashItemString, selfProp(ip))
98 propertyDoesNotExist =
false;
99 if i < hashlen %
this must be here. checks
for the correct pairing of key, val.
100 if isa(hash{i + 1},
"cell") && (isstruct(self.(selfProp(ip))) || isa(self.(selfProp(ip)),
"handle") || ~isempty(properties(self.(selfProp(ip)))))
101 self.(selfProp(ip)) = pm.matlab.hashmap.hash2comp(hash{i + 1}, self.(selfProp(ip)), insensitive, extensible, recursive);
103 self.(selfProp(ip)) = hash{i + 1};
106 error(
"The corresponding value for the property """ +
string(selfProp(ip)) +
""" is missing as input argument.");
111 if propertyDoesNotExist
114 error(
"The requested object property displayed above does not exist:");
120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
122 methods(Access =
public, Hidden)
123 function setKeyVal(self, field, key, val)
125 if isempty(self.(field))
129 if ~isfield(self.(field), key) || isempty(self.(field).(key))
130 self.(field).(key) = val;
136 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138 methods(Access = public, Hidden)
139 function newprop(self, prop, val)
140 if ~any(strcmp(properties(self), prop))
149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153 methods(Access = public, Hidden)
154 function lh = addlistener(varargin)
155 lh = addlistener@handle(varargin{:});
157 function lh = listener(varargin)
158 lh = listener@handle(varargin{:});
160 function notify(varargin)
161 notify@handle(varargin{:});
163 function
delete(varargin)
164 delete@handle(varargin{:});
166 function Hmatch = findobj(varargin)
167 Hmatch = findobj@handle(varargin{:});
169 function p = findprop(varargin)
170 p = findprop@handle(varargin{:});
172 function TF = eq(varargin)
173 TF = eq@handle(varargin{:});
175 function TF = ne(varargin)
176 TF = ne@handle(varargin{:});
178 function TF = lt(varargin)
179 TF = lt@handle(varargin{:});
181 function TF = le(varargin)
182 TF = le@handle(varargin{:});
184 function TF = gt(varargin)
185 TF = gt@handle(varargin{:});
187 function TF = ge(varargin)
188 TF = ge@handle(varargin{:});
190 %function TF = isvalid(varargin)
191 % TF = isvalid@handle(varargin{:});
197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 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...