-
Notifications
You must be signed in to change notification settings - Fork 5
/
FlowEntity.m
45 lines (41 loc) · 1.32 KB
/
FlowEntity.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
%% Flow Entity
%% Class
% * _copyElement_: no handle class member, thus no need to override this method.
classdef FlowEntity < Entity
properties
% Identifers below are generated by <FlowEntityBuilder>.
LocalIdentifier uint64;
GlobalIdentifier uint64;
end
properties (Dependent)
Parent; % see also <SliceEntity>
end
% methods (Access = ?FlowEntityBuilder)
methods
function this = FlowEntity(time_arrive, time_serve, src, ...
local_id, flow_id, varargin)
if nargin == 0
arg_list = {};
else
arg_list = [{time_arrive, time_serve, src}, varargin];
end
this@Entity(arg_list{:});
if ~isempty(flow_id)
for i = length(this):-1:1
this(i).GlobalIdentifier = flow_id(i);
end
end
for i = length(this):-1:1
this(i).LocalIdentifier = local_id(i);
end
end
end
methods
%%%
% Flow Enity's parent is the same as the <FlowEntiyBuilder> object's parent, which
% is a <SliceEntity> object.
function p = get.Parent(this)
p = this.Builder.Parent;
end
end
end