Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plotID_matlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Merge requests
!43
Implements
#73
, cleans up example file,
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Implements
#73
, cleans up example file,
development
into
master
Overview
0
Commits
31
Pipelines
1
Changes
21
Merged
Lemmer, Jan
requested to merge
development
into
master
3 years ago
Overview
0
Commits
31
Pipelines
1
Changes
21
Expand
adds individual example files
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
85ea29cd
31 commits,
3 years ago
21 files
+
448
−
251
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
21
Search (e.g. *.vue) (Ctrl+P)
+PlotID/@config/config.m
+
21
−
19
Options
classdef
config
<
handle
%CONFIG class handles metho
th
s and attributes related to the config
%CONFIG class handles metho
d
s and attributes related to the config
%file
% Detailed explanation goes here
% handle class used for dynamicy property updates
%handle class used for dynamicy property updates
properties
(
SetAccess
=
private
)
mandatoryFields
=
{
'Author'
,
'ProjectID'
}
optionFields
optionFields
configPath
end
properties
(
SetAccess
=
protected
)
configData
configFileName
exportPath
=
''
end
methods
function
obj
=
config
(
configFileName
)
%CONFIG Construct an instance of this class
% Detailed explanation goes here
% reads config data from config file, if an error occurs the
% wizard is started by the catch block
obj
.
configFileName
=
configFileName
;
try
txt
=
fileread
(
obj
.
configFileName
);
obj
.
configData
=
jsondecode
(
txt
);
assert
(
checkConfig
(
obj
));
catch
if
isfield
(
obj
.
configData
,
'ExportPath'
)
obj
.
exportPath
=
obj
.
configData
.
ExportPath
;
obj
.
configData
.
options
.
Location
=
'exportPath'
;
end
catch
msg
=
[
'no valid config File with the filename '
,
...
obj
.
configFileName
,
' found.'
newline
,
...
'Please enter the required information manually'
];
disp
(
msg
);
obj
.
configData
=
obj
.
wizard
(
'initilise'
);
obj
.
configData
=
obj
.
wizard
(
'initi
a
lise'
);
m
=
input
(
'Do you want to save the config, Y/N [Y]:'
,
's'
);
if
ismember
(
m
,{
'Y'
,
'y'
})
obj
.
writeConfig
(
fullfile
(
pwd
));
end
end
%try
obj
.
configPath
=
which
(
obj
.
configFileName
);
end
function
outputArg
=
checkConfig
(
obj
)
@@ -57,22 +62,19 @@ classdef config < handle
end
function
configData
=
addPublishOptions
(
obj
,
mode
)
%
writeConfig writes the config file to path
%
TODo;
%
addPublishOptions adds the publsih options to the config
%
object depending on the mode
obj
.
configData
.
options
=
obj
.
plotID_options
(
mode
);
end
function
outputArg
=
method1
(
obj
,
inputArg
)
%METHOD1 Summary of this method goes here
% Detailed explanation goes here
outputArg
=
obj
.
Property1
+
inputArg
;
end
cpath
=
fileparts
(
obj
.
configPath
);
obj
.
writeConfig
(
cpath
);
end
end
methods
(
Static
)
configStruct
=
wizard
(
mode
)
optionStruct
=
plotID_options
(
input
)
optionStruct
=
plotID_options
(
input
)
end
end
Loading