aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataImport.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDataImport.m')
-rw-r--r--Source/SPDataImport.m69
1 files changed, 34 insertions, 35 deletions
diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m
index d1b2b67a..e5d7e36c 100644
--- a/Source/SPDataImport.m
+++ b/Source/SPDataImport.m
@@ -45,10 +45,10 @@
#define SP_FILE_READ_ERROR_STRING NSLocalizedString(@"File read error", @"File read error title (Import Dialog)")
-@interface SPDataImport (PrivateAPI)
+@interface SPDataImport ()
-- (void) _importBackgroundProcess:(NSString *)filename;
-- (void) _resetFieldMappingGlobals;
+- (void)_importBackgroundProcess:(NSString *)filename;
+- (void)_resetFieldMappingGlobals;
@end
@@ -1683,56 +1683,29 @@
}
#pragma mark -
-
-/**
- * Dealloc.
- */
-- (void)dealloc
-{
- if (fieldMappingImportArray) [fieldMappingImportArray release];
- if (geometryFields) [geometryFields release];
- if (geometryFieldsMapIndex) [geometryFieldsMapIndex release];
- if (bitFields) [bitFields release];
- if (nullableNumericFields) [nullableNumericFields release];
- if (bitFieldsMapIndex) [bitFieldsMapIndex release];
- if (nullableNumericFieldsMapIndex) [nullableNumericFieldsMapIndex release];
-
- if (lastFilename) [lastFilename release];
- if (prefs) [prefs release];
- if(selectedTableTarget) [selectedTableTarget release];
-
- for (id retainedObject in nibObjectsToRelease) [retainedObject release];
-
- [nibObjectsToRelease release];
-
- [super dealloc];
-}
-
-@end
-
-@implementation SPDataImport (PrivateAPI)
+#pragma mark Private API
/**
* Starts the import process on a background thread.
*/
-- (void) _importBackgroundProcess:(NSString *)filename
+- (void)_importBackgroundProcess:(NSString *)filename
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *fileType = [[importFormatPopup selectedItem] title];
-
+
// Use the appropriate processing function for the file type
if ([fileType isEqualToString:@"SQL"])
[self importSQLFile:filename];
else if ([fileType isEqualToString:@"CSV"])
[self importCSVFile:filename];
-
+
[pool release];
}
/**
* Release and reset any field mapping global variables.
*/
-- (void) _resetFieldMappingGlobals
+- (void)_resetFieldMappingGlobals
{
if (csvImportTailString) [csvImportTailString release], csvImportTailString = nil;
if (csvImportHeaderString) [csvImportHeaderString release], csvImportHeaderString = nil;
@@ -1743,4 +1716,30 @@
if (fieldMapperOperator) [fieldMapperOperator release], fieldMapperOperator = nil;
}
+#pragma mark -
+
+/**
+ * Dealloc.
+ */
+- (void)dealloc
+{
+ if (fieldMappingImportArray) [fieldMappingImportArray release];
+ if (geometryFields) [geometryFields release];
+ if (geometryFieldsMapIndex) [geometryFieldsMapIndex release];
+ if (bitFields) [bitFields release];
+ if (nullableNumericFields) [nullableNumericFields release];
+ if (bitFieldsMapIndex) [bitFieldsMapIndex release];
+ if (nullableNumericFieldsMapIndex) [nullableNumericFieldsMapIndex release];
+
+ if (lastFilename) [lastFilename release];
+ if (prefs) [prefs release];
+ if(selectedTableTarget) [selectedTableTarget release];
+
+ for (id retainedObject in nibObjectsToRelease) [retainedObject release];
+
+ [nibObjectsToRelease release];
+
+ [super dealloc];
+}
+
@end