|
Oolite 1.91.0.7712-251017-85ce217
|
#include <OORoleSet.h>
Instance Methods | |
| (id) | - initWithRoleString: |
| (id) | - initWithRole:probability: |
| (NSString *) | - roleString |
| (BOOL) | - hasRole: |
| (float) | - probabilityForRole: |
| (BOOL) | - intersectsSet: |
| (NSSet *) | - roles |
| (NSArray *) | - sortedRoles |
| (NSDictionary *) | - rolesAndProbabilities |
| (NSString *) | - anyRole |
| (id) | - roleSetWithAddedRole:probability: |
| (id) | - roleSetWithAddedRoleIfNotSet:probability: |
| (id) | - roleSetWithRemovedRole: |
| (void) | - dealloc [implementation] |
| (NSString *) | - description [implementation] |
| (BOOL) | - isEqual: [implementation] |
| (NSUInteger) | - hash [implementation] |
| (id) | - copyWithZone: [implementation] |
| (id) | - initWithRolesAndProbabilities: [implementation] |
Class Methods | |
| (instancetype) | + roleSetWithString: |
| (instancetype) | + roleSetWithRole:probability: |
Private Attributes | |
| NSString * | _roleString |
| NSDictionary * | _rolesAndProbabilities |
| NSSet * | _roles |
| float | _totalProb |
Definition at line 35 of file OORoleSet.h.
| - (NSString *) anyRole |
Definition at line 193 of file OORoleSet.m.
References _rolesAndProbabilities, _totalProb, anyRole, count, nil, OOLog, randf(), and roles.
Referenced by anyRole.
|
implementation |
Definition at line 108 of file OORoleSet.m.
|
implementation |
Definition at line 76 of file OORoleSet.m.
References dealloc.
Referenced by dealloc.
|
implementation |
Definition at line 86 of file OORoleSet.m.
References description, and roleString.
Referenced by description.
|
implementation |
Definition at line 102 of file OORoleSet.m.
References hash.
Referenced by hash.
| - (BOOL) hasRole: | (NSString *) | role |
Definition at line 150 of file OORoleSet.m.
References nil.
Referenced by ShipEntity::hasRole:, and ShipEntity::isBoulder.
| - (id) initWithRole: | (NSString *) | role | |
| probability: | (float) | probability |
Definition at line 64 of file OORoleSet.m.
References initWithRolesAndProbabilities:, and nil.
|
implementation |
Provided by category OORoleSet(OOPrivate).
Definition at line 264 of file OORoleSet.m.
Referenced by initWithRole:probability:, and initWithRoleString:.
| - (id) initWithRoleString: | (NSString *) | roleString |
Definition at line 55 of file OORoleSet.m.
References initWithRolesAndProbabilities:, nil, OOParseRolesFromString(), and roleString.
| - (BOOL) intersectsSet: | (id) | set |
Definition at line 162 of file OORoleSet.m.
References roles.
Referenced by HasRoleInSetPredicate().
|
implementation |
Definition at line 92 of file OORoleSet.m.
| - (float) probabilityForRole: | (NSString *) | role |
Definition at line 156 of file OORoleSet.m.
Referenced by roleString.
| - (NSSet *) roles |
Definition at line 171 of file OORoleSet.m.
References _roles, nil, and roles.
Referenced by anyRole, intersectsSet:, roles, roleString, OOShipDebugInspectorModule::update, and ShipEntity::verifiedMissileTypeFromRole:.
| - (NSDictionary *) rolesAndProbabilities |
Definition at line 187 of file OORoleSet.m.
References _rolesAndProbabilities, and rolesAndProbabilities.
Referenced by rolesAndProbabilities, and ShipGetProperty().
| - (id) roleSetWithAddedRole: | (NSString *) | role | |
| probability: | (float) | probability |
Definition at line 233 of file OORoleSet.m.
References nil.
Referenced by ShipEntity::addRole:withProbability:.
| - (id) roleSetWithAddedRoleIfNotSet: | (NSString *) | role | |
| probability: | (float) | probability |
Definition at line 218 of file OORoleSet.m.
References nil.
| - (id) roleSetWithRemovedRole: | (NSString *) | role |
Definition at line 248 of file OORoleSet.m.
References nil.
Referenced by ShipEntity::removeRole:.
| + (instancetype) roleSetWithRole: | (NSString *) | role | |
| probability: | (float) | probability |
Definition at line 50 of file OORoleSet.m.
Referenced by ShipEntity::addRole:withProbability:.
| + (instancetype) roleSetWithString: | (NSString *) | roleString |
Definition at line 44 of file OORoleSet.m.
Referenced by ShipEntity::setUpShipFromDictionary:.
| - (NSString *) roleString |
Definition at line 115 of file OORoleSet.m.
References _roleString, nil, probabilityForRole:, roles, roleString, and sortedRoles.
Referenced by description, initWithRoleString:, roleString, and ShipEntity(LoadRestore)::savedShipDictionaryWithContext:.
| - (NSArray *) sortedRoles |
Definition at line 181 of file OORoleSet.m.
References sortedRoles.
Referenced by roleString, ShipGetProperty(), and sortedRoles.
|
private |
Definition at line 41 of file OORoleSet.h.
Referenced by roles.
|
private |
Definition at line 40 of file OORoleSet.h.
Referenced by anyRole, and rolesAndProbabilities.
|
private |
Definition at line 39 of file OORoleSet.h.
Referenced by roleString.
|
private |
Definition at line 42 of file OORoleSet.h.
Referenced by anyRole.