diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..d2f1b48 Binary files /dev/null and b/.DS_Store differ diff --git a/iDNA/.DS_Store b/iDNA/.DS_Store new file mode 100644 index 0000000..c43eeae Binary files /dev/null and b/iDNA/.DS_Store differ diff --git a/iDNA/iDNA.xcodeproj/project.pbxproj b/iDNA/iDNA.xcodeproj/project.pbxproj new file mode 100644 index 0000000..39d0496 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.pbxproj @@ -0,0 +1,356 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + C3758CB71699CA4900BC8D86 /* ResultController.m in Sources */ = {isa = PBXBuildFile; fileRef = C3758CB51699CA4900BC8D86 /* ResultController.m */; }; + C3758CB81699CA4900BC8D86 /* ResultController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C3758CB61699CA4900BC8D86 /* ResultController.xib */; }; + C379CE341698F0D500BA2D06 /* Population.m in Sources */ = {isa = PBXBuildFile; fileRef = C379CE331698F0D500BA2D06 /* Population.m */; }; + C3CD5E3C16977291000FE158 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3CD5E3B16977291000FE158 /* Cocoa.framework */; }; + C3CD5E4616977291000FE158 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C3CD5E4416977291000FE158 /* InfoPlist.strings */; }; + C3CD5E4816977291000FE158 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C3CD5E4716977291000FE158 /* main.m */; }; + C3CD5E4C16977291000FE158 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = C3CD5E4A16977291000FE158 /* Credits.rtf */; }; + C3CD5E4F16977291000FE158 /* iDNADocument.m in Sources */ = {isa = PBXBuildFile; fileRef = C3CD5E4E16977291000FE158 /* iDNADocument.m */; }; + C3CD5E5216977291000FE158 /* iDNADocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = C3CD5E5016977291000FE158 /* iDNADocument.xib */; }; + C3CD5E5516977291000FE158 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C3CD5E5316977291000FE158 /* MainMenu.xib */; }; + C3CD5E6416977719000FE158 /* Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = C3CD5E6216977719000FE158 /* Cell.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + C3758CB41699CA4800BC8D86 /* ResultController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResultController.h; path = iDNA/ResultController.h; sourceTree = ""; }; + C3758CB51699CA4900BC8D86 /* ResultController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ResultController.m; path = iDNA/ResultController.m; sourceTree = ""; }; + C3758CB61699CA4900BC8D86 /* ResultController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ResultController.xib; path = iDNA/ResultController.xib; sourceTree = ""; }; + C379CE321698F0D500BA2D06 /* Population.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Population.h; sourceTree = ""; }; + C379CE331698F0D500BA2D06 /* Population.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Population.m; sourceTree = ""; }; + C3CD5E3716977291000FE158 /* iDNA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iDNA.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C3CD5E3B16977291000FE158 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + C3CD5E3E16977291000FE158 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + C3CD5E3F16977291000FE158 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + C3CD5E4016977291000FE158 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + C3CD5E4316977291000FE158 /* iDNA-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iDNA-Info.plist"; sourceTree = ""; }; + C3CD5E4516977291000FE158 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + C3CD5E4716977291000FE158 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + C3CD5E4916977291000FE158 /* iDNA-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iDNA-Prefix.pch"; sourceTree = ""; }; + C3CD5E4B16977291000FE158 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + C3CD5E4D16977291000FE158 /* iDNADocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = iDNADocument.h; sourceTree = ""; }; + C3CD5E4E16977291000FE158 /* iDNADocument.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iDNADocument.m; sourceTree = ""; }; + C3CD5E5116977291000FE158 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/iDNADocument.xib; sourceTree = ""; }; + C3CD5E5416977291000FE158 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + C3CD5E6116977719000FE158 /* Cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cell.h; sourceTree = ""; }; + C3CD5E6216977719000FE158 /* Cell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cell.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C3CD5E3416977291000FE158 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C3CD5E3C16977291000FE158 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + C3758CAE1699BCD600BC8D86 /* ResultController */ = { + isa = PBXGroup; + children = ( + ); + name = ResultController; + sourceTree = ""; + }; + C3CD5E2C16977291000FE158 = { + isa = PBXGroup; + children = ( + C3758CB41699CA4800BC8D86 /* ResultController.h */, + C3758CB51699CA4900BC8D86 /* ResultController.m */, + C3758CB61699CA4900BC8D86 /* ResultController.xib */, + C3CD5E4116977291000FE158 /* iDNA */, + C3CD5E3A16977291000FE158 /* Frameworks */, + C3CD5E3816977291000FE158 /* Products */, + ); + sourceTree = ""; + }; + C3CD5E3816977291000FE158 /* Products */ = { + isa = PBXGroup; + children = ( + C3CD5E3716977291000FE158 /* iDNA.app */, + ); + name = Products; + sourceTree = ""; + }; + C3CD5E3A16977291000FE158 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C3CD5E3B16977291000FE158 /* Cocoa.framework */, + C3CD5E3D16977291000FE158 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + C3CD5E3D16977291000FE158 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + C3CD5E3E16977291000FE158 /* AppKit.framework */, + C3CD5E3F16977291000FE158 /* CoreData.framework */, + C3CD5E4016977291000FE158 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + C3CD5E4116977291000FE158 /* iDNA */ = { + isa = PBXGroup; + children = ( + C3CD5E651697772A000FE158 /* Evolution */, + C3CD5E4D16977291000FE158 /* iDNADocument.h */, + C3CD5E4E16977291000FE158 /* iDNADocument.m */, + C3758CAE1699BCD600BC8D86 /* ResultController */, + C3CD5E5016977291000FE158 /* iDNADocument.xib */, + C3CD5E5316977291000FE158 /* MainMenu.xib */, + C3CD5E4216977291000FE158 /* Supporting Files */, + ); + path = iDNA; + sourceTree = ""; + }; + C3CD5E4216977291000FE158 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + C3CD5E4316977291000FE158 /* iDNA-Info.plist */, + C3CD5E4416977291000FE158 /* InfoPlist.strings */, + C3CD5E4716977291000FE158 /* main.m */, + C3CD5E4916977291000FE158 /* iDNA-Prefix.pch */, + C3CD5E4A16977291000FE158 /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + C3CD5E651697772A000FE158 /* Evolution */ = { + isa = PBXGroup; + children = ( + C379CE321698F0D500BA2D06 /* Population.h */, + C379CE331698F0D500BA2D06 /* Population.m */, + C3CD5E6116977719000FE158 /* Cell.h */, + C3CD5E6216977719000FE158 /* Cell.m */, + ); + name = Evolution; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C3CD5E3616977291000FE158 /* iDNA */ = { + isa = PBXNativeTarget; + buildConfigurationList = C3CD5E5816977291000FE158 /* Build configuration list for PBXNativeTarget "iDNA" */; + buildPhases = ( + C3CD5E3316977291000FE158 /* Sources */, + C3CD5E3416977291000FE158 /* Frameworks */, + C3CD5E3516977291000FE158 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iDNA; + productName = iDNA; + productReference = C3CD5E3716977291000FE158 /* iDNA.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C3CD5E2E16977291000FE158 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = iDNA; + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = "Администратор"; + }; + buildConfigurationList = C3CD5E3116977291000FE158 /* Build configuration list for PBXProject "iDNA" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = C3CD5E2C16977291000FE158; + productRefGroup = C3CD5E3816977291000FE158 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C3CD5E3616977291000FE158 /* iDNA */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C3CD5E3516977291000FE158 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C3CD5E4616977291000FE158 /* InfoPlist.strings in Resources */, + C3CD5E4C16977291000FE158 /* Credits.rtf in Resources */, + C3CD5E5216977291000FE158 /* iDNADocument.xib in Resources */, + C3CD5E5516977291000FE158 /* MainMenu.xib in Resources */, + C3758CB81699CA4900BC8D86 /* ResultController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C3CD5E3316977291000FE158 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C3CD5E4816977291000FE158 /* main.m in Sources */, + C3CD5E4F16977291000FE158 /* iDNADocument.m in Sources */, + C3CD5E6416977719000FE158 /* Cell.m in Sources */, + C379CE341698F0D500BA2D06 /* Population.m in Sources */, + C3758CB71699CA4900BC8D86 /* ResultController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + C3CD5E4416977291000FE158 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + C3CD5E4516977291000FE158 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + C3CD5E4A16977291000FE158 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + C3CD5E4B16977291000FE158 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + C3CD5E5016977291000FE158 /* iDNADocument.xib */ = { + isa = PBXVariantGroup; + children = ( + C3CD5E5116977291000FE158 /* en */, + ); + name = iDNADocument.xib; + sourceTree = ""; + }; + C3CD5E5316977291000FE158 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + C3CD5E5416977291000FE158 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C3CD5E5616977291000FE158 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + C3CD5E5716977291000FE158 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + SDKROOT = macosx; + }; + name = Release; + }; + C3CD5E5916977291000FE158 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "iDNA/iDNA-Prefix.pch"; + INFOPLIST_FILE = "iDNA/iDNA-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + C3CD5E5A16977291000FE158 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "iDNA/iDNA-Prefix.pch"; + INFOPLIST_FILE = "iDNA/iDNA-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C3CD5E3116977291000FE158 /* Build configuration list for PBXProject "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C3CD5E5616977291000FE158 /* Debug */, + C3CD5E5716977291000FE158 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C3CD5E5816977291000FE158 /* Build configuration list for PBXNativeTarget "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C3CD5E5916977291000FE158 /* Debug */, + C3CD5E5A16977291000FE158 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C3CD5E2E16977291000FE158 /* Project object */; +} diff --git a/iDNA/iDNA.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/iDNA/iDNA.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2d38afe --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/administrator.xcuserdatad/UserInterfaceState.xcuserstate b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/administrator.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..f22220b Binary files /dev/null and b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/administrator.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/administrator.xcuserdatad/xcdebugger/Expressions.xcexplist b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/administrator.xcuserdatad/xcdebugger/Expressions.xcexplist new file mode 100644 index 0000000..b39f805 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/administrator.xcuserdatad/xcdebugger/Expressions.xcexplist @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 0000000..be6f317 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcschemes/iDNA.xcscheme b/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcschemes/iDNA.xcscheme new file mode 100644 index 0000000..b127f5d --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcschemes/iDNA.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcschemes/xcschememanagement.plist b/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..53e1f9b --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/administrator.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + iDNA.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + C3CD5E3616977291000FE158 + + primary + + + + + diff --git a/iDNA/iDNA/Cell.h b/iDNA/iDNA/Cell.h new file mode 100644 index 0000000..85b9124 --- /dev/null +++ b/iDNA/iDNA/Cell.h @@ -0,0 +1,29 @@ +// +// Cell.h +// DNA +// +// Created by Администратор on 10/31/12. +// Copyright (c) 2012 Администратор. All rights reserved. +// + +#import + +#define LETTERS @"ATGC" // возможные значения элемента клетки (использовать uppercase) + +@interface Cell : NSObject + +@property NSMutableArray *DNA; + +- (id) initWithLength: (int) length; +- (id) initWithString: (NSString*) s; + +- (void) changeLength: (int) length; +- (int) hammingDistance: (Cell*) c; // хэммингово расстояние от данной клетки до клетки c ++ (Cell *) Cell1:(Cell*) c1 crossWithCell2:(Cell*) c2; // скрещивание клетки с1 и клетки c2 ++ (NSString*) generateRandomNucletoid; +- (void)mutate: (int) x; // мутирование х% клетки + +- (void) print; +- (NSString*) description; + +@end diff --git a/iDNA/iDNA/Cell.m b/iDNA/iDNA/Cell.m new file mode 100644 index 0000000..87ba527 --- /dev/null +++ b/iDNA/iDNA/Cell.m @@ -0,0 +1,157 @@ +// +// Cell.m +// DNA +// +// Created by Администратор on 10/31/12. +// Copyright (c) 2012 Администратор. All rights reserved. +// + +#import "Cell.h" + +@implementation Cell + +// инициализация клетки случайным образом с заданным размером +-(id) initWithLength: (int) length { + self = [super init]; + + if (self) { + _DNA = [[NSMutableArray alloc] initWithCapacity: length]; + + // random init array from our possible letters + for (int i = 0; i < length; i++) { + [_DNA addObject: [Cell generateRandomNucletoid]]; + } + } + return self; +} + +- (id) initWithString:(NSString *)s { + self = [super init]; + + if (self) { + _DNA = [[NSMutableArray alloc] initWithCapacity: [s length]]; + NSString *c; + // random init array from our possible letters + for (int i = 0; i < [s length]; i++) { + c = [[NSString alloc] initWithFormat:@"%c", [s characterAtIndex:i]]; + [_DNA addObject: c]; + } + } + return self; +} + +// устанавливаем количество нуклеоидов в клетке +- (void) changeLength: (int) length { + if (length > 0) { + int size = (int)[_DNA count]; + if ([_DNA count] < length) { // старая длина меньше новой длины, следовательно добавляем элементы + for (int i = 0; i < (length - size); i++) + [_DNA addObject: [Cell generateRandomNucletoid]]; + } else { + for (int i = 0; i < (size - length); i++) + [_DNA removeLastObject]; + } + } +} + +// хэммингово расстояние междку клетками +-(int) hammingDistance: (Cell *) c { + int distance = 0; + + for (int i = 0; i < [_DNA count]; i++) { + if ([[_DNA objectAtIndex: i] isNotEqualTo: [c.DNA objectAtIndex: i]]) + distance++; + } + return distance; +} + ++ (Cell *) Cell1:(Cell*) c1 crossWithCell2:(Cell*) c2 { + Cell* child = nil; + + if ([c1.DNA count] != [c2.DNA count]) { + // ошибка - клетки не совпадают размером + NSLog(@"Crossing error. Size of cells is not equal."); + } + else { + child = [[Cell alloc] initWithLength: (int)[c1.DNA count]]; + int method = arc4random() % 3; // выбираем один из трех случайных методов скрещивания + if (method == 0) { + // первый метод - 50% + 50% + for (int i = 0; i < [c1.DNA count]; i++) + if (i < [c1.DNA count]/2) + [child.DNA replaceObjectAtIndex:i withObject:[c1.DNA objectAtIndex:i]]; + else + [child.DNA replaceObjectAtIndex:i withObject:[c2.DNA objectAtIndex:i]]; + } else if (method == 1) { + // второй метод - 1 + 1 + ... + 1 + for (int i = 0; i < [c1.DNA count]; i++) + if (i % 2 == 0) + [child.DNA replaceObjectAtIndex:i withObject:[c1.DNA objectAtIndex:i]]; + else + [child.DNA replaceObjectAtIndex:i withObject:[c2.DNA objectAtIndex:i]]; + } else { + // третий метод - 20% + 60% + 20% + for (int i = 0; i < [c1.DNA count]; i++) + if (i <= [c1.DNA count]/5 || i >= 4*[c1.DNA count]/5 ) + [child.DNA replaceObjectAtIndex:i withObject:[c1.DNA objectAtIndex:i]]; + else + [child.DNA replaceObjectAtIndex:i withObject:[c2.DNA objectAtIndex:i]]; + } + } + return child; +} + +// генерирует случ. элемент клетки ++ (NSString*) generateRandomNucletoid { + return [LETTERS substringWithRange: NSMakeRange(arc4random() % LETTERS.length, 1)]; +} + +// Мутация Х% элементов клетки +- (void)mutate: (int) x { + // начальные проверки для входных данных + if (x > 100) x = 100; + if (x < 0) NSLog(@"Inccorect percent for mutation"); + else { // процесс мутации + int shot, count = [self.DNA count] * x / 100; // высчитываем количество клеток для мутации в общем случае + NSString *s; + + // выбираем случайно Х% клеток, заменяем их значение на lowercase (для сохранения буквы, что бы при замене знать на что менять не надо) + for (int i = 0; i < count; i++) { + do { + shot = arc4random() % [self.DNA count]; + s = [self.DNA objectAtIndex: shot]; + } while (islower([s characterAtIndex: 0])); + [self.DNA setObject:[s lowercaseString] atIndexedSubscript: shot]; + } + + // мутируем все клетки с lowercase + for (int i = 0; i < [_DNA count]; i++) + if (islower([[self.DNA objectAtIndex: i] characterAtIndex: 0])) { + do { + s = [Cell generateRandomNucletoid]; + } while ([s isEqual: [[self.DNA objectAtIndex: i] uppercaseString]]); + [self.DNA setObject: s atIndexedSubscript: i]; + } + } +} + +// печатаем клетку в стандартный поток +-(void) print { + NSMutableString *s = [NSMutableString string]; + + for (int i = 0; i < [_DNA count]; i++) + [s appendString:[_DNA objectAtIndex: i]]; + NSLog(@"%@",s); +} + +// описание клетки +-(NSString*) description { + NSMutableString *s = [NSMutableString string]; + + for (int i = 0; i < [_DNA count]; i++) + [s appendString:[_DNA objectAtIndex: i]]; + return s; +} + + +@end diff --git a/iDNA/iDNA/Population.h b/iDNA/iDNA/Population.h new file mode 100644 index 0000000..e2ccfea --- /dev/null +++ b/iDNA/iDNA/Population.h @@ -0,0 +1,25 @@ +// +// Population.h +// iDNA +// +// Created by Администратор on 1/6/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import +#import "Cell.h" + +@interface Population : NSObject { + Cell* goalDNA; +} + +@property NSMutableArray *population; + +- (id) initWithSize:(int)size andDNALength:(int)l andGoalDNA:(Cell*) gDNA; // создание популяции размера size, каждая ДНК состоит из l элементов +- (void) removeAllPopulation; +- (void) sortToGoalDNA; // сортировка популяции по близости к целевой ДНК +- (void) crossPopulationTopPercent:(int) p; // замена оставшихся (1-p%) особей на результат скрещивания p% лучших особоей +- (void) mutate:(int) x; // мутировать популяцию, каждая ДНК мутируется на х% +- (NSString*) description; + +@end diff --git a/iDNA/iDNA/Population.m b/iDNA/iDNA/Population.m new file mode 100644 index 0000000..738ee2c --- /dev/null +++ b/iDNA/iDNA/Population.m @@ -0,0 +1,86 @@ +// +// Population.m +// iDNA +// +// Created by Администратор on 1/6/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import "Population.h" + +@implementation Population + +- (id) initWithSize:(int)size andDNALength: (int)l andGoalDNA:(Cell *)gDNA { + if (self = [super init]) { + _population = [[NSMutableArray alloc] initWithCapacity: size]; + goalDNA = gDNA; + for (int i = 0; i < size; i++) { + Cell *c = [[Cell alloc] initWithLength: l]; + [_population addObject: c]; + } + } + return self; +} + +- (void) removeAllPopulation { + [_population removeAllObjects]; +} + +- (void) sortToGoalDNA { + //NSLog(@"Population before sorting: %@", [self description]); + [_population sortUsingComparator:^(Cell *a, Cell *b) { + int d1 = [a hammingDistance: goalDNA]; + int d2 = [b hammingDistance: goalDNA]; + if (d1 > d2) return (NSComparisonResult)NSOrderedDescending; + if (d2 > d1) return (NSComparisonResult)NSOrderedAscending; + return (NSComparisonResult)NSOrderedSame; + }]; + //NSLog(@"Population afther sorting: %@", [self description]); +} + +- (void) crossPopulationTopPercent:(int) p { + if (p < 0 || p > 100) { + NSLog(@"Incorrect percent for population crossing"); + return; + } else { + int cellsCountInBestPart = p * [_population count] / 100; + int cellsCountInWorsePart = (int)[_population count] - cellsCountInBestPart; + + // проверка есть ли в каждой из частей как минимум один член + if (cellsCountInBestPart == 0 || cellsCountInWorsePart == 0) { + NSLog(@"Population is too small for crossing"); + return; + } + + int shot1, shot2; + Cell *c1,*c2; + for (int i = 0; i < cellsCountInWorsePart; i++){ + // берем 2 случайные особи из лучших + shot1 = arc4random() % cellsCountInBestPart; + shot2 = arc4random() % cellsCountInBestPart; + c1 = [_population objectAtIndex:shot1]; + c2 = [_population objectAtIndex:shot2]; + // заменяем особь из худших на результат скрещивания + [_population replaceObjectAtIndex:i + cellsCountInBestPart withObject:[Cell Cell1:c1 crossWithCell2:c2]]; + } + } +} + +- (void) mutate:(int) x { + for (int i = 0; i < [_population count]; i++) { + [[_population objectAtIndex:i] mutate:x]; + } +} + +- (NSString*) description { + NSMutableString *result = [[NSMutableString alloc] init]; + int distance; + + for (int i = 0; i < [_population count]; i++) { + distance = [[_population objectAtIndex:i] hammingDistance:goalDNA]; + [result appendString:[NSString stringWithFormat:@"%i, ", distance]]; + } + return result; +} + +@end diff --git a/iDNA/iDNA/ResultController.h b/iDNA/iDNA/ResultController.h new file mode 100644 index 0000000..d056e48 --- /dev/null +++ b/iDNA/iDNA/ResultController.h @@ -0,0 +1,17 @@ +// +// ResultController.h +// iDNA +// +// Created by Администратор on 1/6/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import + +@interface ResultController : NSWindowController + +@property (weak) IBOutlet NSTextField *generationPassed; + +- (id) initWithGeneration:(int) g; + +@end diff --git a/iDNA/iDNA/ResultController.m b/iDNA/iDNA/ResultController.m new file mode 100644 index 0000000..968bca9 --- /dev/null +++ b/iDNA/iDNA/ResultController.m @@ -0,0 +1,42 @@ +// +// ResultController.m +// iDNA +// +// Created by Администратор on 1/6/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import "ResultController.h" + +@interface ResultController () { + int generationAmount; +} +@end + +@implementation ResultController + +- (id) initWithGeneration:(int) g { + self = [super initWithWindowNibName:@"ResultController"]; + generationAmount = g; + return self; +} + +- (id)initWithWindow:(NSWindow *)window +{ + self = [super initWithWindow:window]; + if (self) { + // Initialization code here. + } + + return self; +} + +- (void)windowDidLoad +{ + [super windowDidLoad]; + [_generationPassed setStringValue:[NSString stringWithFormat:@"Total amount of generations passed to reach goal DNA - %i", generationAmount]]; + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. +} + + +@end diff --git a/iDNA/iDNA/ResultController.xib b/iDNA/iDNA/ResultController.xib new file mode 100644 index 0000000..ee4833a --- /dev/null +++ b/iDNA/iDNA/ResultController.xib @@ -0,0 +1,441 @@ + + + + 1080 + 12C60 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + IBNSLayoutConstraint + NSCustomObject + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + ResultController + + + FirstResponder + + + NSApplication + + + 31 + 2 + {{196, 132}, {323, 155}} + -1535638528 + Results + NSPanel + + + + + 256 + + + + 268 + {{17, 79}, {289, 63}} + + + + _NS:1535 + YES + + 67108864 + 138412032 + Total amount of generations passed to reach goal DNA - 0 + + LucidaGrande + 13 + 1044 + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + + + + 268 + {{20, 31}, {286, 17}} + + + + _NS:1535 + YES + + 68157504 + 138413056 + Press ESC to close + + _NS:1535 + + + + + NO + + + {323, 155} + + + + _NS:21 + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + + + + + window + + + + 14 + + + + generationPassed + + + + 21 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 12 + + + + + + + + 13 + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 31 + + 1000 + + 3 + 9 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 13 + + 1000 + + 3 + 9 + 3 + + + + + + + + 17 + + + + + + 8 + 0 + + 0 + 1 + + 63 + + 1000 + + 3 + 9 + 1 + + + + + + 18 + + + + + 26 + + + + + 27 + + + + + 29 + + + + + 30 + + + + + 31 + + + + + + 7 + 0 + + 0 + 1 + + 280 + + 1000 + + 3 + 9 + 1 + + + + + + 32 + + + + + 34 + + + + + 35 + + + + + 36 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 36 + + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + ResultController + NSWindowController + + generationPassed + NSTextField + + + generationPassed + + generationPassed + NSTextField + + + + IBProjectSource + ./Classes/ResultController.h + + + + + 0 + IBCocoaFramework + YES + 3 + YES + + diff --git a/iDNA/iDNA/en.lproj/Credits.rtf b/iDNA/iDNA/en.lproj/Credits.rtf new file mode 100644 index 0000000..46576ef --- /dev/null +++ b/iDNA/iDNA/en.lproj/Credits.rtf @@ -0,0 +1,29 @@ +{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw9840\paperh8400 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Engineering: +\b0 \ + Some people\ +\ + +\b Human Interface Design: +\b0 \ + Some other people\ +\ + +\b Testing: +\b0 \ + Hopefully not nobody\ +\ + +\b Documentation: +\b0 \ + Whoever\ +\ + +\b With special thanks to: +\b0 \ + Mom\ +} diff --git a/iDNA/iDNA/en.lproj/InfoPlist.strings b/iDNA/iDNA/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/iDNA/iDNA/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/iDNA/iDNA/en.lproj/MainMenu.xib b/iDNA/iDNA/en.lproj/MainMenu.xib new file mode 100644 index 0000000..b5a73d3 --- /dev/null +++ b/iDNA/iDNA/en.lproj/MainMenu.xib @@ -0,0 +1,4562 @@ + + + + 1080 + 11D50 + 2457 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2457 + + + NSMenu + NSMenuItem + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + iDNA + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + iDNA + + + + About iDNA + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide iDNA + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit iDNA + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save… + s + 1048576 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find and Replace… + f + 1572864 + 2147483647 + + + 12 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + + + Show Spelling and Grammar + : + 1048576 + 2147483647 + + + + + + Check Document Now + ; + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + Correct Spelling Automatically + + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + + + Show Substitutions + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Dashes + + 2147483647 + + + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + Text Replacement + + 2147483647 + + + + + + + + + Transformations + + 2147483647 + + + submenuAction: + + Transformations + + + + Make Upper Case + + 2147483647 + + + + + + Make Lower Case + + 2147483647 + + + + + + Capitalize + + 2147483647 + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + + + Font + + 2147483647 + + + submenuAction: + + Font + + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligatures + + 2147483647 + + + submenuAction: + + Ligatures + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Writing Direction + + 2147483647 + + + submenuAction: + + Writing Direction + + + + YES + Paragraph + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + YES + Selection + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + + + iDNA Help + ? + 1048576 + 2147483647 + + + + + _NSHelpMenu + + + + _NSMainMenu + + + NSFontManager + + + + + + + terminate: + + + + 448 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + saveDocument: + + + + 362 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 371 + + + + openDocument: + + + + 372 + + + + printDocument: + + + + 373 + + + + raiseBaseline: + + + + 425 + + + + lowerBaseline: + + + + 426 + + + + copyFont: + + + + 427 + + + + subscript: + + + + 428 + + + + superscript: + + + + 429 + + + + tightenKerning: + + + + 430 + + + + underline: + + + + 431 + + + + orderFrontColorPanel: + + + + 432 + + + + useAllLigatures: + + + + 433 + + + + loosenKerning: + + + + 434 + + + + pasteFont: + + + + 435 + + + + unscript: + + + + 436 + + + + useStandardKerning: + + + + 437 + + + + useStandardLigatures: + + + + 438 + + + + turnOffLigatures: + + + + 439 + + + + turnOffKerning: + + + + 440 + + + + capitalizeWord: + + + + 454 + + + + lowercaseWord: + + + + 455 + + + + uppercaseWord: + + + + 456 + + + + toggleAutomaticDashSubstitution: + + + + 460 + + + + orderFrontSubstitutionsPanel: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + toggleAutomaticSpellingCorrection: + + + + 466 + + + + performFindPanelAction: + + + + 467 + + + + performFindPanelAction: + + + + 468 + + + + performFindPanelAction: + + + + 469 + + + + pasteAsPlainText: + + + + 471 + + + + showHelp: + + + + 494 + + + + alignCenter: + + + + 517 + + + + pasteRuler: + + + + 518 + + + + toggleRuler: + + + + 519 + + + + alignRight: + + + + 520 + + + + copyRuler: + + + + 521 + + + + alignJustified: + + + + 522 + + + + alignLeft: + + + + 523 + + + + makeBaseWritingDirectionNatural: + + + + 524 + + + + makeBaseWritingDirectionLeftToRight: + + + + 525 + + + + makeBaseWritingDirectionRightToLeft: + + + + 526 + + + + makeTextWritingDirectionNatural: + + + + 527 + + + + makeTextWritingDirectionLeftToRight: + + + + 528 + + + + makeTextWritingDirectionRightToLeft: + + + + 529 + + + + performFindPanelAction: + + + + 533 + + + + addFontTrait: + + + + 420 + + + + addFontTrait: + + + + 421 + + + + modifyFont: + + + + 422 + + + + orderFrontFontPanel: + + + + 423 + + + + modifyFont: + + + + 424 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + + + + + 19 + + + + + + + + 56 + + + + + + + + 217 + + + + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + + + 75 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + + + + + + 126 + + + + + 205 + + + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + + + + + + 216 + + + + + + + + 200 + + + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 57 + + + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + + + + + + 296 + + + + + + + + + 297 + + + + + 298 + + + + + 211 + + + + + + + + 212 + + + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + + + + + + 349 + + + + + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 374 + + + + + + + + 375 + + + + + + + + + 376 + + + + + + + + 387 + + + + + + + + + + + + + + + + + + + + + + + 388 + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + + + + 397 + + + + + + + + 398 + + + + + + + + 399 + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + + + + + + + + 405 + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + + + + + + 411 + + + + + 412 + + + + + 413 + + + + + 414 + + + + + + + + + + + 415 + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 449 + + + + + + + + 450 + + + + + + + + + + 451 + + + + + 452 + + + + + 453 + + + + + 457 + + + + + 458 + + + + + 459 + + + + + 462 + + + + + 464 + + + + + 465 + + + + + 470 + + + + + 491 + + + + + + + + 492 + + + + + + + + 493 + + + + + 495 + + + + + + + + 496 + + + + + + + + + + + + + + + + + 497 + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + + + + 503 + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + + + + + + + + + + + + 508 + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 532 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 533 + + + + + ABAppCardController + NSWindowController + + id + id + id + id + id + id + id + id + + + + addCardViewField: + id + + + copy: + id + + + cut: + id + + + doDelete: + id + + + find: + id + + + paste: + id + + + saveChanges: + id + + + toggleCardEditingMode: + id + + + + ABCardView + NSButton + NSManagedObjectContext + NSSearchField + NSTextField + NSWindow + + + + mCardView + ABCardView + + + mEditButton + NSButton + + + mManagedObjectContext + NSManagedObjectContext + + + mSearchField + NSSearchField + + + mStatusTextField + NSTextField + + + mWindow + NSWindow + + + + IBProjectSource + ./Classes/ABAppCardController.h + + + + ABCardView + NSView + + id + id + + + + commitAndSave: + id + + + statusImageClicked: + id + + + + NSObjectController + NSImageView + NSView + ABNameFrameView + NSView + NSImage + ABImageView + + + + mBindingsController + NSObjectController + + + mBuddyStatusImage + NSImageView + + + mHeaderView + NSView + + + mNameView + ABNameFrameView + + + mNextKeyView + NSView + + + mUserImage + NSImage + + + mUserImageView + ABImageView + + + + IBProjectSource + ./Classes/ABCardView.h + + + + ABImageView + NSImageView + + id + id + id + id + + + + copy: + id + + + cut: + id + + + delete: + id + + + paste: + id + + + + IBProjectSource + ./Classes/ABImageView.h + + + + DVTBorderedView + DVTLayoutView_ML + + contentView + NSView + + + contentView + + contentView + NSView + + + + IBProjectSource + ./Classes/DVTBorderedView.h + + + + DVTDelayedMenuButton + NSButton + + IBProjectSource + ./Classes/DVTDelayedMenuButton.h + + + + DVTGradientImageButton + NSButton + + IBProjectSource + ./Classes/DVTGradientImageButton.h + + + + DVTImageAndTextCell + NSTextFieldCell + + IBProjectSource + ./Classes/DVTImageAndTextCell.h + + + + DVTImageAndTextColumn + NSTableColumn + + IBProjectSource + ./Classes/DVTImageAndTextColumn.h + + + + DVTLayoutView_ML + NSView + + IBProjectSource + ./Classes/DVTLayoutView_ML.h + + + + DVTOutlineView + NSOutlineView + + IBProjectSource + ./Classes/DVTOutlineView.h + + + + DVTSplitView + NSSplitView + + IBProjectSource + ./Classes/DVTSplitView.h + + + + DVTStackView_ML + DVTLayoutView_ML + + IBProjectSource + ./Classes/DVTStackView_ML.h + + + + DVTTableView + NSTableView + + IBProjectSource + ./Classes/DVTTableView.h + + + + DVTViewController + NSViewController + + IBProjectSource + ./Classes/DVTViewController.h + + + + FirstResponder + + duplicateDocument: + id + + + duplicateDocument: + + duplicateDocument: + id + + + + IBUserSource + + + + + HFController + NSObject + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFController.h + + + + HFRepresenterTextView + NSView + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFRepresenterTextView.h + + + + IBEditor + NSObject + + id + id + id + id + id + + + + changeFont: + id + + + performCopy: + id + + + performCut: + id + + + selectAll: + id + + + sizeSelectionToFit: + id + + + + IBProjectSource + ./Classes/IBEditor.h + + + + IDECapsuleListView + DVTStackView_ML + + dataSource + id + + + dataSource + + dataSource + id + + + + IBProjectSource + ./Classes/IDECapsuleListView.h + + + + IDEDMArrayController + NSArrayController + + IBProjectSource + ./Classes/IDEDMArrayController.h + + + + IDEDMEditor + IDEEditor + + DVTBorderedView + NSView + IDEDMEditorSourceListController + DVTSplitView + + + + bottomToolbarBorderView + DVTBorderedView + + + sourceListSplitViewPane + NSView + + + sourceListViewController + IDEDMEditorSourceListController + + + splitView + DVTSplitView + + + + IBProjectSource + ./Classes/IDEDMEditor.h + + + + IDEDMEditorController + IDEViewController + + IBProjectSource + ./Classes/IDEDMEditorController.h + + + + IDEDMEditorSourceListController + IDEDMEditorController + + DVTBorderedView + IDEDMEditor + DVTImageAndTextColumn + DVTOutlineView + NSTreeController + + + + borderedView + DVTBorderedView + + + parentEditor + IDEDMEditor + + + primaryColumn + DVTImageAndTextColumn + + + sourceListOutlineView + DVTOutlineView + + + sourceListTreeController + NSTreeController + + + + IBProjectSource + ./Classes/IDEDMEditorSourceListController.h + + + + IDEDMHighlightImageAndTextCell + DVTImageAndTextCell + + IBProjectSource + ./Classes/IDEDMHighlightImageAndTextCell.h + + + + IDEDataModelBrowserEditor + IDEDMEditorController + + IDEDataModelPropertiesTableController + IDECapsuleListView + NSArrayController + IDEDataModelPropertiesTableController + IDEDataModelEntityContentsEditor + IDEDataModelPropertiesTableController + + + + attributesTableViewController + IDEDataModelPropertiesTableController + + + capsuleView + IDECapsuleListView + + + entityArrayController + NSArrayController + + + fetchedPropertiesTableViewController + IDEDataModelPropertiesTableController + + + parentEditor + IDEDataModelEntityContentsEditor + + + relationshipsTableViewController + IDEDataModelPropertiesTableController + + + + IBProjectSource + ./Classes/IDEDataModelBrowserEditor.h + + + + IDEDataModelConfigurationEditor + IDEDMEditorController + + IDECapsuleListView + IDEDataModelEditor + IDEDataModelConfigurationTableController + + + + capsuleListView + IDECapsuleListView + + + parentEditor + IDEDataModelEditor + + + tableController + IDEDataModelConfigurationTableController + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationEditor.h + + + + IDEDataModelConfigurationTableController + IDEDMEditorController + + NSArrayController + NSArrayController + IDEDataModelConfigurationEditor + XDTableView + + + + configurationsArrayController + NSArrayController + + + entitiesArrayController + NSArrayController + + + parentEditor + IDEDataModelConfigurationEditor + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationTableController.h + + + + IDEDataModelDiagramEditor + IDEDMEditorController + + XDDiagramView + IDEDataModelEntityContentsEditor + + + + diagramView + XDDiagramView + + + parentEditor + IDEDataModelEntityContentsEditor + + + + IBProjectSource + ./Classes/IDEDataModelDiagramEditor.h + + + + IDEDataModelEditor + IDEDMEditor + + DVTDelayedMenuButton + DVTDelayedMenuButton + NSSegmentedControl + IDEDataModelConfigurationEditor + IDEDataModelEntityContentsEditor + IDEDataModelFetchRequestEditor + NSSegmentedControl + NSTabView + + + + addEntityButton + DVTDelayedMenuButton + + + addPropertyButton + DVTDelayedMenuButton + + + browserDiagramSegmentControl + NSSegmentedControl + + + configurationViewController + IDEDataModelConfigurationEditor + + + entityContentsViewController + IDEDataModelEntityContentsEditor + + + fetchRequestViewController + IDEDataModelFetchRequestEditor + + + hierarchySegmentControl + NSSegmentedControl + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEditor.h + + + + IDEDataModelEntityContentsEditor + IDEDMEditorController + + IDEDataModelBrowserEditor + IDEDataModelDiagramEditor + IDEDataModelEditor + NSTabView + + + + browserViewController + IDEDataModelBrowserEditor + + + diagramViewController + IDEDataModelDiagramEditor + + + parentEditor + IDEDataModelEditor + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEntityContentsEditor.h + + + + IDEDataModelFetchRequestEditor + IDEDMEditorController + + NSArrayController + IDEDataModelEditor + IDECapsuleListView + + + + entityController + NSArrayController + + + parentEditor + IDEDataModelEditor + + + tableView + IDECapsuleListView + + + + IBProjectSource + ./Classes/IDEDataModelFetchRequestEditor.h + + + + IDEDataModelPropertiesTableController + IDEDMEditorController + + IDEDMArrayController + NSTableColumn + NSArrayController + IDEDataModelBrowserEditor + IDEDMHighlightImageAndTextCell + XDTableView + + + + arrayController + IDEDMArrayController + + + entitiesColumn + NSTableColumn + + + entityArrayController + NSArrayController + + + parentEditor + IDEDataModelBrowserEditor + + + propertyNameAndImageCell + IDEDMHighlightImageAndTextCell + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelPropertiesTableController.h + + + + IDEDocDownloadsTableViewController + NSObject + + NSButtonCell + DVTTableView + IDEDocViewingPrefPaneController + + + + _downloadButtonCell + NSButtonCell + + + _tableView + DVTTableView + + + prefPaneController + IDEDocViewingPrefPaneController + + + + IBProjectSource + ./Classes/IDEDocDownloadsTableViewController.h + + + + IDEDocViewingPrefPaneController + IDEViewController + + id + id + id + id + id + id + id + id + id + id + id + + + + addSubscription: + id + + + checkForAndInstallUpdatesNow: + id + + + deleteDocSet: + id + + + downloadAction: + id + + + minimumFontSizeComboBoxAction: + id + + + minimumFontSizeEnabledAction: + id + + + showHelp: + id + + + showSubscriptionSheet: + id + + + subscriptionCancelAction: + id + + + toggleAutoCheckForAndInstallUpdates: + id + + + toggleDocSetInfo: + id + + + + DVTGradientImageButton + DVTGradientImageButton + DVTGradientImageButton + NSSplitView + NSView + NSView + DVTBorderedView + DVTBorderedView + NSButton + NSTextView + IDEDocDownloadsTableViewController + NSComboBox + NSTextField + NSButton + NSTextField + NSWindow + NSButton + + + + _addButton + DVTGradientImageButton + + + _deleteButton + DVTGradientImageButton + + + _showInfoAreaButton + DVTGradientImageButton + + + _splitView + NSSplitView + + + _splitViewDocSetInfoSubview + NSView + + + _splitViewDocSetsListSubview + NSView + + + borderedViewAroundSplitView + DVTBorderedView + + + borderedViewBelowTable + DVTBorderedView + + + checkAndInstallNowButton + NSButton + + + docSetInfoTextView + NSTextView + + + downloadsTableViewController + IDEDocDownloadsTableViewController + + + minimumFontSizeControl + NSComboBox + + + noUpdatesAvailableMessage + NSTextField + + + showInfoButton + NSButton + + + subscriptionTextField + NSTextField + + + subscriptionWindow + NSWindow + + + validateAddSubscriptionButton + NSButton + + + + IBProjectSource + ./Classes/IDEDocViewingPrefPaneController.h + + + + IDEEditor + IDEViewController + + IBProjectSource + ./Classes/IDEEditor.h + + + + IDEViewController + DVTViewController + + IBProjectSource + ./Classes/IDEViewController.h + + + + IKImageView + + id + id + id + id + + + + copy: + id + + + crop: + id + + + cut: + id + + + paste: + id + + + + IBProjectSource + ./Classes/IKImageView.h + + + + NSDocument + + id + id + id + id + id + id + + + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + IBProjectSource + ./Classes/NSDocument.h + + + + NSDocumentController + + _openRecentDocument: + id + + + _openRecentDocument: + + _openRecentDocument: + id + + + + IBProjectSource + ./Classes/NSDocumentController.h + + + + NSResponder + + _insertFindPattern: + id + + + _insertFindPattern: + + _insertFindPattern: + id + + + + IBProjectSource + ./Classes/NSResponder.h + + + + QLPreviewBubble + NSObject + + id + id + + + + hide: + id + + + show: + id + + + + parentWindow + NSWindow + + + parentWindow + + parentWindow + NSWindow + + + + IBProjectSource + ./Classes/QLPreviewBubble.h + + + + QTMovieView + + id + id + id + id + id + + + + showAll: + id + + + showCustomButton: + id + + + toggleLoops: + id + + + zoomIn: + id + + + zoomOut: + id + + + + IBProjectSource + ./Classes/QTMovieView.h + + + + WebView + + id + id + id + id + + + + reloadFromOrigin: + id + + + resetPageZoom: + id + + + zoomPageIn: + id + + + zoomPageOut: + id + + + + IBProjectSource + ./Classes/WebView.h + + + + XDDiagramView + NSView + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + _graphLayouterMenuItemAction: + id + + + _zoomPopUpButtonAction: + id + + + alignBottomEdges: + id + + + alignCentersHorizontallyInContainer: + id + + + alignCentersVerticallyInContainer: + id + + + alignHorizontalCenters: + id + + + alignLeftEdges: + id + + + alignRightEdges: + id + + + alignTopEdges: + id + + + alignVerticalCenters: + id + + + bringToFront: + id + + + collapseAllCompartments: + id + + + copy: + id + + + cut: + id + + + delete: + id + + + deleteBackward: + id + + + deleteForward: + id + + + deselectAll: + id + + + diagramZoomIn: + id + + + diagramZoomOut: + id + + + expandAllCompartments: + id + + + flipHorizontally: + id + + + flipVertically: + id + + + layoutGraphicsConcentrically: + id + + + layoutGraphicsHierarchically: + id + + + lock: + id + + + makeSameHeight: + id + + + makeSameWidth: + id + + + moveDown: + id + + + moveDownAndModifySelection: + id + + + moveLeft: + id + + + moveLeftAndModifySelection: + id + + + moveRight: + id + + + moveRightAndModifySelection: + id + + + moveUp: + id + + + moveUpAndModifySelection: + id + + + paste: + id + + + rollDownAllCompartments: + id + + + rollUpAllCompartments: + id + + + selectAll: + id + + + sendToBack: + id + + + sizeToFit: + id + + + toggleGridShown: + id + + + toggleHiddenGraphicsShown: + id + + + togglePageBreaksShown: + id + + + toggleRuler: + id + + + toggleSnapsToGrid: + id + + + unlock: + id + + + + _diagramController + IDEDataModelDiagramEditor + + + _diagramController + + _diagramController + IDEDataModelDiagramEditor + + + + IBProjectSource + ./Classes/XDDiagramView.h + + + + XDTableView + NSTableView + + showAllTableColumns: + id + + + showAllTableColumns: + + showAllTableColumns: + id + + + + IBProjectSource + ./Classes/XDTableView.h + + + + + 0 + IBCocoaFramework + YES + 3 + + {11, 11} + {10, 3} + + YES + + diff --git a/iDNA/iDNA/en.lproj/iDNADocument.xib b/iDNA/iDNA/en.lproj/iDNADocument.xib new file mode 100644 index 0000000..fa36ac6 --- /dev/null +++ b/iDNA/iDNA/en.lproj/iDNADocument.xib @@ -0,0 +1,2296 @@ + + + + 1080 + 12C60 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + IBNSLayoutConstraint + NSButton + NSButtonCell + NSCustomObject + NSNumberFormatter + NSSlider + NSSliderCell + NSTextField + NSTextFieldCell + NSUserDefaultsController + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + iDNADocument + + + FirstResponder + + + 15 + 2 + {{630, 465}, {507, 357}} + 1886912512 + iDNA + NSWindow + View + + {94, 86} + + + 256 + + + + 268 + {{26, 320}, {93, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Poplation size + + LucidaGrande + 13 + 1044 + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + + + + 268 + {{42, 288}, {77, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + DNA length + + _NS:1535 + + + + + NO + + + + 268 + {{17, 256}, {102, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Mutation rate % + + _NS:1535 + + + + + NO + + + + 268 + {{200, 254}, {289, 21}} + + + + _NS:9 + YES + + -2080374784 + 0 + + _NS:9 + + 100 + 0.0 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{200, 318}, {289, 21}} + + + + _NS:9 + YES + + -2080374784 + 0 + + _NS:9 + + 10000 + 1 + 1 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{200, 286}, {289, 21}} + + + + _NS:9 + YES + + -2080374784 + 0 + + _NS:9 + + 100 + 1 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{14, 13}, {132, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Start evolution + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{146, 13}, {77, 32}} + + + + _NS:9 + YES + + 603979776 + 134217728 + Pause + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{359, 13}, {134, 32}} + + + _NS:9 + YES + + 67108864 + 134217728 + Load goal DNA + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{17, 170}, {297, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Current generation best individual match - 0% + + _NS:1535 + + + + + NO + + + + 268 + {{18, 49}, {469, 103}} + + + + _NS:9 + YES + + -2074083327 + 272629760 + + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + NO + + + + 268 + {{124, 251}, {62, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{124, 283}, {62, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{124, 315}, {62, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{17, 223}, {103, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Generation - 1 + + LucidaGrande-Bold + 13 + 2072 + + _NS:1535 + + + + + NO + + + + 268 + {{17, 198}, {221, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Overall best individual match - 0% + + _NS:1535 + + + + + NO + + + {507, 357} + + + + + {{0, 0}, {1920, 1178}} + {94, 108} + {10000000000000, 10000000000000} + YES + + + NSApplication + + + YES + + + + + + + window + + + + 18 + + + + goalDNAText + + + + 100338 + + + + startEvolutionClicked: + + + + 100353 + + + + pauseClicked: + + + + 100355 + + + + populationSizeText + + + + 100357 + + + + DNALengthText + + + + 100358 + + + + mutationRateText + + + + 100359 + + + + populationSizeSlider + + + + 100360 + + + + DNALengthSlider + + + + 100361 + + + + mutationRateSlider + + + + 100362 + + + + startEvolution + + + + 100363 + + + + pause + + + + 100364 + + + + populationPropertiesText + + + + 100365 + + + + populationPropertiesSlider + + + + 100366 + + + + loadGoalDNA + + + + 100367 + + + + generation + + + + 100384 + + + + overallBestMatch + + + + 100407 + + + + bestMatch + + + + 100408 + + + + loadGoalDNAClicked: + + + + 100410 + + + + delegate + + + + 17 + + + + value: self.mutationRate + + + + + + value: self.mutationRate + value + self.mutationRate + 2 + + + 100325 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + + NSValidatesImmediately + + + 2 + + + 100321 + + + + value: self.DNALength + + + + + + value: self.DNALength + value + self.DNALength + 2 + + + 100328 + + + + value: self.goalDNA.description + + + + + + value: self.goalDNA.description + value + self.goalDNA.description + 2 + + + 100337 + + + + value: self.mutationRate + + + + + + value: self.mutationRate + value + self.mutationRate + 2 + + + 100331 + + + + value: self.DNALength + + + + + + value: self.DNALength + value + self.DNALength + 2 + + + 100334 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + + NSValidatesImmediately + + + 2 + + + 100322 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + + + + Window + + + 6 + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 6 + 1 + + 12 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 117 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + + + + + + + + + + + + + + + + + + -3 + + + Application + + + 100029 + + + + + + + + 100030 + + + + + 100032 + + + + + 100033 + + + + + + + + 100034 + + + + + 100037 + + + + + + + + 100038 + + + + + 100057 + + + + + + + + 100058 + + + + + 100064 + + + + + + 7 + 0 + + 0 + 1 + + 285 + + 1000 + + 3 + 9 + 1 + + + + + + 100065 + + + + + 100069 + + + + + + + + 100071 + + + + + 100108 + + + + + 100112 + + + + + 100113 + + + + + 100116 + + + + + 100118 + + + + + 100120 + + + + + 100121 + + + + + + + + 100122 + + + + + 100125 + + + + + + + + 100126 + + + + + 100129 + + + + + + + + 100130 + + + + + 100133 + + + + + + + + 100134 + + + + + 100166 + + + + + + 8 + 0 + + 0 + 1 + + 103 + + 1000 + + 3 + 9 + 1 + + + + 7 + 0 + + 0 + 1 + + 469 + + 1000 + + 3 + 9 + 1 + + + + + + 100167 + + + + + 100192 + + + + + 100200 + + + + + 100202 + + + + + 100203 + + + + + 100229 + + + + + 100231 + + + + + 100235 + + + + + 100236 + + + + + 100237 + + + + + 100243 + + + + + 100258 + + + + + + + + 100259 + + + + + + + + 100260 + + + + + 100262 + + + + + 100265 + + + + + 100269 + + + + + + + + 100271 + + + + + + + + 100272 + + + + + 100273 + + + + + 100274 + + + + + 100275 + + + + + 100276 + + + + + 100278 + + + + + + 7 + 0 + + 0 + 1 + + 62 + + 1000 + + 3 + 9 + 1 + + + + + + 100279 + + + + + + + + 100281 + + + + + 100282 + + + + + 100283 + + + + + 100284 + + + + + 100285 + + + + + 100286 + + + + + 100287 + + + + + 100350 + + + + + 100351 + + + + + 100352 + + + + + 100369 + + + + + 100370 + + + + + 100371 + + + + + + + + 100372 + + + + + 100386 + + + + + + + + 100387 + + + + + 100389 + + + + + 100392 + + + + + 100393 + + + + + 100395 + + + + + 100402 + + + + + 100404 + + + + + 100405 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{133, 170}, {507, 413}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 100410 + + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + iDNADocument + NSDocument + + NSButton + NSButton + NSButton + + + + loadGoalDNAClicked: + NSButton + + + pauseClicked: + NSButton + + + startEvolutionClicked: + NSButton + + + + NSSlider + NSTextField + NSTextField + NSTextField + NSTextField + NSButton + NSSlider + NSTextField + NSTextField + NSButton + NSSlider + NSTextField + NSSlider + NSTextField + NSButton + + + + DNALengthSlider + NSSlider + + + DNALengthText + NSTextField + + + bestMatch + NSTextField + + + generation + NSTextField + + + goalDNAText + NSTextField + + + loadGoalDNA + NSButton + + + mutationRateSlider + NSSlider + + + mutationRateText + NSTextField + + + overallBestMatch + NSTextField + + + pause + NSButton + + + populationPropertiesSlider + NSSlider + + + populationPropertiesText + NSTextField + + + populationSizeSlider + NSSlider + + + populationSizeText + NSTextField + + + startEvolution + NSButton + + + + IBProjectSource + ./Classes/iDNADocument.h + + + + + 0 + IBCocoaFramework + YES + 3 + YES + + diff --git a/iDNA/iDNA/iDNA-Info.plist b/iDNA/iDNA/iDNA-Info.plist new file mode 100644 index 0000000..1655557 --- /dev/null +++ b/iDNA/iDNA/iDNA-Info.plist @@ -0,0 +1,55 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + dna + + CFBundleTypeIconFile + + CFBundleTypeName + DocumentType + CFBundleTypeOSTypes + + ???? + + CFBundleTypeRole + Editor + NSDocumentClass + iDNADocument + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + ac1d.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2013 Администратор. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/iDNA/iDNA/iDNA-Prefix.pch b/iDNA/iDNA/iDNA-Prefix.pch new file mode 100644 index 0000000..41eaf80 --- /dev/null +++ b/iDNA/iDNA/iDNA-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'iDNA' target in the 'iDNA' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/iDNA/iDNA/iDNADocument.h b/iDNA/iDNA/iDNADocument.h new file mode 100644 index 0000000..6f89173 --- /dev/null +++ b/iDNA/iDNA/iDNADocument.h @@ -0,0 +1,44 @@ +// +// iDNADocument.h +// iDNA +// +// Created by Администратор on 1/5/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import +#import "Cell.h" +#import "Population.h" + +@interface iDNADocument : NSDocument { + Cell *goalDNA; + Population *p; + + int populationSize; + int DNALength; + int mutationRate; +} + +@property (weak) IBOutlet NSTextField *populationSizeText; +@property (weak) IBOutlet NSTextField *DNALengthText; +@property (weak) IBOutlet NSTextField *mutationRateText; + +@property (weak) IBOutlet NSSlider *populationSizeSlider; +@property (weak) IBOutlet NSSlider *DNALengthSlider; +@property (weak) IBOutlet NSSlider *mutationRateSlider; + +@property (weak) IBOutlet NSTextField *generation; +@property (weak) IBOutlet NSTextField *overallBestMatch; +@property (weak) IBOutlet NSTextField *bestMatch; + +@property (weak) IBOutlet NSTextField *goalDNAText; + +@property (weak) IBOutlet NSButton *startEvolution; +@property (weak) IBOutlet NSButton *pause; +@property (weak) IBOutlet NSButton *loadGoalDNA; + +- (IBAction)startEvolutionClicked:(NSButton *)sender; +- (IBAction)pauseClicked:(NSButton *)sender; +- (IBAction)loadGoalDNAClicked:(NSButton *)sender; + +@end diff --git a/iDNA/iDNA/iDNADocument.m b/iDNA/iDNA/iDNADocument.m new file mode 100644 index 0000000..ad108e9 --- /dev/null +++ b/iDNA/iDNA/iDNADocument.m @@ -0,0 +1,180 @@ +// +// iDNADocument.m +// iDNA +// +// Created by Администратор on 1/5/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import "iDNADocument.h" +#import "ResultController.h" + +@implementation iDNADocument { + BOOL paused; + ResultController *rc; + NSThread *evolutionThread; +} + +@synthesize goalDNAText = _goalDNAText; + +- (id)init +{ + self = [super init]; + if (self) { + populationSize = 1000; + DNALength = 30; + mutationRate = 5; + + goalDNA = [[Cell alloc] initWithLength: DNALength]; + [_goalDNAText setStringValue: [goalDNA description]]; + + [self addObserver:self forKeyPath:@"DNALength" options:NSKeyValueObservingOptionOld context:@"DNALengthChanged"]; + } + return self; +} + +- (void)dealloc { + [self removeObserver:self forKeyPath:@"DNALength"]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (context == @"DNALengthChanged") { // изменился размер целевой ДНК - перегенерируем новую + [goalDNA changeLength: DNALength]; + [_goalDNAText setStringValue: [goalDNA description]]; + } +} + +- (NSString *)windowNibName +{ + // Override returning the nib file name of the document + // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead. + return @"iDNADocument"; +} + +- (void)windowControllerDidLoadNib:(NSWindowController *)aController +{ + [super windowControllerDidLoadNib:aController]; + // Add any code here that needs to be executed once the windowController has loaded the document's window. + +} + ++ (BOOL)autosavesInPlace +{ + return YES; +} + +- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError +{ + return [[_goalDNAText stringValue] dataUsingEncoding: NSUTF8StringEncoding]; +} + +- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError +{ +// NSString *s = nil; +// @try { +// s = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; +// } +// @catch (NSException *e) { +// if (outError) { +// NSDictionary *d = [NSDictionary dictionaryWithObject:@"The file is invalid" forKey:NSLocalizedFailureReasonErrorKey]; +// *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:d]; +// return NO; +// } +// } +// if ([s length] != DNALength) { +// NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Length of loaded GoalDNA must be %i elements", DNALength]; +// [alert beginSheetModalForWindow:[self windowForSheet] modalDelegate:self didEndSelector:nil contextInfo:NULL]; +// return NO; +// } +// goalDNA = [[Cell alloc] initWithString: s]; +// [_goalDNAText setStringValue:s]; + return YES; +} + +- (void) evolution { + int bestMatch = 0, overallBestMatch = 0, bestDistance = 0, generation = 0; + BOOL found = NO; + + while (!found) { + if (!paused) { + generation++; + + [p sortToGoalDNA]; + + bestDistance = [[p.population objectAtIndex: 0] hammingDistance:goalDNA]; + bestMatch = 100 - 100 * bestDistance / DNALength; + + if (bestMatch > overallBestMatch) { + overallBestMatch = bestMatch; + [_overallBestMatch setStringValue: [NSString stringWithFormat:@"Overall best individual match - %i%%", overallBestMatch]]; + } + + [_generation setStringValue: [NSString stringWithFormat:@"Generation - %i", generation]]; + [_bestMatch setStringValue: [NSString stringWithFormat:@"Current generation best individual match - %i%%", bestMatch]]; + + [p crossPopulationTopPercent:50]; + [p mutate:mutationRate]; + + if (bestDistance == 0) found = YES; + } + } + // вышли из цикла - приводим контролы в прежнее положенее + [_populationSizeText setEnabled:YES]; + [_populationSizeSlider setEnabled:YES]; + [_DNALengthText setEnabled:YES]; + [_DNALengthSlider setEnabled:YES]; + [_mutationRateText setEnabled:YES]; + [_mutationRateSlider setEnabled:YES]; + + [_startEvolution setEnabled:YES]; + [_loadGoalDNA setEnabled:YES]; + [_pause setEnabled:NO]; + + // показываем панель с ркзультатом + rc = [[ResultController alloc] initWithGeneration:generation]; + [rc showWindow: self]; +} + +- (IBAction)startEvolutionClicked:(NSButton *)sender { + p = [[Population alloc] initWithSize:populationSize andDNALength:DNALength andGoalDNA:goalDNA]; + + [_populationSizeText setEnabled:NO]; + [_populationSizeSlider setEnabled:NO]; + [_DNALengthText setEnabled:NO]; + [_DNALengthSlider setEnabled:NO]; + [_mutationRateText setEnabled:NO]; + [_mutationRateSlider setEnabled:NO]; + + [_startEvolution setEnabled:NO]; + [_loadGoalDNA setEnabled:NO]; + [_pause setEnabled:YES]; + + paused = NO; + + evolutionThread = [[NSThread alloc] initWithTarget:self selector:@selector(evolution) object:nil]; + [evolutionThread start]; + //[self performSelectorInBackground:@selector(evolution) withObject:nil]; +} + +- (IBAction)pauseClicked:(NSButton *)sender { + paused = !paused; + if (paused) [_pause setTitle:@"Continue"]; + else [_pause setTitle:@"Pause"]; +} + +- (IBAction)loadGoalDNAClicked:(NSButton *)sender { + NSOpenPanel *goalDNAOpenPanel = [NSOpenPanel openPanel]; + NSInteger result = [goalDNAOpenPanel runModal]; + if (result == NSOKButton) { + NSString *s = [NSString stringWithContentsOfURL:[goalDNAOpenPanel URL] encoding:NSUTF8StringEncoding error:nil]; + if ([s length] != DNALength) { + NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Length of goal DNA must be equal %i elements", DNALength]; + [alert beginSheetModalForWindow:[self windowForSheet] modalDelegate:self didEndSelector:nil contextInfo:NULL]; + } + else { + goalDNA = [[Cell alloc] initWithString: s]; + [_goalDNAText setStringValue:s]; + } + } +} +@end diff --git a/iDNA/iDNA/main.m b/iDNA/iDNA/main.m new file mode 100644 index 0000000..815292a --- /dev/null +++ b/iDNA/iDNA/main.m @@ -0,0 +1,14 @@ +// +// main.m +// iDNA +// +// Created by Администратор on 1/5/13. +// Copyright (c) 2013 Администратор. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +}