Skip to content

Commit

Permalink
Re #356 more consistent comments, removing redundant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Oct 26, 2021
1 parent 5459403 commit 486b0f3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -157,7 +157,7 @@
%
% Use <a href="matlab:help('structArrIndep');">structArrIndep</a> 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
Expand Down Expand Up @@ -188,14 +188,14 @@
% Use <a href="matlab:help('structIndep');">structIndep</a> 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
%
%
Expand Down Expand Up @@ -255,14 +255,14 @@
% Use <a href="matlab:help('structPublic');">structPublic</a> 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
%
%
Expand Down
17 changes: 12 additions & 5 deletions herbert_core/utilities/classes/@serializable/serializable.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
%
Expand Down

0 comments on commit 486b0f3

Please sign in to comment.