-
Notifications
You must be signed in to change notification settings - Fork 0
/
mOP2block_empty.m
61 lines (54 loc) · 1.68 KB
/
mOP2block_empty.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
classdef mOP2block_empty < mOP2block
%MOP2BLOCK_EMPTY Reads nothing
% MOP2BLOCK_EMPTY reads nothing
% from a NASTRAN binary output 2 file.
%
% BLOCKINFO is the structure describing the block.
% DATA is a structure, containing the following fields:
%
% DATA(I), with I = 1:numel(DATA)
% |- NOTHING, Boolean always true
%
% Note: fields marked with (*) are present only in the appropriate cases.
%
% Block described in ..., page ....
% See also MOP2READ, MOP2INFO, MOP2BLOCK, MOP2BLOCK_*.
% $Revision: 1.1.0 $ $Date: 2022/09/08 $
%% Disclaimer
% Copyright (c) 2022 Giulio Molinari
%
% This file is part of mOP2.
% mOP2 is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% any later version. Also see the file "LICENSE".
properties
end % properties
properties(SetAccess=private)
end % properties(SetAccess=protected)
properties(Access=private)
data_copy
data_set = false
end % properties(Access=private)
properties(SetAccess=private, Dependent = true)
data
end % properties(SetAccess=private, Dependent = true)
methods
function block = mOP2block_empty(blockInfo, fid)
block = block@mOP2block(blockInfo, fid);
block.interpreter = 'EMPTY';
end % mOP2block_empty
function data = get.data(block)
if block.data_set == true
data = block.data_copy;
return
end
fid = block.fid;
blockInfo = block.blockInfo;
% IMPLEMENT EVERYTHING HERE
data.nothing = true;
block.data_set = true;
block.data_copy = data;
end % get.data
end % methods
end