From ca611b500e4c5b95df5ef6d5c53d8c93b1e8e287 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Thu, 25 Mar 2004 00:05:33 +0000 Subject: [PATCH] Organized the project some. Added some framework XML classes. --- ITFoundation.h | 4 +- ITFoundation.xcode/project.pbxproj | 180 +++++++++++++++++++++++++---- ITXMLNode.h | 18 +++ ITXMLNode.m | 15 +++ ITXMLParser.h | 23 ++++ ITXMLParser.m | 54 +++++++++ 6 files changed, 273 insertions(+), 21 deletions(-) create mode 100755 ITXMLNode.h create mode 100755 ITXMLNode.m create mode 100755 ITXMLParser.h create mode 100755 ITXMLParser.m diff --git a/ITFoundation.h b/ITFoundation.h index cf6ddd9..83e4a16 100755 --- a/ITFoundation.h +++ b/ITFoundation.h @@ -22,4 +22,6 @@ #import #import -#import \ No newline at end of file +#import + +#import \ No newline at end of file diff --git a/ITFoundation.xcode/project.pbxproj b/ITFoundation.xcode/project.pbxproj index 8f5b236..c6bee9e 100755 --- a/ITFoundation.xcode/project.pbxproj +++ b/ITFoundation.xcode/project.pbxproj @@ -87,8 +87,6 @@ 089C1665FE841158C02AAC07, 0867D69AFE84028FC02AAC07, 034768DFFF38A50411DB9C8B, - 3D97138805D9FD6B0033607F, - 3D97138905D9FD6B0033607F, ); isa = PBXGroup; name = ITFoundation; @@ -153,24 +151,14 @@ }; 08FB77AEFE84172EC02AAC07 = { children = ( - 370786C005C0B4D700E6D1BA, - 370786C105C0B4D700E6D1BA, - 37B9B08005C1C47E00702FDB, - 37B9B08105C1C47E00702FDB, - 7CA50B2B054E77950074E1D9, - 7CA50B2C054E77950074E1D9, - 7CA50B2F054E77A00074E1D9, - 7CA50B30054E77A00074E1D9, - 7CA50B80054E786E0074E1D9, - 7CA50B7F054E786E0074E1D9, - 7CA50B8C054E787D0074E1D9, - 7CA50B8B054E787D0074E1D9, - 7CF6C92E057D65B0007FEC13, - 7CF6C92F057D65B0007FEC13, - 7CF6C936057D65BA007FEC13, - 7CF6C937057D65BA007FEC13, - 7C97DC2C05B614300013E85F, - 7C97DC2D05B614300013E85F, + 37B1C51C0612593F00F99008, + 37B1C5280612596900F99008, + 37B1C51F0612594A00F99008, + 37B1C5190612593A00F99008, + 37B1C5160612592F00F99008, + 37B1C5220612595500F99008, + 37B1C5250612596000F99008, + 37B1C52B0612597100F99008, ); isa = PBXGroup; name = Classes; @@ -338,6 +326,154 @@ settings = { }; }; + 37B1C5160612592F00F99008 = { + children = ( + 370786C005C0B4D700E6D1BA, + 370786C105C0B4D700E6D1BA, + 37B9B08005C1C47E00702FDB, + 37B9B08105C1C47E00702FDB, + ); + isa = PBXGroup; + name = ITOSA; + refType = 4; + sourceTree = ""; + }; + 37B1C5190612593A00F99008 = { + children = ( + 7CA50B2F054E77A00074E1D9, + 7CA50B30054E77A00074E1D9, + ); + isa = PBXGroup; + name = ITDebug; + refType = 4; + sourceTree = ""; + }; + 37B1C51C0612593F00F99008 = { + children = ( + 3D97138805D9FD6B0033607F, + 3D97138905D9FD6B0033607F, + 7CA50B2B054E77950074E1D9, + 7CA50B2C054E77950074E1D9, + ); + isa = PBXGroup; + name = ITAppleEvent; + path = ""; + refType = 4; + sourceTree = ""; + }; + 37B1C51F0612594A00F99008 = { + children = ( + 7C97DC2C05B614300013E85F, + 7C97DC2D05B614300013E85F, + ); + isa = PBXGroup; + name = ITCarbonSupport; + path = ""; + refType = 4; + sourceTree = ""; + }; + 37B1C5220612595500F99008 = { + children = ( + 7CF6C92E057D65B0007FEC13, + 7CF6C92F057D65B0007FEC13, + 7CF6C936057D65BA007FEC13, + 7CF6C937057D65BA007FEC13, + ); + isa = PBXGroup; + name = ITPreference; + path = ""; + refType = 4; + sourceTree = ""; + }; + 37B1C5250612596000F99008 = { + children = ( + 7CA50B80054E786E0074E1D9, + 7CA50B7F054E786E0074E1D9, + ); + isa = PBXGroup; + name = ITVMInfo; + refType = 4; + sourceTree = ""; + }; + 37B1C5280612596900F99008 = { + children = ( + 7CA50B8C054E787D0074E1D9, + 7CA50B8B054E787D0074E1D9, + ); + isa = PBXGroup; + name = ITByteStream; + refType = 4; + sourceTree = ""; + }; + 37B1C52B0612597100F99008 = { + children = ( + 37B1C5730612599000F99008, + 37B1C5740612599000F99008, + 37B1C5750612599000F99008, + 37B1C5760612599000F99008, + ); + isa = PBXGroup; + name = ITXML; + path = ""; + refType = 4; + sourceTree = ""; + }; + 37B1C5730612599000F99008 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = ITXMLNode.m; + refType = 4; + sourceTree = ""; + }; + 37B1C5740612599000F99008 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ITXMLParser.h; + refType = 4; + sourceTree = ""; + }; + 37B1C5750612599000F99008 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = ITXMLParser.m; + refType = 4; + sourceTree = ""; + }; + 37B1C5760612599000F99008 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ITXMLNode.h; + refType = 4; + sourceTree = ""; + }; + 37B1C5770612599000F99008 = { + fileRef = 37B1C5730612599000F99008; + isa = PBXBuildFile; + settings = { + }; + }; + 37B1C5780612599000F99008 = { + fileRef = 37B1C5740612599000F99008; + isa = PBXBuildFile; + settings = { + }; + }; + 37B1C5790612599000F99008 = { + fileRef = 37B1C5750612599000F99008; + isa = PBXBuildFile; + settings = { + }; + }; + 37B1C57A0612599000F99008 = { + fileRef = 37B1C5760612599000F99008; + isa = PBXBuildFile; + settings = { + }; + }; 37B9B08005C1C47E00702FDB = { fileEncoding = 4; isa = PBXFileReference; @@ -760,6 +896,8 @@ 3D97137B05D9FB7C0033607F, 3D97137F05D9FBF40033607F, 3D97138A05D9FD6B0033607F, + 37B1C5780612599000F99008, + 37B1C57A0612599000F99008, ); isa = PBXHeadersBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -799,6 +937,8 @@ 3D97137C05D9FB7C0033607F, 3D97138105D9FBFA0033607F, 3D97138B05D9FD6B0033607F, + 37B1C5770612599000F99008, + 37B1C5790612599000F99008, ); isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; diff --git a/ITXMLNode.h b/ITXMLNode.h new file mode 100755 index 0000000..226735a --- /dev/null +++ b/ITXMLNode.h @@ -0,0 +1,18 @@ +#import + +@interface ITXMLNode : NSObject +{ + NSMutableArray *_children; + NSString *_name; +} + +//- (id)initWithSomeStuffHere; +//+ (ITXMLNode *)nodeWithSomeStuffHere; + +//Accessors that I don't know the names of... +- (void)name; +- (NSData *)data; + +- (NSArray *)children; +- (void)addChild:(ITXMLNode *)aChild; +@end \ No newline at end of file diff --git a/ITXMLNode.m b/ITXMLNode.m new file mode 100755 index 0000000..782eb24 --- /dev/null +++ b/ITXMLNode.m @@ -0,0 +1,15 @@ +#import "ITXMLNode.h" + +@implementation ITXMLNode + +- (NSArray *)children +{ + return [NSArray arrayWithArray:_children]; +} + +- (void)addChild:(ITXMLNode *)aChild +{ + [_children addObject:aChild]; +} + +@end \ No newline at end of file diff --git a/ITXMLParser.h b/ITXMLParser.h new file mode 100755 index 0000000..63a6238 --- /dev/null +++ b/ITXMLParser.h @@ -0,0 +1,23 @@ +#import + +@class ITXMLNode; + +@interface ITXMLParser : NSObject +{ + NSString *_source; + NSString *_XMLPathSeparator; +} + +- (id)initWithContentsOfURL:(NSURL *)aURL; +- (id)initWithContentsOfString:(NSString *)aString; + +- (NSString *)source; +- (NSDictionary *)declaration; + +- (ITXMLNode *)rootNode; +- (ITXMLNode *)nodeWithXMLPath:(NSString *)path; + +- (void)setXMLPathSeparator:(NSString *)pathSeparator; +- (NSString *)XMLPathSeparator; + +@end \ No newline at end of file diff --git a/ITXMLParser.m b/ITXMLParser.m new file mode 100755 index 0000000..f96c384 --- /dev/null +++ b/ITXMLParser.m @@ -0,0 +1,54 @@ +#import "ITXMLParser.m" +#import "ITXMLNode.m" + +@implementation ITXMLParser + +- (id)initWithContentsOfURL:(NSURL *)aURL +{ + if ( (self = [super init]) ) { + _source = [[NSString alloc] initWithContentsOfURL:aURL]; + _XMLPathSeparator = @"/"; + } +} + +- (id)initWithContentsOfString:(NSString *)aString +{ + if ( (self = [super init]) ) { + _source = [aString copy]; + _XMLPathSeparator = @"/" + } +} + +- (void)dealloc +{ + [_source release]; + [_XMLPathSeparator release]; +} + +- (NSString *)source +{ + return _source; +} + +- (NSDictionary *)declaration +{ + return nil; +} + +- (ITXMLNode *)nodeWithXMLPath +{ + return nil; +} + +- (void)setXMLPathSeparator:(NSString *)pathSeparator +{ + [_XMLPathSeparator autorelease]; + _XMLPathSeparator = [pathSeparator copy]; +} + +- (NSString *)XMLPathSeparator +{ + return _XMLPathSeparator; +} + +@end \ No newline at end of file -- 2.20.1