|
44 | 44 | %
|
45 | 45 | % DOCS = RUN(NDI_CALCULATOR_OBJ, DOCEXISTSACTION, PARAMETERS)
|
46 | 46 | %
|
47 |
| - % |
48 | 47 | % DOCEXISTSACTION can be 'Error', 'NoAction', 'Replace', or 'ReplaceIfDifferent'
|
49 | 48 | % For calculators, 'ReplaceIfDifferent' is equivalent to 'NoAction' because
|
50 | 49 | % the input parameters define the calculator.
|
51 | 50 | %
|
52 |
| - % Step 1: set up input parameters; they can either be completely specified by |
53 |
| - % the caller, or defaults can be used |
| 51 | + % This function is primarily intended to be called by external programs and users. |
| 52 | + % |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + % Step 1: set up input parameters; they can either be completely specified by |
| 57 | + % the caller, or defaults can be used |
54 | 58 |
|
55 | 59 | docs = {};
|
56 | 60 | docs_tocat = {};
|
|
116 | 120 | %
|
117 | 121 | % Returns a list of the default search parameters for finding appropriate inputs
|
118 | 122 | % to the calculator.
|
| 123 | + % |
| 124 | + % This function is primarily intended as an internal function but is left exposed |
| 125 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 126 | + % not call this function. |
119 | 127 | %
|
120 | 128 | parameters.input_parameters = [];
|
121 | 129 | parameters.depends_on = vlt.data.emptystruct('name','value');
|
|
130 | 138 | % used as inputs to the calculator. PARAMETERS is a cell array of parameter
|
131 | 139 | % structures with fields 'input_parameters' and 'depends_on'.
|
132 | 140 | %
|
| 141 | + % This function is primarily intended as an internal function but is left exposed |
| 142 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 143 | + % not call this function. |
| 144 | + % |
133 | 145 | % PARAMETERS_SPECIFICATION is a structure with the following fields:
|
134 | 146 | % |----------------------------------------------------------------------|
|
135 | 147 | % | input_parameters | A structure of fixed input parameters needed |
|
|
225 | 237 | % If it finds any, it creates a query indicating that the 'depends_on' field
|
226 | 238 | % must match the specified name and value.
|
227 | 239 | %
|
| 240 | + % This function is primarily intended as an internal function but is left exposed |
| 241 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 242 | + % not call this function. |
| 243 | + % |
228 | 244 | query = vlt.data.emptystruct('name','query');
|
229 | 245 | if isfield(parameters_specification.input_parameters,'depends_on')
|
230 | 246 | for i=1:numel(parameters_specification.input_parameters.depends_on),
|
|
260 | 276 | % |------------------------|----------------------------------|
|
261 | 277 | %
|
262 | 278 | % in the abstract class, this returns empty
|
| 279 | + % |
| 280 | + % This function is primarily intended as an internal function but is left exposed |
| 281 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 282 | + % not call this function. |
| 283 | + % |
263 | 284 | myemptydoc = ndi.document(ndi_calculator_obj.doc_document_types{1});
|
264 | 285 | property_list_name = myemptydoc.document_properties.document_class.property_list_name;
|
265 | 286 | % class_name = myemptydoc.document_properties.document_class.class_name
|
|
306 | 327 | % It is necessary to "columnize" the substructures because Matlab does not not necessarily preserve that
|
307 | 328 | % orientation when data is written to or read from JSON.
|
308 | 329 | %
|
| 330 | + % This function is primarily intended as an internal function but is left exposed |
| 331 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 332 | + % not call this function. |
| 333 | + % |
309 | 334 | if ~isempty(input_parameters1),
|
310 | 335 | input_parameters1 = vlt.data.columnize_struct(input_parameters1);
|
311 | 336 | end;
|
|
328 | 353 | % can be overridden if additional criteria beyond an ndi.query are needed to
|
329 | 354 | % assess if a document is an appropriate input for the calculator.
|
330 | 355 | %
|
| 356 | + % This function is primarily intended as an internal function but is left exposed |
| 357 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 358 | + % not call this function. |
| 359 | + % |
331 | 360 | b = 1; % base class behavior
|
332 | 361 | end; % is_valid_dependency_input()
|
333 | 362 |
|
|
338 | 367 | %
|
339 | 368 | % Perform the calculator and return an ndi.document with the answer.
|
340 | 369 | %
|
| 370 | + % This function is primarily intended as an internal function but is left exposed |
| 371 | + % (not private) so that it can be used for debugging. But in general, user code should |
| 372 | + % not call this function. |
| 373 | + % |
341 | 374 | % In the base class, this always returns empty.
|
342 | 375 | doc = {};
|
| 376 | + |
343 | 377 | end; % calculate()
|
344 | 378 |
|
345 | 379 | function h=plot(ndi_calculator_obj, doc_or_parameters, varargin)
|
|
351 | 385 | % the calculator has been performed in a manner that makes sense with
|
352 | 386 | % its input data. Useful for debugging / validating a calculator.
|
353 | 387 | %
|
| 388 | + % This function is intended to be called by external users and code. |
| 389 | + % |
354 | 390 | % Handles to the figure, the axes, and any objects created are returned in H.
|
355 | 391 | %
|
356 | 392 | % By default, this plot is made in the current axes.
|
|
414 | 450 | % Returns the help information for the document type for an NDI
|
415 | 451 | % calculator object.
|
416 | 452 | %
|
| 453 | + % This function is intended to be called by external users or code. |
| 454 | + % |
417 | 455 | text = ndi.calculator.docfiletext(class(ndi_calculator_obj), 'output');
|
418 | 456 | end; %doc_about()
|
419 | 457 |
|
|
425 | 463 | % Returns the help information for the document type for an NDI
|
426 | 464 | % calculator object.
|
427 | 465 | %
|
| 466 | + % This function is intended to be called by external users or code. |
| 467 | + % |
428 | 468 | text = ndi_calculator_obj.doc_about();
|
429 | 469 | end; % appdoc_description()
|
430 | 470 |
|
|
456 | 496 | % | suppress_title (0) | 0/1 Should we suppress the title? |
|
457 | 497 | % |---------------------------|--------------------------------------|
|
458 | 498 | %
|
| 499 | + |
459 | 500 | newfigure = 0;
|
460 | 501 | holdstate = 0;
|
461 | 502 | suppress_x_label = 0;
|
|
0 commit comments