From 486b0f3d4bfa6a51fbc0dc5e0e487c28d33685a5 Mon Sep 17 00:00:00 2001 From: Alex Buts Date: Tue, 26 Oct 2021 08:47:25 +0100 Subject: [PATCH] Re #356 more consistent comments, removing redundant comments --- .../instrument/@IX_experiment/IX_experiment.m | 6 ------ .../instrument/instruments/@IX_inst/IX_inst.m | 16 ++++++++-------- .../classes/@serializable/serializable.m | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/herbert_core/classes/instrument_classes/instrument/@IX_experiment/IX_experiment.m b/herbert_core/classes/instrument_classes/instrument/@IX_experiment/IX_experiment.m index e7722ef05..53a01308d 100644 --- a/herbert_core/classes/instrument_classes/instrument/@IX_experiment/IX_experiment.m +++ b/herbert_core/classes/instrument_classes/instrument/@IX_experiment/IX_experiment.m @@ -42,12 +42,6 @@ obj.ulen = ulen; obj.ulabel = ulabel; end - - function outputArg = method1(obj,inputArg) - %METHOD1 Summary of this method goes here - % Detailed explanation goes here - outputArg = obj.Property1 + inputArg; - end end end diff --git a/herbert_core/classes/instrument_classes/instrument/instruments/@IX_inst/IX_inst.m b/herbert_core/classes/instrument_classes/instrument/instruments/@IX_inst/IX_inst.m index dedecdbaf..b660d1c49 100644 --- a/herbert_core/classes/instrument_classes/instrument/instruments/@IX_inst/IX_inst.m +++ b/herbert_core/classes/instrument_classes/instrument/instruments/@IX_inst/IX_inst.m @@ -1,6 +1,6 @@ classdef IX_inst < matlab.mixin.Heterogeneous % Defines the base instrument class. This superclass must be - % inherited by all instrumnet classes to unsure that they are + % inherited by all instrument classes to unsure that they are % discoverable as instruments using isa(my_obj,'IX_inst') properties (Access=protected) @@ -10,8 +10,8 @@ end properties (Dependent) - name = ''; % Name of instrument (e.g. 'LET') - source = IX_source; % Source (name, or class of type IX_source) + name ; % Name of instrument (e.g. 'LET') + source; % Source (name, or class of type IX_source) end methods @@ -157,7 +157,7 @@ % % Use structArrIndep to convert an object array to a structure array % - % Has the same behaviour as the Matlab instrinsic struct in that: + % Has the same behaviour as the Matlab intrinsic struct in that: % - Any structure array is returned unchanged % - If an object is empty, an empty structure is returned with fieldnames % but the same size as the object @@ -188,14 +188,14 @@ % Use structIndep for behaviour that more closely matches the Matlab % intrinsic function struct. % - % Has the same behaviour as the Matlab instrinsic struct in that: + % Has the same behaviour as the Matlab intrinsic struct in that: % - Any structure array is returned unchanged % - If an object is empty, an empty structure is returned with fieldnames % but the same size as the object % % However, differs in the behaviour if an object array: % - If the object is non-empty array, returns a structure array of the same - % size. This is different to the instrinsic Matlab, which returns a scalar + % size. This is different to the intrinsic Matlab, which returns a scalar % structure from the first element in the array of objects % % @@ -255,14 +255,14 @@ % Use structPublic for behaviour that more closely matches the Matlab % intrinsic function struct. % - % Has the same behaviour as the Matlab instrinsic struct in that: + % Has the same behaviour as the Matlab intrinsic struct in that: % - Any structure array is returned unchanged % - If an object is empty, an empty structure is returned with fieldnames % but the same size as the object % % However, differs in the behaviour if an object array: % - If the object is non-empty array, returns a structure array of the same - % size. This is different to the instrinsic Matlab, which returns a scalar + % size. This is different to the intrinsic Matlab, which returns a scalar % structure from the first element in the array of objects % % diff --git a/herbert_core/utilities/classes/@serializable/serializable.m b/herbert_core/utilities/classes/@serializable/serializable.m index 7233bedc7..0a2f787c3 100644 --- a/herbert_core/utilities/classes/@serializable/serializable.m +++ b/herbert_core/utilities/classes/@serializable/serializable.m @@ -6,8 +6,11 @@ %---------------------------------------------------------------------- % ABSTRACT INTERFACE TO DEFINE methods(Abstract,Access=public) - % get class version, which would affect the way class is stored on/ - % /restore from an external media + % define version of the class to store in mat-files + % and nxsqw data format. Each new version would presumably read + % the older version, so version substitution is based on this + % number + ver = classVersion(obj); % get independent fields, which fully define the state of a % serializable object. @@ -31,8 +34,9 @@ % serialization and recovery using static "serializable.from_struct" % operation. % - % Uses internal class structure produced by to to_struct method. - % Contains class information, so the word "class" in the name + % Uses internal class structure produced by "to_bare_struct" + % method and adds more fields, responsible for identifying class, + % and array information if array of objects is serialized. % % Input: % obj -- class or array of classes object. @@ -46,6 +50,9 @@ % serialization and recovery using "from_class_struct" operation % % Uses independent properties obtained from indepFields method. + % in assumption that the properties, returned by this method + % fully define the public interface describing the state of the + % pbject. % % Input: % obj -- class or array of classes object @@ -58,7 +65,7 @@ %------------------------------------------------------------------ function obj = from_class_struct(obj,inputs) % restore object or array of objects from a plain structure, - % previously obtained by to_struct operation + % previously obtained by to_bare_struct operation obj = from_class_struct_(obj,inputs); end %