Kaynağa Gözat

Re-jigger directory structure.

Sam Jaffe 5 yıl önce
ebeveyn
işleme
8a3757fac4

trie.hpp → include/trie/trie.hpp


trie.tpp → include/trie/trie.tpp


trie_iterator.hpp → include/trie/trie_iterator.hpp


+ 1 - 1
trie_test.cpp

@@ -8,7 +8,7 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
-#include "trie.hpp"
+#include "trie/trie.hpp"
 
 class TrieTest : public ::testing::Test {
 protected:

+ 2 - 4
trie_test/Info.plist

@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
@@ -13,11 +13,9 @@
 	<key>CFBundleName</key>
 	<string>$(PRODUCT_NAME)</string>
 	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
+	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
 	<key>CFBundleShortVersionString</key>
 	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 </dict>

+ 89 - 168
trie.xcodeproj/project.pbxproj

@@ -7,13 +7,8 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		CD0C596320C2DC3200454F82 /* GoogleMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD0C594D20C2DBE700454F82 /* GoogleMock.framework */; };
-		CD0C596420C2DC3800454F82 /* trie_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD0C595420C2DBFB00454F82 /* trie_test.cpp */; };
-		CD0C596D20C2E9DE00454F82 /* trie.tpp in Headers */ = {isa = PBXBuildFile; fileRef = CD46DF481EF47C520092D121 /* trie.tpp */; };
-		CD0C596E20C2E9E300454F82 /* trie.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD46DF451EF3FDCE0092D121 /* trie.hpp */; };
-		CD0C596F20C2E9E300454F82 /* trie_iterator.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD46DF4A1EF497E30092D121 /* trie_iterator.hpp */; };
-		CD0C597420C2EA7300454F82 /* trie_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD0C597320C2EA7300454F82 /* trie_dummy.cpp */; };
-		CD0C597920C2EAFA00454F82 /* libtrie.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CD0C596920C2E9CE00454F82 /* libtrie.dylib */; };
+		CDCB3C2024E381270029B771 /* trie_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD0C595420C2DBFB00454F82 /* trie_test.cpp */; };
+		CDCB3C2224E381300029B771 /* GoogleMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD0C594D20C2DBE700454F82 /* GoogleMock.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -45,48 +40,29 @@
 			remoteGlobalIDString = 05818F901A685AEA0072A469;
 			remoteInfo = GoogleMockTests;
 		};
-		CD0C596120C2DC2D00454F82 /* PBXContainerItemProxy */ = {
+		CDCB3C2324E381340029B771 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = CD0C594520C2DBE700454F82 /* GoogleMock.xcodeproj */;
 			proxyType = 1;
 			remoteGlobalIDString = 05818F851A685AEA0072A469;
 			remoteInfo = GoogleMock;
 		};
-		CD0C597020C2EA1400454F82 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = CD46DF2F1EF3FD540092D121 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = CD0C596820C2E9CE00454F82;
-			remoteInfo = trie;
-		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
 		CD0C594520C2DBE700454F82 /* GoogleMock.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GoogleMock.xcodeproj; path = "../../../gmock-xcode-master/GoogleMock.xcodeproj"; sourceTree = "<group>"; };
 		CD0C595420C2DBFB00454F82 /* trie_test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = trie_test.cpp; sourceTree = "<group>"; };
-		CD0C595920C2DC1D00454F82 /* trie_test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = trie_test.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
-		CD0C595D20C2DC1D00454F82 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = trie_test/Info.plist; sourceTree = "<group>"; };
-		CD0C596920C2E9CE00454F82 /* libtrie.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libtrie.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
-		CD0C597320C2EA7300454F82 /* trie_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = trie_dummy.cpp; sourceTree = "<group>"; };
-		CD46DF451EF3FDCE0092D121 /* trie.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = trie.hpp; sourceTree = "<group>"; };
-		CD46DF481EF47C520092D121 /* trie.tpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = trie.tpp; sourceTree = "<group>"; };
-		CD46DF4A1EF497E30092D121 /* trie_iterator.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = trie_iterator.hpp; sourceTree = "<group>"; };
+		CDCB3C1224E380D80029B771 /* trie */ = {isa = PBXFileReference; lastKnownFileType = folder; name = trie; path = include/trie; sourceTree = "<group>"; };
+		CDCB3C1824E3811E0029B771 /* trie-test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "trie-test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		CDCB3C1C24E3811E0029B771 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
-		CD0C595620C2DC1D00454F82 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				CD0C597920C2EAFA00454F82 /* libtrie.dylib in Frameworks */,
-				CD0C596320C2DC3200454F82 /* GoogleMock.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		CD0C596620C2E9CE00454F82 /* Frameworks */ = {
+		CDCB3C1524E3811E0029B771 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				CDCB3C2224E381300029B771 /* GoogleMock.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -108,17 +84,18 @@
 			isa = PBXGroup;
 			children = (
 				CD0C594520C2DBE700454F82 /* GoogleMock.xcodeproj */,
-				CD46DF421EF3FD6D0092D121 /* src */,
+				CDCB3C1224E380D80029B771 /* trie */,
 				CD46DF411EF3FD670092D121 /* test */,
+				CDCB3C1924E3811E0029B771 /* trie-test */,
 				CD46DF381EF3FD540092D121 /* Products */,
+				CDCB3C2124E381300029B771 /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
 		CD46DF381EF3FD540092D121 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				CD0C595920C2DC1D00454F82 /* trie_test.xctest */,
-				CD0C596920C2E9CE00454F82 /* libtrie.dylib */,
+				CDCB3C1824E3811E0029B771 /* trie-test.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -127,74 +104,46 @@
 			isa = PBXGroup;
 			children = (
 				CD0C595420C2DBFB00454F82 /* trie_test.cpp */,
-				CD0C595D20C2DC1D00454F82 /* Info.plist */,
 			);
-			name = test;
+			path = test;
 			sourceTree = "<group>";
 		};
-		CD46DF421EF3FD6D0092D121 /* src */ = {
+		CDCB3C1924E3811E0029B771 /* trie-test */ = {
 			isa = PBXGroup;
 			children = (
-				CD46DF451EF3FDCE0092D121 /* trie.hpp */,
-				CD46DF4A1EF497E30092D121 /* trie_iterator.hpp */,
-				CD46DF481EF47C520092D121 /* trie.tpp */,
-				CD0C597320C2EA7300454F82 /* trie_dummy.cpp */,
+				CDCB3C1C24E3811E0029B771 /* Info.plist */,
 			);
-			name = src;
+			path = "trie-test";
 			sourceTree = "<group>";
 		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		CD0C596720C2E9CE00454F82 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				CD0C596E20C2E9E300454F82 /* trie.hpp in Headers */,
-				CD0C596D20C2E9DE00454F82 /* trie.tpp in Headers */,
-				CD0C596F20C2E9E300454F82 /* trie_iterator.hpp in Headers */,
+		CDCB3C2124E381300029B771 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
 			);
-			runOnlyForDeploymentPostprocessing = 0;
+			name = Frameworks;
+			sourceTree = "<group>";
 		};
-/* End PBXHeadersBuildPhase section */
+/* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		CD0C595820C2DC1D00454F82 /* trie_test */ = {
+		CDCB3C1724E3811E0029B771 /* trie-test */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = CD0C595E20C2DC1D00454F82 /* Build configuration list for PBXNativeTarget "trie_test" */;
+			buildConfigurationList = CDCB3C1D24E3811E0029B771 /* Build configuration list for PBXNativeTarget "trie-test" */;
 			buildPhases = (
-				CD0C595520C2DC1D00454F82 /* Sources */,
-				CD0C595620C2DC1D00454F82 /* Frameworks */,
-				CD0C595720C2DC1D00454F82 /* Resources */,
+				CDCB3C1424E3811E0029B771 /* Sources */,
+				CDCB3C1524E3811E0029B771 /* Frameworks */,
+				CDCB3C1624E3811E0029B771 /* Resources */,
 			);
 			buildRules = (
 			);
 			dependencies = (
-				CD0C597120C2EA1400454F82 /* PBXTargetDependency */,
-				CD0C596220C2DC2D00454F82 /* PBXTargetDependency */,
+				CDCB3C2424E381340029B771 /* PBXTargetDependency */,
 			);
-			name = trie_test;
-			productName = trie_test;
-			productReference = CD0C595920C2DC1D00454F82 /* trie_test.xctest */;
+			name = "trie-test";
+			productName = "trie-test";
+			productReference = CDCB3C1824E3811E0029B771 /* trie-test.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
-		CD0C596820C2E9CE00454F82 /* trie */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = CD0C596A20C2E9CF00454F82 /* Build configuration list for PBXNativeTarget "trie" */;
-			buildPhases = (
-				CD0C596520C2E9CE00454F82 /* Sources */,
-				CD0C596620C2E9CE00454F82 /* Frameworks */,
-				CD0C596720C2E9CE00454F82 /* Headers */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = trie;
-			productName = trie;
-			productReference = CD0C596920C2E9CE00454F82 /* libtrie.dylib */;
-			productType = "com.apple.product-type.library.dynamic";
-		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -204,11 +153,9 @@
 				LastUpgradeCheck = 1030;
 				ORGANIZATIONNAME = "Sam Jaffe";
 				TargetAttributes = {
-					CD0C595820C2DC1D00454F82 = {
-						CreatedOnToolsVersion = 7.2.1;
-					};
-					CD0C596820C2E9CE00454F82 = {
-						CreatedOnToolsVersion = 7.2.1;
+					CDCB3C1724E3811E0029B771 = {
+						CreatedOnToolsVersion = 11.3.1;
+						ProvisioningStyle = Automatic;
 					};
 				};
 			};
@@ -231,8 +178,7 @@
 			);
 			projectRoot = "";
 			targets = (
-				CD0C595820C2DC1D00454F82 /* trie_test */,
-				CD0C596820C2E9CE00454F82 /* trie */,
+				CDCB3C1724E3811E0029B771 /* trie-test */,
 			);
 		};
 /* End PBXProject section */
@@ -269,7 +215,7 @@
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
-		CD0C595720C2DC1D00454F82 /* Resources */ = {
+		CDCB3C1624E3811E0029B771 /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
@@ -279,82 +225,25 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
-		CD0C595520C2DC1D00454F82 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				CD0C596420C2DC3800454F82 /* trie_test.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		CD0C596520C2E9CE00454F82 /* Sources */ = {
+		CDCB3C1424E3811E0029B771 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD0C597420C2EA7300454F82 /* trie_dummy.cpp in Sources */,
+				CDCB3C2024E381270029B771 /* trie_test.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
-		CD0C596220C2DC2D00454F82 /* PBXTargetDependency */ = {
+		CDCB3C2424E381340029B771 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			name = GoogleMock;
-			targetProxy = CD0C596120C2DC2D00454F82 /* PBXContainerItemProxy */;
-		};
-		CD0C597120C2EA1400454F82 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = CD0C596820C2E9CE00454F82 /* trie */;
-			targetProxy = CD0C597020C2EA1400454F82 /* PBXContainerItemProxy */;
+			targetProxy = CDCB3C2324E381340029B771 /* PBXContainerItemProxy */;
 		};
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
-		CD0C595F20C2DC1D00454F82 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
-				COMBINE_HIDPI_IMAGES = YES;
-				INFOPLIST_FILE = trie_test/Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.trie-test";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		CD0C596020C2DC1D00454F82 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
-				COMBINE_HIDPI_IMAGES = YES;
-				INFOPLIST_FILE = trie_test/Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
-				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.trie-test";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		CD0C596B20C2E9CF00454F82 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				EXECUTABLE_PREFIX = lib;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		CD0C596C20C2E9CF00454F82 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				EXECUTABLE_PREFIX = lib;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
 		CD46DF3C1EF3FD540092D121 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -406,7 +295,7 @@
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "../iterator/include/ ../../types";
+				USER_HEADER_SEARCH_PATHS = "include/ ../iterator/include/ ../../types";
 			};
 			name = Debug;
 		};
@@ -454,36 +343,68 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "../iterator/include/ ../../types";
+				USER_HEADER_SEARCH_PATHS = "include/ ../iterator/include/ ../../types";
+			};
+			name = Release;
+		};
+		CDCB3C1E24E3811E0029B771 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				INFOPLIST_FILE = "trie-test/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.trie-test";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		CDCB3C1F24E3811E0029B771 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				INFOPLIST_FILE = "trie-test/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MTL_FAST_MATH = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.trie-test";
+				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Release;
 		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		CD0C595E20C2DC1D00454F82 /* Build configuration list for PBXNativeTarget "trie_test" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				CD0C595F20C2DC1D00454F82 /* Debug */,
-				CD0C596020C2DC1D00454F82 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		CD0C596A20C2E9CF00454F82 /* Build configuration list for PBXNativeTarget "trie" */ = {
+		CD46DF321EF3FD540092D121 /* Build configuration list for PBXProject "trie" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				CD0C596B20C2E9CF00454F82 /* Debug */,
-				CD0C596C20C2E9CF00454F82 /* Release */,
+				CD46DF3C1EF3FD540092D121 /* Debug */,
+				CD46DF3D1EF3FD540092D121 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		CD46DF321EF3FD540092D121 /* Build configuration list for PBXProject "trie" */ = {
+		CDCB3C1D24E3811E0029B771 /* Build configuration list for PBXNativeTarget "trie-test" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				CD46DF3C1EF3FD540092D121 /* Debug */,
-				CD46DF3D1EF3FD540092D121 /* Release */,
+				CDCB3C1E24E3811E0029B771 /* Debug */,
+				CDCB3C1F24E3811E0029B771 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;

+ 0 - 11
trie_dummy.cpp

@@ -1,11 +0,0 @@
-//
-//  trie_dummy.cpp
-//  trie
-//
-//  Created by Sam Jaffe on 6/2/18.
-//
-
-#include "trie.hpp"
-
-
-template class trie<int, int>;