forked from tslarkin/Mercury
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HMPart.h
executable file
·87 lines (65 loc) · 1.79 KB
/
HMPart.h
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//
// HMPart.h
// Hernix
//
// Created by Timothy Larkin on 2/23/07.
// Copyright 2007 Abstract Tools. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "HMNode.h"
#import "Value.h"
@class HMPort;
@class HMInput;
@class HMOutput;
typedef enum{kwhite,kblack,kgray}Color;
@interface HMPart : HMNode {
HMNode *parent;
NSArray *inputs;
NSArray *outputs;
float attraction;
NSArray *map;
NSArray *finalInputValues;
Color color;
unsigned begin;
unsigned end;
}
- (Color)color;
- (void)setColor:(Color)aColor;
- (unsigned)begin;
- (void)setBegin:(unsigned)aBegin;
- (unsigned)end;
- (void)setEnd:(unsigned)anEnd;
- (NSString*)path;
- (NSArray *)finalInputValues;
- (void)setFinalInputValues:(NSArray *)aFinalValues;
- (Value*)finalInputValueAt:(int)index;
- (BOOL)hasAttraction;
- (HMPort*)portWithName:(NSString*)name;
- (HMPart*)partWithName:(NSString*)name;
- (HMPart*)partWithNodeID:(NSString*)nodeID;
- (HMNode *)parent;
- (void)setParent:(HMNode *)aParent;
- (NSArray *)inputs;
- (void)setInputs:(NSArray *)anInput;
- (Value*)inputValue:(int)index;
- (Value*)outputValue:(int)index;
- (HMInput*)input:(int)index;
- (HMOutput*)output:(int)index;
- (NSArray *)outputs;
- (void)setOutputs:(NSArray *)anOutput;
- (void)initialize;
- (void)updateStates;
- (void)updateRates;
-(NSTimeInterval)findLatestStartTime:(NSTimeInterval)start;
- (float)attraction;
- (void)setAttraction:(float)anAttraction;
- (void)computeEmigrationFromAttractions;
- (void)setInitialValue:(NSString*)valueString forPort:(NSString*)portName;
- (NSArray *)map;
- (void)setMap:(NSArray *)aMap;
-(BOOL)isRatePhaseInput:(Fixed)i;
-(BOOL)isRatePhaseOutput:(Fixed)i;
- (void)collectRecorders:(NSMutableArray*)collection;
- (HMPort*)recursiveSearchOnPath:(NSArray*)path forPortIn:(NSString*)portSet;
- (void)awake;
@end