PONSO: NSSet-based templates, improved inverse relationship logic #68

Merged
merged 7 commits into from Dec 1, 2011
Jump to file
+3,840 −12
Split
View
2 contributed templates/Nikita Zhuk/ponso/code/ModelObject.h
@@ -24,7 +24,7 @@
#import <Foundation/Foundation.h>
-@interface ModelObject : NSObject <NSCopying>
+@interface ModelObject : NSObject <NSCopying, NSCoding>
{
NSDictionary *sourceDictionaryRepresentation;
}
View
16 contributed templates/Nikita Zhuk/ponso/code/ModelObject.m
@@ -22,6 +22,22 @@
@implementation ModelObject
+- (id) initWithCoder: (NSCoder*) aDecoder
+{
+ self = [super init];
+ if (self) {
+ // Superclass implementation:
+ // If we add ivars/properties, here's where we'll load them
+ }
+ return self;
+}
+
+- (void) encodeWithCoder: (NSCoder*) aCoder
+{
+ // Superclass implementation:
+ // If we add ivars/properties, here's where we'll save them
+}
+
+ (id)createModelObjectFromFile:(NSString *)filePath
{
if(![[NSFileManager defaultManager] fileExistsAtPath:filePath])
View
8 contributed templates/Nikita Zhuk/ponso/templates/machine.h.motemplate 100644 → 100755
@@ -11,7 +11,6 @@
#import <Foundation/Foundation.h>
#import "ModelObject.h"
<$if hasCustomSuperentity$>#import "<$customSuperentity$>.h"<$endif$>
-
<$checkNonTransientRelationshipCycles $>
<$foreach Relationship noninheritedRelationships do$>@class <$Relationship.destinationEntity.managedObjectClassName$>;
<$endforeach do$>
@@ -40,9 +39,14 @@
<$else$>@property (nonatomic, retain, readwrite) <$Relationship.destinationEntity.managedObjectClassName$> *<$Relationship.name$>;<$endif$>
<$endif$><$endforeach do$>
<$foreach Relationship noninheritedRelationships do$>
-<$if Relationship.isToMany$>- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_;
+<$if Relationship.isToMany$>- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ settingInverse: (BOOL) setInverse;
+- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_;
- (void)remove<$Relationship.name.initialCapitalString$>Objects;
+- (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ settingInverse: (BOOL) setInverse;
- (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_;
<$endif$><$endforeach do$>
+<$foreach Relationship noninheritedRelationships do$><$if ! Relationship.isToMany$>
+- (void) set<$Relationship.name.initialCapitalString$>: (<$Relationship.destinationEntity.managedObjectClassName$>*) <$Relationship.name$>_ settingInverse: (BOOL) setInverse;
+<$endif$><$endforeach do$>
@end
View
73 contributed templates/Nikita Zhuk/ponso/templates/machine.m.motemplate
@@ -132,26 +132,80 @@
#pragma mark Direct access
<$foreach Relationship noninheritedRelationships do$><$if Relationship.isToMany$>
-- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_
+- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ settingInverse: (BOOL) setInverse
{
- if(self.<$Relationship.name$> == nil)
+ if(self.<$Relationship.name$> == nil)
{
+ <$if Relationship.isTransient$>
+ CFArrayCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual};
+ self.<$Relationship.name$> = [(NSMutableArray*) CFArrayCreateMutable(0, 0, &callbacks) autorelease];
+ <$else$>
self.<$Relationship.name$> = [NSMutableArray array];
+ <$endif$>
}
[(NSMutableArray *)self.<$Relationship.name$> addObject:value_];
- <$if Relationship.inverseRelationship$><$if ! Relationship.inverseRelationship.isToMany$>value_.<$Relationship.inverseRelationship.name$> = (<$managedObjectClassName$>*)self;<$endif$><$endif$>
+ <$if Relationship.inverseRelationship$><$if ! Relationship.inverseRelationship.isToMany$>if (setInverse == YES) {
+ [value_ set<$Relationship.inverseRelationship.name.initialCapitalString$>: (<$managedObjectClassName$>*)self settingInverse: NO];
+ }<$endif$><$endif$>
+}
+- (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_
+{
+ [self add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ settingInverse: YES];
}
- (void)remove<$Relationship.name.initialCapitalString$>Objects
{
+ <$if Relationship.isTransient$>
+ CFArrayCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual};
+ self.<$Relationship.name$> = [(NSMutableArray*) CFArrayCreateMutable(0, 0, &callbacks) autorelease];
+ <$else$>
self.<$Relationship.name$> = [NSMutableArray array];
+ <$endif$>
+}
+
+- (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ settingInverse: (BOOL) setInverse
+{
+ <$if Relationship.inverseRelationship$><$if ! Relationship.inverseRelationship.isToMany$>if (setInverse == YES) {
+ [value_ set<$Relationship.inverseRelationship.name.initialCapitalString$>: nil settingInverse: NO];
+ }<$endif$><$endif$>
+ [(NSMutableArray *)self.<$Relationship.name$> removeObject:value_];
}
- (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_
{
- <$if Relationship.inverseRelationship$><$if ! Relationship.inverseRelationship.isToMany$>value_.<$Relationship.inverseRelationship.name$> = nil;<$endif$><$endif$>
- [(NSMutableArray *)self.<$Relationship.name$> removeObject:value_];
+ [self remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ settingInverse: YES];
+}
+
+<$endif$><$endforeach do$>
+
+<$foreach Relationship noninheritedRelationships do$><$if ! Relationship.isToMany$>
+- (void) set<$Relationship.name.initialCapitalString$>: (<$Relationship.destinationEntity.managedObjectClassName$>*) <$Relationship.name$>_ settingInverse: (BOOL) setInverse
+{
+ <$if Relationship.inverseRelationship$><$if Relationship.inverseRelationship.isToMany$>if ((<$Relationship.name$>_ == nil || ![<$Relationship.name$>_ isEqual: <$Relationship.name$>]) && setInverse == YES) {
+ [<$Relationship.name$> remove<$Relationship.inverseRelationship.name.initialCapitalString$>Object: (<$managedObjectClassName$>*)self settingInverse: NO];
+ }<$else$>if (<$Relationship.name$>_ == nil && setInverse == YES) {
+ [<$Relationship.name$> set<$Relationship.inverseRelationship.name.initialCapitalString$>: nil settingInverse: NO];
+ }
+ <$endif$><$endif$><$if Relationship.isTransient$><$Relationship.name$> = <$Relationship.name$>_;<$else$>if (<$Relationship.name$> != <$Relationship.name$>_) {
+ [<$Relationship.name$> release];
+ <$Relationship.name$> = [<$Relationship.name$>_ retain];
+ }<$endif$>
+ <$if Relationship.inverseRelationship$><$if Relationship.inverseRelationship.isToMany$>if (setInverse == YES) {
+ [<$Relationship.name$> add<$Relationship.inverseRelationship.name.initialCapitalString$>Object: (<$managedObjectClassName$>*)self settingInverse: NO];
+ }<$else$>if (setInverse == YES) {
+ [<$Relationship.name$> set<$Relationship.inverseRelationship.name.initialCapitalString$>: (<$managedObjectClassName$>*)self settingInverse: NO];
+ }<$endif$><$endif$>
+}
+
+- (void) set<$Relationship.name.initialCapitalString$>: (<$Relationship.destinationEntity.managedObjectClassName$>*) <$Relationship.name$>_
+{
+ [self set<$Relationship.name.initialCapitalString$>: <$Relationship.name$>_ settingInverse: YES];
+}
+
+- (<$Relationship.destinationEntity.managedObjectClassName$>*) <$Relationship.name$>
+{
+ return <$Relationship.name$>;
}
<$endif$><$endforeach do$>
@@ -160,15 +214,16 @@
{
<$foreach Attribute noninheritedAttributes do$><$if Attribute.hasDefinedAttributeType$>self.<$Attribute.name$> = nil;
<$endif$><$endforeach do$>
- <$foreach Relationship noninheritedRelationships do$>self.<$Relationship.name$> = nil;
- <$endforeach do$>
+ <$foreach Relationship noninheritedRelationships do$><$if ! Relationship.isTransient$>self.<$Relationship.name$> = nil;
+ <$endif$><$endforeach do$>
[super dealloc];
}
#pragma mark Synthesizes
<$foreach Attribute noninheritedAttributes do$>@synthesize <$Attribute.name$>;
<$endforeach do$>
-<$foreach Relationship noninheritedRelationships do$>@synthesize <$Relationship.name$>;
-<$endforeach do$>
+<$foreach Relationship noninheritedRelationships do$><$if Relationship.isToMany$>@synthesize <$Relationship.name$>;
+<$endif$><$endforeach do$>
+
@end
View
45 contributed templates/Tyrone Trevorrow/ponso/README.txt
@@ -0,0 +1,45 @@
+PONSO - Plain Old NSObjects
+===========================
+
+What is PONSO?
+--------------
+The idea is to use mogenerator to generate lightweight, memory-only, type-safe ObjC data model classes from Xcode data models.
+
+Features
+--------
+- Type-safe attributes
+- Supports one-to-one and one-to-many relationships
+- Relationships are always ordered - implemented with NSArrays
+- Supports inverse relationships, which should be always marked as 'transient'
+- Supports serialization of any model object to NSDictionary and initialization from NSDictionary
+- Supports writing and reading to binary property list files
+- Requires that data model is a tree, where nodes are entities and edges are strong, non-transient relationships. Does not work with graph data models.
+- Supports weak relationships which are not archived in serialized form. These relationships are not considered as part of the object graph tree, e.g. you can have strong relationships A -> B, A -> C and a weak relationship B -> C and this won't invalidate the "tree model" requirement.
+- To create a weak relationship, add "destinationEntityIDKeyPath" user info key to that relationship in Xcode data modeller, and specify the name of attribute which can be used as unique ID to find the destination object. See sample projects entities DepartmentAssistant and DepartmentEmployee for examples.
+- Cycles between weak relationships are found automatically and are warned about during code generation.
+
+
+How to use
+----------
+- The only additional source code you need to compile into your application for PONSO is ModelObject class found in "contributed templates/Nikita Zhuk/ponso/code"
+- See "contributed templates/Nikita Zhuk/ponso/sample project/PonsoTest" project for sample setup
+
+
+TODO
+-----
+PONSO is a work in progress and can be enchanced in a various ways.
+
+Some missing features include:
+- Automatic setting of inverse one-to-one relationships in setters
+- Support for many-to-many relationships
+- Implementations of to-many relationships as ordered sets instead of arrays
+- Detection of retain cycles caused by both relationship directions being non-transient
+
+Feel free to fork & contribute.
+
+
+Contact info
+-------------
+Nikita Zhuk, 2011
+Twitter: @nzhuk
+
View
58 contributed templates/Tyrone Trevorrow/ponso/code/ModelObject.h
@@ -0,0 +1,58 @@
+/*
+ Copyright 2011 Marko Karppinen & Co. LLC.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ModelObject.h
+ mogenerator / PONSO
+ Created by Nikita Zhuk on 22.1.2011.
+ */
+
+/**
+ Abstract superclass for all of our model classes.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface ModelObject : NSObject <NSCopying, NSCoding>
+{
+ NSDictionary *sourceDictionaryRepresentation;
+}
+
+@property(nonatomic, retain) NSDictionary *sourceDictionaryRepresentation;
+
+/**
+ Reads and deserializes a ModelObject from plist at given \c filePath
+ \return Newly created ModelObject or nil if any of the following occurs: file doesn't exist, file cannot be read, plist cannot be parsed.
+*/
++ (id)createModelObjectFromFile:(NSString *)filePath;
+
+/**
+ Serializes the receiver into binary plist and writes it to given \c filePath. Creates any intermediate directories in the path if necessary.
+ \return YES on success, NO on error (binary serialization or I/O error).
+*/
+- (BOOL)writeToFile:(NSString *)filePath;
+
+- (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary;
+- (NSDictionary *)dictionaryRepresentation;
+
+- (void)awakeFromDictionaryRepresentationInit;
+
+@end
+
+
+@interface NSMutableDictionary (PONSONSMutableDictionaryAdditions)
+
+- (void)setObjectIfNotNil:(id)obj forKey:(NSString *)key;
+
+@end
View
175 contributed templates/Tyrone Trevorrow/ponso/code/ModelObject.m
@@ -0,0 +1,175 @@
+/*
+ Copyright 2011 Marko Karppinen & Co. LLC.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ModelObject.m
+ mogenerator / PONSO
+ Created by Nikita Zhuk on 22.1.2011.
+ */
+
+#import "ModelObject.h"
+
+@implementation ModelObject
+
+- (id) initWithCoder: (NSCoder*) aDecoder
+{
+ self = [super init];
+ if (self) {
+ // Superclass implementation:
+ // If we add ivars/properties, here's where we'll load them
+ }
+ return self;
+}
+
+- (void) encodeWithCoder: (NSCoder*) aCoder
+{
+ // Superclass implementation:
+ // If we add ivars/properties, here's where we'll save them
+}
+
++ (id)createModelObjectFromFile:(NSString *)filePath
+{
+ if(![[NSFileManager defaultManager] fileExistsAtPath:filePath])
+ {
+ return nil;
+ }
+
+ NSError *error = nil;
+ NSData *plistData = [NSData dataWithContentsOfFile:filePath options:NSDataReadingUncached error:&error];
+ if(!plistData)
+ {
+ NSLog(@"Couldn't read '%@' data from '%@': %@.", NSStringFromClass([self class]), filePath, error);
+ return nil;
+ }
+
+ if([plistData length] == 0)
+ {
+ NSLog(@"Empty '%@' data found from '%@'.", NSStringFromClass([self class]), filePath);
+ return nil;
+ }
+
+ NSString *errorString = nil;
+ NSDictionary *plist = [NSPropertyListSerialization propertyListFromData:plistData
+ mutabilityOption:0
+ format:NULL
+ errorDescription:&errorString];
+ if(!plist)
+ {
+ NSLog(@"Couldn't load '%@' data from '%@': %@.", NSStringFromClass([self class]), filePath, errorString);
+ [errorString release];
+
+ return nil;
+ }
+
+ id modelObject = [[[self alloc] initWithDictionaryRepresentation:plist] autorelease];
+ [modelObject awakeFromDictionaryRepresentationInit];
+
+ return modelObject;
+}
+
+- (BOOL)writeToFile:(NSString *)filePath
+{
+ if(filePath == nil)
+ {
+ NSLog(@"File path was nil - cannot write to file.");
+ return NO;
+ }
+
+ // Save this modelObject into plist
+ NSDictionary *dict = [self dictionaryRepresentation];
+ NSString *errorDesc = nil;
+ NSData *plistData = [NSPropertyListSerialization dataFromPropertyList:dict format:NSPropertyListBinaryFormat_v1_0 errorDescription:&errorDesc];
+ if(!plistData)
+ {
+ NSLog(@"Error while serializing model object of class '%@' into plist. Error: '%@'.", NSStringFromClass([self class]), errorDesc);
+
+ [errorDesc release]; // From docs: "If you receive a string, you must release it."
+ return NO;
+ }
+
+ BOOL isDir = NO;
+ if(![[NSFileManager defaultManager] fileExistsAtPath:[filePath stringByDeletingLastPathComponent] isDirectory:&isDir] || !isDir)
+ {
+ NSError *error = nil;
+ if(![[NSFileManager defaultManager] createDirectoryAtPath:[filePath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:&error])
+ {
+ NSLog(@"Couldn't create parent directory of file path '%@' for saving model object of class '%@': %@.", filePath, NSStringFromClass([self class]), error);
+ return NO;
+ }
+ }
+
+ if(![plistData writeToFile:filePath atomically:YES])
+ {
+ NSLog(@"Error while saving model object of class '%@' into plist file %@.", NSStringFromClass([self class]), filePath);
+ return NO;
+
+ }
+
+ return YES;
+}
+
+- (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary
+{
+ if((self = [super init]))
+ {
+ self.sourceDictionaryRepresentation = dictionary;
+ }
+
+ return self;
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+ return [NSDictionary dictionary];
+}
+
+- (void)awakeFromDictionaryRepresentationInit
+{
+ self.sourceDictionaryRepresentation = nil;
+}
+
+- (void) dealloc
+{
+ self.sourceDictionaryRepresentation = nil;
+
+ [super dealloc];
+}
+
+#pragma mark NSCopying
+
+- (id)copyWithZone:(NSZone *)zone
+{
+ // Note: ModelObject is not autoreleased because we are in copy method.
+ ModelObject *copy = [[[self class] alloc] initWithDictionaryRepresentation:[self dictionaryRepresentation]];
+ [copy awakeFromDictionaryRepresentationInit];
+
+ return copy;
+}
+
+@synthesize sourceDictionaryRepresentation;
+
+@end
+
+
+@implementation NSMutableDictionary (PONSONSMutableDictionaryAdditions)
+
+- (void)setObjectIfNotNil:(id)obj forKey:(NSString *)key
+{
+ if(obj == nil)
+ return;
+
+ [self setObject:obj forKey:key];
+}
+
+@end
View
8 ...es/Tyrone Trevorrow/ponso/sample project/PonsoTest/MyModel.xcdatamodeld/.xccurrentversion
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>_XCCurrentVersionName</key>
+ <string>MyModel.xcdatamodel</string>
+</dict>
+</plist>
View
BIN ...revorrow/ponso/sample project/PonsoTest/MyModel.xcdatamodeld/MyModel.xcdatamodel/elements
Binary file not shown.
View
BIN ... Trevorrow/ponso/sample project/PonsoTest/MyModel.xcdatamodeld/MyModel.xcdatamodel/layout
Binary file not shown.
View
345 ...lates/Tyrone Trevorrow/ponso/sample project/PonsoTest/PonsoTest.xcodeproj/project.pbxproj
@@ -0,0 +1,345 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 457C268D1399FAC600BF00DD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 457C268C1399FAC600BF00DD /* Foundation.framework */; };
+ 457C26901399FAC600BF00DD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 457C268F1399FAC600BF00DD /* main.m */; };
+ 457C26C5139A18CE00BF00DD /* ModelObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 457C26C4139A18CE00BF00DD /* ModelObject.m */; };
+ 4584D411139A9D360035BCA5 /* _ModelAssistant.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D3FA139A9D360035BCA5 /* _ModelAssistant.m */; };
+ 4584D412139A9D360035BCA5 /* _ModelCompany.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D3FC139A9D360035BCA5 /* _ModelCompany.m */; };
+ 4584D413139A9D360035BCA5 /* _ModelDepartment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D3FE139A9D360035BCA5 /* _ModelDepartment.m */; };
+ 4584D414139A9D360035BCA5 /* _ModelDepartmentAssistant.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D400139A9D360035BCA5 /* _ModelDepartmentAssistant.m */; };
+ 4584D415139A9D360035BCA5 /* _ModelDepartmentEmployee.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D402139A9D360035BCA5 /* _ModelDepartmentEmployee.m */; };
+ 4584D416139A9D360035BCA5 /* _ModelEmployee.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D404139A9D360035BCA5 /* _ModelEmployee.m */; };
+ 4584D417139A9D360035BCA5 /* ModelAssistant.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D406139A9D360035BCA5 /* ModelAssistant.m */; };
+ 4584D418139A9D360035BCA5 /* ModelCompany.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D408139A9D360035BCA5 /* ModelCompany.m */; };
+ 4584D419139A9D360035BCA5 /* ModelDepartment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D40A139A9D360035BCA5 /* ModelDepartment.m */; };
+ 4584D41A139A9D360035BCA5 /* ModelDepartmentAssistant.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D40C139A9D360035BCA5 /* ModelDepartmentAssistant.m */; };
+ 4584D41B139A9D360035BCA5 /* ModelDepartmentEmployee.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D40E139A9D360035BCA5 /* ModelDepartmentEmployee.m */; };
+ 4584D41C139A9D360035BCA5 /* ModelEmployee.m in Sources */ = {isa = PBXBuildFile; fileRef = 4584D410139A9D360035BCA5 /* ModelEmployee.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 457C26861399FAC600BF00DD /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 457C26881399FAC600BF00DD /* PonsoTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PonsoTest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 457C268C1399FAC600BF00DD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 457C268F1399FAC600BF00DD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 457C26921399FAC600BF00DD /* PonsoTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PonsoTest-Prefix.pch"; sourceTree = "<group>"; };
+ 457C269A1399FB1E00BF00DD /* MyModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MyModel.xcdatamodel; sourceTree = "<group>"; };
+ 457C26C3139A18CE00BF00DD /* ModelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelObject.h; path = ../../../code/ModelObject.h; sourceTree = "<group>"; };
+ 457C26C4139A18CE00BF00DD /* ModelObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelObject.m; path = ../../../code/ModelObject.m; sourceTree = "<group>"; };
+ 4584D3F9139A9D360035BCA5 /* _ModelAssistant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _ModelAssistant.h; path = Sources/DataModel/_ModelAssistant.h; sourceTree = SOURCE_ROOT; };
+ 4584D3FA139A9D360035BCA5 /* _ModelAssistant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = _ModelAssistant.m; path = Sources/DataModel/_ModelAssistant.m; sourceTree = SOURCE_ROOT; };
+ 4584D3FB139A9D360035BCA5 /* _ModelCompany.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _ModelCompany.h; path = Sources/DataModel/_ModelCompany.h; sourceTree = SOURCE_ROOT; };
+ 4584D3FC139A9D360035BCA5 /* _ModelCompany.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = _ModelCompany.m; path = Sources/DataModel/_ModelCompany.m; sourceTree = SOURCE_ROOT; };
+ 4584D3FD139A9D360035BCA5 /* _ModelDepartment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _ModelDepartment.h; path = Sources/DataModel/_ModelDepartment.h; sourceTree = SOURCE_ROOT; };
+ 4584D3FE139A9D360035BCA5 /* _ModelDepartment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = _ModelDepartment.m; path = Sources/DataModel/_ModelDepartment.m; sourceTree = SOURCE_ROOT; };
+ 4584D3FF139A9D360035BCA5 /* _ModelDepartmentAssistant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _ModelDepartmentAssistant.h; path = Sources/DataModel/_ModelDepartmentAssistant.h; sourceTree = SOURCE_ROOT; };
+ 4584D400139A9D360035BCA5 /* _ModelDepartmentAssistant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = _ModelDepartmentAssistant.m; path = Sources/DataModel/_ModelDepartmentAssistant.m; sourceTree = SOURCE_ROOT; };
+ 4584D401139A9D360035BCA5 /* _ModelDepartmentEmployee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _ModelDepartmentEmployee.h; path = Sources/DataModel/_ModelDepartmentEmployee.h; sourceTree = SOURCE_ROOT; };
+ 4584D402139A9D360035BCA5 /* _ModelDepartmentEmployee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = _ModelDepartmentEmployee.m; path = Sources/DataModel/_ModelDepartmentEmployee.m; sourceTree = SOURCE_ROOT; };
+ 4584D403139A9D360035BCA5 /* _ModelEmployee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _ModelEmployee.h; path = Sources/DataModel/_ModelEmployee.h; sourceTree = SOURCE_ROOT; };
+ 4584D404139A9D360035BCA5 /* _ModelEmployee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = _ModelEmployee.m; path = Sources/DataModel/_ModelEmployee.m; sourceTree = SOURCE_ROOT; };
+ 4584D405139A9D360035BCA5 /* ModelAssistant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelAssistant.h; path = Sources/DataModel/ModelAssistant.h; sourceTree = SOURCE_ROOT; };
+ 4584D406139A9D360035BCA5 /* ModelAssistant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelAssistant.m; path = Sources/DataModel/ModelAssistant.m; sourceTree = SOURCE_ROOT; };
+ 4584D407139A9D360035BCA5 /* ModelCompany.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelCompany.h; path = Sources/DataModel/ModelCompany.h; sourceTree = SOURCE_ROOT; };
+ 4584D408139A9D360035BCA5 /* ModelCompany.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelCompany.m; path = Sources/DataModel/ModelCompany.m; sourceTree = SOURCE_ROOT; };
+ 4584D409139A9D360035BCA5 /* ModelDepartment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelDepartment.h; path = Sources/DataModel/ModelDepartment.h; sourceTree = SOURCE_ROOT; };
+ 4584D40A139A9D360035BCA5 /* ModelDepartment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelDepartment.m; path = Sources/DataModel/ModelDepartment.m; sourceTree = SOURCE_ROOT; };
+ 4584D40B139A9D360035BCA5 /* ModelDepartmentAssistant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelDepartmentAssistant.h; path = Sources/DataModel/ModelDepartmentAssistant.h; sourceTree = SOURCE_ROOT; };
+ 4584D40C139A9D360035BCA5 /* ModelDepartmentAssistant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelDepartmentAssistant.m; path = Sources/DataModel/ModelDepartmentAssistant.m; sourceTree = SOURCE_ROOT; };
+ 4584D40D139A9D360035BCA5 /* ModelDepartmentEmployee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelDepartmentEmployee.h; path = Sources/DataModel/ModelDepartmentEmployee.h; sourceTree = SOURCE_ROOT; };
+ 4584D40E139A9D360035BCA5 /* ModelDepartmentEmployee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelDepartmentEmployee.m; path = Sources/DataModel/ModelDepartmentEmployee.m; sourceTree = SOURCE_ROOT; };
+ 4584D40F139A9D360035BCA5 /* ModelEmployee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelEmployee.h; path = Sources/DataModel/ModelEmployee.h; sourceTree = SOURCE_ROOT; };
+ 4584D410139A9D360035BCA5 /* ModelEmployee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelEmployee.m; path = Sources/DataModel/ModelEmployee.m; sourceTree = SOURCE_ROOT; };
+ 45F78872139BAA1900010BD3 /* Model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Model.h; path = Sources/DataModel/Model.h; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 457C26851399FAC600BF00DD /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 457C268D1399FAC600BF00DD /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 457C267D1399FAC600BF00DD = {
+ isa = PBXGroup;
+ children = (
+ 457C26991399FB1E00BF00DD /* MyModel.xcdatamodeld */,
+ 457C268E1399FAC600BF00DD /* PonsoTest */,
+ 457C268B1399FAC600BF00DD /* Frameworks */,
+ 457C26891399FAC600BF00DD /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 457C26891399FAC600BF00DD /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 457C26881399FAC600BF00DD /* PonsoTest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 457C268B1399FAC600BF00DD /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 457C268C1399FAC600BF00DD /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 457C268E1399FAC600BF00DD /* PonsoTest */ = {
+ isa = PBXGroup;
+ children = (
+ 457C268F1399FAC600BF00DD /* main.m */,
+ 457C26C3139A18CE00BF00DD /* ModelObject.h */,
+ 457C26C4139A18CE00BF00DD /* ModelObject.m */,
+ 457C26AF139A188D00BF00DD /* Data Model */,
+ 457C26911399FAC600BF00DD /* Supporting Files */,
+ );
+ path = PonsoTest;
+ sourceTree = "<group>";
+ };
+ 457C26911399FAC600BF00DD /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 457C26921399FAC600BF00DD /* PonsoTest-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 457C26AF139A188D00BF00DD /* Data Model */ = {
+ isa = PBXGroup;
+ children = (
+ 45F78872139BAA1900010BD3 /* Model.h */,
+ 4584D3F9139A9D360035BCA5 /* _ModelAssistant.h */,
+ 4584D3FA139A9D360035BCA5 /* _ModelAssistant.m */,
+ 4584D3FB139A9D360035BCA5 /* _ModelCompany.h */,
+ 4584D3FC139A9D360035BCA5 /* _ModelCompany.m */,
+ 4584D3FD139A9D360035BCA5 /* _ModelDepartment.h */,
+ 4584D3FE139A9D360035BCA5 /* _ModelDepartment.m */,
+ 4584D3FF139A9D360035BCA5 /* _ModelDepartmentAssistant.h */,
+ 4584D400139A9D360035BCA5 /* _ModelDepartmentAssistant.m */,
+ 4584D401139A9D360035BCA5 /* _ModelDepartmentEmployee.h */,
+ 4584D402139A9D360035BCA5 /* _ModelDepartmentEmployee.m */,
+ 4584D403139A9D360035BCA5 /* _ModelEmployee.h */,
+ 4584D404139A9D360035BCA5 /* _ModelEmployee.m */,
+ 4584D405139A9D360035BCA5 /* ModelAssistant.h */,
+ 4584D406139A9D360035BCA5 /* ModelAssistant.m */,
+ 4584D407139A9D360035BCA5 /* ModelCompany.h */,
+ 4584D408139A9D360035BCA5 /* ModelCompany.m */,
+ 4584D409139A9D360035BCA5 /* ModelDepartment.h */,
+ 4584D40A139A9D360035BCA5 /* ModelDepartment.m */,
+ 4584D40B139A9D360035BCA5 /* ModelDepartmentAssistant.h */,
+ 4584D40C139A9D360035BCA5 /* ModelDepartmentAssistant.m */,
+ 4584D40D139A9D360035BCA5 /* ModelDepartmentEmployee.h */,
+ 4584D40E139A9D360035BCA5 /* ModelDepartmentEmployee.m */,
+ 4584D40F139A9D360035BCA5 /* ModelEmployee.h */,
+ 4584D410139A9D360035BCA5 /* ModelEmployee.m */,
+ );
+ name = "Data Model";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 457C26871399FAC600BF00DD /* PonsoTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 457C26961399FAC600BF00DD /* Build configuration list for PBXNativeTarget "PonsoTest" */;
+ buildPhases = (
+ 457C269C1399FC7000BF00DD /* ShellScript */,
+ 457C26841399FAC600BF00DD /* Sources */,
+ 457C26851399FAC600BF00DD /* Frameworks */,
+ 457C26861399FAC600BF00DD /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = PonsoTest;
+ productName = PonsoTest;
+ productReference = 457C26881399FAC600BF00DD /* PonsoTest */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 457C267F1399FAC600BF00DD /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ ORGANIZATIONNAME = "@nzhuk";
+ };
+ buildConfigurationList = 457C26821399FAC600BF00DD /* Build configuration list for PBXProject "PonsoTest" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 457C267D1399FAC600BF00DD;
+ productRefGroup = 457C26891399FAC600BF00DD /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 457C26871399FAC600BF00DD /* PonsoTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 457C269C1399FC7000BF00DD /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "### Settings\n\nDATA_MODEL_FILE=\"$PROJECT_DIR/MyModel.xcdatamodeld/MyModel.xcdatamodel\"\nDATA_MODEL_SOURCE_DIR=\"$PROJECT_DIR/Sources/DataModel\"\n\nBASE_CLASS=\"ModelObject\"\nAGGREGATE_HEADER=\"$DATA_MODEL_SOURCE_DIR/Model.h\"\n\nMOGENERATOR_DIR=\"$PROJECT_DIR/../../../../../\"\nMOGENERATOR_BIN=`type -P mogenerator` ## Adjust this so that it points to a compiled mogenerator binary.\nMOGENERATOR_TEMPLATES=\"$MOGENERATOR_DIR/contributed templates/Nikita Zhuk/ponso/templates/NSSet/NSCoding\"\n\n### Logic\n\nsource \"$MOGENERATOR_DIR/ponso/generate.sh\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 457C26841399FAC600BF00DD /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 457C26901399FAC600BF00DD /* main.m in Sources */,
+ 457C26C5139A18CE00BF00DD /* ModelObject.m in Sources */,
+ 4584D411139A9D360035BCA5 /* _ModelAssistant.m in Sources */,
+ 4584D412139A9D360035BCA5 /* _ModelCompany.m in Sources */,
+ 4584D413139A9D360035BCA5 /* _ModelDepartment.m in Sources */,
+ 4584D414139A9D360035BCA5 /* _ModelDepartmentAssistant.m in Sources */,
+ 4584D415139A9D360035BCA5 /* _ModelDepartmentEmployee.m in Sources */,
+ 4584D416139A9D360035BCA5 /* _ModelEmployee.m in Sources */,
+ 4584D417139A9D360035BCA5 /* ModelAssistant.m in Sources */,
+ 4584D418139A9D360035BCA5 /* ModelCompany.m in Sources */,
+ 4584D419139A9D360035BCA5 /* ModelDepartment.m in Sources */,
+ 4584D41A139A9D360035BCA5 /* ModelDepartmentAssistant.m in Sources */,
+ 4584D41B139A9D360035BCA5 /* ModelDepartmentEmployee.m in Sources */,
+ 4584D41C139A9D360035BCA5 /* ModelEmployee.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 457C26941399FAC600BF00DD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 457C26951399FAC600BF00DD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 457C26971399FAC600BF00DD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "PonsoTest/PonsoTest-Prefix.pch";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 457C26981399FAC600BF00DD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "PonsoTest/PonsoTest-Prefix.pch";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 457C26821399FAC600BF00DD /* Build configuration list for PBXProject "PonsoTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 457C26941399FAC600BF00DD /* Debug */,
+ 457C26951399FAC600BF00DD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 457C26961399FAC600BF00DD /* Build configuration list for PBXNativeTarget "PonsoTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 457C26971399FAC600BF00DD /* Debug */,
+ 457C26981399FAC600BF00DD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+
+/* Begin XCVersionGroup section */
+ 457C26991399FB1E00BF00DD /* MyModel.xcdatamodeld */ = {
+ isa = XCVersionGroup;
+ children = (
+ 457C269A1399FB1E00BF00DD /* MyModel.xcdatamodel */,
+ );
+ currentVersion = 457C269A1399FB1E00BF00DD /* MyModel.xcdatamodel */;
+ path = MyModel.xcdatamodeld;
+ sourceTree = "<group>";
+ versionGroupType = wrapper.xcdatamodel;
+ };
+/* End XCVersionGroup section */
+ };
+ rootObject = 457C267F1399FAC600BF00DD /* Project object */;
+}
View
7 ...sample project/PonsoTest/PonsoTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:PonsoTest.xcodeproj">
+ </FileRef>
+</Workspace>
View
BIN ...roj/project.xcworkspace/xcuserdata/t.trevorrow.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
84 ...oTest/PonsoTest.xcodeproj/xcuserdata/t.trevorrow.xcuserdatad/xcschemes/PonsoTest.xcscheme
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "457C26871399FAC600BF00DD"
+ BuildableName = "PonsoTest"
+ BlueprintName = "PonsoTest"
+ ReferencedContainer = "container:PonsoTest.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "457C26871399FAC600BF00DD"
+ BuildableName = "PonsoTest"
+ BlueprintName = "PonsoTest"
+ ReferencedContainer = "container:PonsoTest.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "457C26871399FAC600BF00DD"
+ BuildableName = "PonsoTest"
+ BlueprintName = "PonsoTest"
+ ReferencedContainer = "container:PonsoTest.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "457C26871399FAC600BF00DD"
+ BuildableName = "PonsoTest"
+ BlueprintName = "PonsoTest"
+ ReferencedContainer = "container:PonsoTest.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
View
22 ...PonsoTest.xcodeproj/xcuserdata/t.trevorrow.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>PonsoTest.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>457C26871399FAC600BF00DD</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
8 ... templates/Tyrone Trevorrow/ponso/sample project/PonsoTest/PonsoTest/PonsoTest-Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'PonsoTest' target in the 'PonsoTest' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import "Model.h"
+#endif
View
129 contributed templates/Tyrone Trevorrow/ponso/sample project/PonsoTest/PonsoTest/main.m
@@ -0,0 +1,129 @@
+ /*
+ Copyright 2011 Marko Karppinen & Co. LLC.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ main.m
+ mogenerator / PONSO
+ Created by Nikita Zhuk on 22.1.2011.
+ */
+
+#import <Foundation/Foundation.h>
+#import "Model.h"
+
+int main (int argc, const char * argv[])
+{
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+
+ ModelCompany *company1 = [[[ModelCompany alloc] init] autorelease];
+ company1.name = @"Our company";
+ company1.yearFoundedValue = 2003;
+
+ ModelEmployee *emp1 = [[[ModelEmployee alloc] init] autorelease];
+ ModelEmployee *emp2 = [[[ModelEmployee alloc] init] autorelease];
+
+ emp1.name = @"John The Engineer";
+ emp1.birthDate = [NSDate dateWithTimeIntervalSince1970:60*60];
+ emp1.isOnVacationValue = YES;
+
+ emp2.name = @"Mike The Tester";
+
+ ModelAssistant *as1 = [[[ModelAssistant alloc] init] autorelease];
+ ModelAssistant *as2 = [[[ModelAssistant alloc] init] autorelease];
+
+ as1.name = @"First assistant";
+ as1.birthDate = [NSDate date];
+
+ as2.name = @"Second assistant";
+ as2.birthDate = [NSDate date];
+
+ [company1 addEmployeesObject:emp1];
+ [company1 addEmployeesObject:emp2];
+ [company1 addAssistantsObject:as1];
+ [company1 addAssistantsObject:as2];
+
+ emp1.assistant = as2;
+ as2.boss = emp1; // Currently one-to-one relationships' inverse must be set manually
+
+ emp2.assistant = as1;
+ as1.boss = emp2; // Currently one-to-one relationships' inverse must be set manually
+
+ ModelDepartment *dep1 = [[[ModelDepartment alloc] init] autorelease];
+ ModelDepartment *dep2 = [[[ModelDepartment alloc] init] autorelease];
+ dep1.name = @"R&D Department";
+ dep2.name = @"QA Department";
+
+ // Setup workers of dep1
+ ModelDepartmentEmployee *depEmp1 = [[[ModelDepartmentEmployee alloc] init] autorelease];
+ depEmp1.employee = emp1;
+ depEmp1.startedWorking = [NSDate dateWithTimeIntervalSince1970:10000];
+ [dep1 addEmployeesObject:depEmp1];
+
+ ModelDepartmentEmployee *depEmp2 = [[[ModelDepartmentEmployee alloc] init] autorelease];
+ depEmp2.employee = emp2;
+ depEmp2.startedWorking = [NSDate dateWithTimeIntervalSince1970:20000];
+ [dep1 addEmployeesObject:depEmp2];
+
+ ModelDepartmentAssistant *depAs1 = [[[ModelDepartmentAssistant alloc] init] autorelease];
+ depAs1.assistant = as1;
+ depAs1.startedWorking = [NSDate dateWithTimeIntervalSince1970:30000];
+ [dep1 addAssistantsObject:depAs1];
+
+ // Setup workers of dep2
+ depEmp2 = [[[ModelDepartmentEmployee alloc] init] autorelease];
+ depEmp2.employee = emp2;
+ depEmp2.startedWorking = [NSDate dateWithTimeIntervalSince1970:40000];
+ [dep2 addEmployeesObject:depEmp2];
+
+ depAs1 = [[[ModelDepartmentAssistant alloc] init] autorelease];
+ depAs1.assistant = as1;
+ depAs1.startedWorking = [NSDate dateWithTimeIntervalSince1970:50000];
+ [dep2 addAssistantsObject:depAs1];
+
+ ModelDepartmentAssistant *depAs2 = [[[ModelDepartmentAssistant alloc] init] autorelease];
+ depAs2.assistant = as2;
+ depAs2.startedWorking = [NSDate dateWithTimeIntervalSince1970:60000];
+ [dep2 addAssistantsObject:depAs2];
+
+ [company1 addDepartmentsObject:dep1];
+ [company1 addDepartmentsObject:dep2];
+
+ // Test NSDictionary serialization
+ ModelCompany *recreatedCompany = [[[ModelCompany alloc] initWithDictionaryRepresentation:[company1 dictionaryRepresentation]] autorelease];
+ [recreatedCompany awakeFromDictionaryRepresentationInit];
+
+ NSDictionary *recreatedCompanyDict = [recreatedCompany dictionaryRepresentation];
+
+ NSLog(@"%@", [company1 dictionaryRepresentation]);
+ NSLog(@"%@", recreatedCompanyDict);
+
+ NSCAssert([recreatedCompanyDict isEqualToDictionary:[company1 dictionaryRepresentation]], @"ModelCompany serialization roundtrip failed.");
+ NSCAssert([recreatedCompany.employees count] == 2, @"");
+ NSCAssert([recreatedCompany.assistants count] == 2, @"");
+ NSCAssert([recreatedCompany.departments count] == 2, @"");
+
+ // Test file serialization (uses NSDictionary)
+ NSString *tempFile = [[NSTemporaryDirectory() stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]] stringByAppendingPathExtension:@"ponso-temp-plist"];
+ BOOL result = [company1 writeToFile:tempFile];
+ NSCAssert(result, @"");
+
+ ModelCompany *recreatedCompany2 = [ModelCompany createModelObjectFromFile:tempFile];
+ NSDictionary *recreatedCompany2Dict = [recreatedCompany2 dictionaryRepresentation];
+ [[NSFileManager defaultManager] removeItemAtPath:tempFile error:nil];
+
+ NSCAssert([recreatedCompany2Dict isEqualToDictionary:[company1 dictionaryRepresentation]], @"ModelCompany serialization roundtrip failed.");
+
+ [pool drain];
+ return 0;
+}
+
View
6 ...buted templates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/Model.h
@@ -0,0 +1,6 @@
+#import "ModelAssistant.h"
+#import "ModelCompany.h"
+#import "ModelDepartment.h"
+#import "ModelDepartmentAssistant.h"
+#import "ModelDepartmentEmployee.h"
+#import "ModelEmployee.h"
View
11 ...plates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelAssistant.h
@@ -0,0 +1,11 @@
+//
+// ModelAssistant.h
+//
+// $Id$
+//
+
+#import "_ModelAssistant.h"
+
+@interface ModelAssistant : _ModelAssistant <_ModelAssistant>
+// Custom logic goes here.
+@end
View
18 ...plates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelAssistant.m
@@ -0,0 +1,18 @@
+//
+// ModelAssistant.m
+//
+// $Id$
+//
+
+#import "ModelAssistant.h"
+
+@implementation ModelAssistant
+
+#pragma mark Abstract method overrides
+
+
+
+
+// Custom logic goes here.
+
+@end
View
11 ...emplates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelCompany.h
@@ -0,0 +1,11 @@
+//
+// ModelCompany.h
+//
+// $Id$
+//
+
+#import "_ModelCompany.h"
+
+@interface ModelCompany : _ModelCompany <_ModelCompany>
+// Custom logic goes here.
+@end
View
18 ...emplates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelCompany.m
@@ -0,0 +1,18 @@
+//
+// ModelCompany.m
+//
+// $Id$
+//
+
+#import "ModelCompany.h"
+
+@implementation ModelCompany
+
+#pragma mark Abstract method overrides
+
+
+
+
+// Custom logic goes here.
+
+@end
View
11 ...lates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelDepartment.h
@@ -0,0 +1,11 @@
+//
+// ModelDepartment.h
+//
+// $Id$
+//
+
+#import "_ModelDepartment.h"
+
+@interface ModelDepartment : _ModelDepartment <_ModelDepartment>
+// Custom logic goes here.
+@end
View
18 ...lates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelDepartment.m
@@ -0,0 +1,18 @@
+//
+// ModelDepartment.m
+//
+// $Id$
+//
+
+#import "ModelDepartment.h"
+
+@implementation ModelDepartment
+
+#pragma mark Abstract method overrides
+
+
+
+
+// Custom logic goes here.
+
+@end
View
11 ...one Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelDepartmentAssistant.h
@@ -0,0 +1,11 @@
+//
+// ModelDepartmentAssistant.h
+//
+// $Id$
+//
+
+#import "_ModelDepartmentAssistant.h"
+
+@interface ModelDepartmentAssistant : _ModelDepartmentAssistant <_ModelDepartmentAssistant>
+// Custom logic goes here.
+@end
View
21 ...one Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelDepartmentAssistant.m
@@ -0,0 +1,21 @@
+//
+// ModelDepartmentAssistant.m
+//
+// $Id$
+//
+
+#import "ModelDepartmentAssistant.h"
+
+@implementation ModelDepartmentAssistant
+
+#pragma mark Abstract method overrides
+
+
+- (ModelAssistant *)fetchAssistantObjectWithIDForAssistantRelationship:(id)objectID
+{
+ NSAssert(self.department.company != nil, @"");
+
+ return [[self.department.company.assistants filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"name = %@", objectID]] lastObject];
+}
+
+@end
View
11 ...rone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelDepartmentEmployee.h
@@ -0,0 +1,11 @@
+//
+// ModelDepartmentEmployee.h
+//
+// $Id$
+//
+
+#import "_ModelDepartmentEmployee.h"
+
+@interface ModelDepartmentEmployee : _ModelDepartmentEmployee <_ModelDepartmentEmployee>
+// Custom logic goes here.
+@end
View
21 ...rone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelDepartmentEmployee.m
@@ -0,0 +1,21 @@
+//
+// ModelDepartmentEmployee.m
+//
+// $Id$
+//
+
+#import "ModelDepartmentEmployee.h"
+
+@implementation ModelDepartmentEmployee
+
+#pragma mark Abstract method overrides
+
+
+- (ModelEmployee *)fetchEmployeeObjectWithIDForEmployeeRelationship:(id)objectID
+{
+ NSAssert(self.department.company != nil, @"");
+
+ return [[self.department.company.employees filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"name = %@", objectID]] lastObject];
+}
+
+@end
View
11 ...mplates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelEmployee.h
@@ -0,0 +1,11 @@
+//
+// ModelEmployee.h
+//
+// $Id$
+//
+
+#import "_ModelEmployee.h"
+
+@interface ModelEmployee : _ModelEmployee <_ModelEmployee>
+// Custom logic goes here.
+@end
View
20 ...mplates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/ModelEmployee.m
@@ -0,0 +1,20 @@
+//
+// ModelEmployee.m
+//
+// $Id$
+//
+
+#import "ModelEmployee.h"
+
+@implementation ModelEmployee
+
+#pragma mark Abstract method overrides
+
+- (ModelAssistant *)fetchAssistantObjectWithIDForAssistantRelationship:(id)objectID
+{
+ NSAssert(self.company != nil, @"");
+
+ return [[self.company.assistants filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"name = %@", objectID]] lastObject];
+}
+
+@end
View
63 ...lates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelAssistant.h
@@ -0,0 +1,63 @@
+//
+// ModelAssistant.h
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelAssistant.h instead.
+//
+
+
+#import <Foundation/Foundation.h>
+#import "ModelObject.h"
+#import "ModelObject.h"
+
+@class ModelEmployee;
+@class ModelCompany;
+@class ModelDepartmentAssistant;
+
+
+@protocol _ModelAssistant
+
+@end
+
+
+@interface _ModelAssistant : ModelObject <NSCoding>
+{
+ NSDate *birthDate;
+ NSString *name;
+
+
+ ModelEmployee *boss;
+
+ ModelCompany *company;
+
+ NSSet *departments;
+
+}
+
+@property (nonatomic, retain, readwrite) NSDate *birthDate;
+@property (nonatomic, retain, readwrite) NSString *name;
+
+@property (nonatomic, assign, readwrite) ModelEmployee *boss;
+
+@property (nonatomic, assign, readwrite) ModelCompany *company;
+
+@property (nonatomic, retain, readonly) NSSet *departments;
+
+
+
+
+- (void)addDepartmentsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse;
+- (void)addDepartmentsObject:(ModelDepartmentAssistant*)value_;
+- (void)removeDepartmentsObjects;
+- (void)removeDepartmentsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse;
+- (void)removeDepartmentsObject:(ModelDepartmentAssistant*)value_;
+
+
+- (void) setBoss: (ModelEmployee*) boss_ settingInverse: (BOOL) setInverse;
+
+- (void) setCompany: (ModelCompany*) company_ settingInverse: (BOOL) setInverse;
+
+
+@end
View
199 ...lates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelAssistant.m
@@ -0,0 +1,199 @@
+//
+// ModelAssistant.m
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelAssistant.h instead.
+//
+
+
+#import "_ModelAssistant.h"
+
+#import "ModelEmployee.h"
+#import "ModelCompany.h"
+#import "ModelDepartmentAssistant.h"
+
+@interface _ModelAssistant()
+@property (nonatomic, retain, readwrite) NSSet *departments;
+@end
+
+/** \ingroup DataModel */
+
+NS_INLINE NSMutableSet* NonretainingNSMutableSetMake()
+{
+ CFSetCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual, CFHash};
+ return [(NSMutableSet*) CFSetCreateMutable(0, 0, &callbacks) autorelease];
+}
+
+@implementation _ModelAssistant
+- (id)init
+{
+ if((self = [super init]))
+ {
+ }
+
+ return self;
+}
+
+- (id) initWithCoder: (NSCoder*) aDecoder
+{
+ if ([[super class] instancesRespondToSelector: @selector(initWithCoder:)]) {
+ self = [super initWithCoder: aDecoder];
+ } else {
+ self = [super init];
+ }
+ if (self) {
+ self.birthDate = [aDecoder decodeObjectForKey: @"birthDate"];
+ self.name = [aDecoder decodeObjectForKey: @"name"];
+ self.boss = [aDecoder decodeObjectForKey: @"boss"];
+ self.company = [aDecoder decodeObjectForKey: @"company"];
+ {
+ NSSet *set = [aDecoder decodeObjectForKey: @"departments"];
+ NSMutableSet *nonretainingSet = NonretainingNSMutableSetMake();
+ [nonretainingSet unionSet: set];
+ self.departments = nonretainingSet;
+ }
+ }
+ return self;
+}
+
+- (void) encodeWithCoder: (NSCoder*) aCoder
+{
+ [super encodeWithCoder: aCoder];
+ [aCoder encodeObject: self.birthDate forKey: @"birthDate"];
+ [aCoder encodeObject: self.name forKey: @"name"];
+ [aCoder encodeObject: self.boss forKey: @"boss"];
+ [aCoder encodeObject: self.company forKey: @"company"];
+ [aCoder encodeObject: self.departments forKey: @"departments"];
+}
+
+#pragma mark Scalar values
+
+
+#pragma mark Dictionary representation
+
+- (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary
+{
+ if((self = [super initWithDictionaryRepresentation:dictionary]))
+ {
+ self.birthDate = [dictionary objectForKey:@"ModelAssistant.birthDate"];
+ self.name = [dictionary objectForKey:@"ModelAssistant.name"];
+ }
+
+ return self;
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+ NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[super dictionaryRepresentation]];
+ [dict setObjectIfNotNil:self.birthDate forKey:@"ModelAssistant.birthDate"];
+ [dict setObjectIfNotNil:self.name forKey:@"ModelAssistant.name"];
+ if([self.departments count] > 0)
+ {
+ }
+ return dict;
+}
+
+- (void)awakeFromDictionaryRepresentationInit
+{
+ if(self.sourceDictionaryRepresentation == nil)
+ return; // awakeFromDictionaryRepresentationInit has been already executed on this object.
+
+
+ [super awakeFromDictionaryRepresentationInit];
+}
+
+#pragma mark Direct access
+
+- (void)addDepartmentsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse
+{
+ if(self.departments == nil)
+ {
+ self.departments = NonretainingNSMutableSetMake();
+ }
+
+ [(NSMutableSet *)self.departments addObject:value_];
+ if (setInverse == YES) {
+ [value_ setAssistant: (ModelAssistant*)self settingInverse: NO];
+ }
+}
+
+- (void)addDepartmentsObject:(ModelDepartmentAssistant*)value_
+{
+ [self addDepartmentsObject:(ModelDepartmentAssistant*)value_ settingInverse: YES];
+}
+
+- (void)removeDepartmentsObjects
+{
+ self.departments = NonretainingNSMutableSetMake();
+}
+
+- (void)removeDepartmentsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse
+{
+ if (setInverse == YES) {
+ [value_ setAssistant: nil settingInverse: NO];
+ }
+ [(NSMutableSet *)self.departments removeObject:value_];
+}
+
+- (void)removeDepartmentsObject:(ModelDepartmentAssistant*)value_
+{
+ [self removeDepartmentsObject:(ModelDepartmentAssistant*)value_ settingInverse: YES];
+}
+
+- (void) setBoss: (ModelEmployee*) boss_ settingInverse: (BOOL) setInverse
+{
+ if (boss_ == nil && setInverse == YES) {
+ [boss setAssistant: nil settingInverse: NO];
+ }
+ boss = boss_;
+ if (setInverse == YES) {
+ [boss setAssistant: (ModelAssistant*)self settingInverse: NO];
+ }
+}
+
+- (void) setBoss: (ModelEmployee*) boss_
+{
+ [self setBoss: boss_ settingInverse: YES];
+}
+
+- (ModelEmployee*) boss{
+ return boss;
+}
+
+- (void) setCompany: (ModelCompany*) company_ settingInverse: (BOOL) setInverse
+{
+ if (company_ == nil && setInverse == YES) {
+ [company removeAssistantsObject: (ModelAssistant*)self settingInverse: NO];
+ }
+ company = company_;
+ if (setInverse == YES) {
+ [company addAssistantsObject: (ModelAssistant*)self settingInverse: NO];
+ }
+}
+
+- (void) setCompany: (ModelCompany*) company_
+{
+ [self setCompany: company_ settingInverse: YES];
+}
+
+- (ModelCompany*) company{
+ return company;
+}
+
+
+- (void)dealloc
+{
+ self.birthDate = nil;
+ self.name = nil;
+ [super dealloc];
+}
+
+#pragma mark Synthesizes
+
+@synthesize birthDate;
+@synthesize name;
+@synthesize departments;
+
+@end
View
68 ...mplates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelCompany.h
@@ -0,0 +1,68 @@
+//
+// ModelCompany.h
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelCompany.h instead.
+//
+
+
+#import <Foundation/Foundation.h>
+#import "ModelObject.h"
+#import "ModelObject.h"
+
+@class ModelAssistant;
+@class ModelDepartment;
+@class ModelEmployee;
+
+
+@protocol _ModelCompany
+
+@end
+
+
+@interface _ModelCompany : ModelObject <NSCoding>
+{
+ NSString *name;
+ NSNumber *yearFounded;
+
+
+ NSSet *assistants;
+
+ NSSet *departments;
+
+ NSSet *employees;
+
+}
+
+@property (nonatomic, retain, readwrite) NSString *name;
+@property (nonatomic, retain, readwrite) NSNumber *yearFounded;
+@property (nonatomic, assign, readwrite) int yearFoundedValue;
+
+@property (nonatomic, retain, readonly) NSSet *assistants;
+@property (nonatomic, retain, readonly) NSSet *departments;
+@property (nonatomic, retain, readonly) NSSet *employees;
+
+
+- (void)addAssistantsObject:(ModelAssistant*)value_ settingInverse: (BOOL) setInverse;
+- (void)addAssistantsObject:(ModelAssistant*)value_;
+- (void)removeAssistantsObjects;
+- (void)removeAssistantsObject:(ModelAssistant*)value_ settingInverse: (BOOL) setInverse;
+- (void)removeAssistantsObject:(ModelAssistant*)value_;
+
+- (void)addDepartmentsObject:(ModelDepartment*)value_ settingInverse: (BOOL) setInverse;
+- (void)addDepartmentsObject:(ModelDepartment*)value_;
+- (void)removeDepartmentsObjects;
+- (void)removeDepartmentsObject:(ModelDepartment*)value_ settingInverse: (BOOL) setInverse;
+- (void)removeDepartmentsObject:(ModelDepartment*)value_;
+
+- (void)addEmployeesObject:(ModelEmployee*)value_ settingInverse: (BOOL) setInverse;
+- (void)addEmployeesObject:(ModelEmployee*)value_;
+- (void)removeEmployeesObjects;
+- (void)removeEmployeesObject:(ModelEmployee*)value_ settingInverse: (BOOL) setInverse;
+- (void)removeEmployeesObject:(ModelEmployee*)value_;
+
+
+
+@end
View
293 ...mplates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelCompany.m
@@ -0,0 +1,293 @@
+//
+// ModelCompany.m
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelCompany.h instead.
+//
+
+
+#import "_ModelCompany.h"
+
+#import "ModelAssistant.h"
+#import "ModelDepartment.h"
+#import "ModelEmployee.h"
+
+@interface _ModelCompany()
+@property (nonatomic, retain, readwrite) NSSet *assistants;
+@property (nonatomic, retain, readwrite) NSSet *departments;
+@property (nonatomic, retain, readwrite) NSSet *employees;
+@end
+
+/** \ingroup DataModel */
+
+NS_INLINE NSMutableSet* NonretainingNSMutableSetMake()
+{
+ CFSetCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual, CFHash};
+ return [(NSMutableSet*) CFSetCreateMutable(0, 0, &callbacks) autorelease];
+}
+
+@implementation _ModelCompany
+- (id)init
+{
+ if((self = [super init]))
+ {
+ }
+
+ return self;
+}
+
+- (id) initWithCoder: (NSCoder*) aDecoder
+{
+ if ([[super class] instancesRespondToSelector: @selector(initWithCoder:)]) {
+ self = [super initWithCoder: aDecoder];
+ } else {
+ self = [super init];
+ }
+ if (self) {
+ self.name = [aDecoder decodeObjectForKey: @"name"];
+ self.yearFounded = [aDecoder decodeObjectForKey: @"yearFounded"];
+ self.assistants = [aDecoder decodeObjectForKey: @"assistants"];
+ self.departments = [aDecoder decodeObjectForKey: @"departments"];
+ self.employees = [aDecoder decodeObjectForKey: @"employees"];
+ }
+ return self;
+}
+
+- (void) encodeWithCoder: (NSCoder*) aCoder
+{
+ [super encodeWithCoder: aCoder];
+ [aCoder encodeObject: self.name forKey: @"name"];
+ [aCoder encodeObject: self.yearFounded forKey: @"yearFounded"];
+ [aCoder encodeObject: self.assistants forKey: @"assistants"];
+ [aCoder encodeObject: self.departments forKey: @"departments"];
+ [aCoder encodeObject: self.employees forKey: @"employees"];
+}
+
+#pragma mark Scalar values
+- (int)yearFoundedValue
+{
+ return [self.yearFounded intValue];
+}
+
+- (void)setYearFoundedValue:(int)value_
+{
+ self.yearFounded = [NSNumber numberWithInt:value_];
+}
+
+
+#pragma mark Dictionary representation
+
+- (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary
+{
+ if((self = [super initWithDictionaryRepresentation:dictionary]))
+ {
+ self.name = [dictionary objectForKey:@"ModelCompany.name"];
+ self.yearFounded = [dictionary objectForKey:@"ModelCompany.yearFounded"];
+ for(id objectRepresentationForDict in [dictionary objectForKey:@"ModelCompany.assistants"])
+ {
+ ModelAssistant *assistantsObj = [[[ModelAssistant alloc] initWithDictionaryRepresentation:objectRepresentationForDict] autorelease];
+ [self addAssistantsObject:assistantsObj];
+ }
+ for(id objectRepresentationForDict in [dictionary objectForKey:@"ModelCompany.departments"])
+ {
+ ModelDepartment *departmentsObj = [[[ModelDepartment alloc] initWithDictionaryRepresentation:objectRepresentationForDict] autorelease];
+ [self addDepartmentsObject:departmentsObj];
+ }
+ for(id objectRepresentationForDict in [dictionary objectForKey:@"ModelCompany.employees"])
+ {
+ ModelEmployee *employeesObj = [[[ModelEmployee alloc] initWithDictionaryRepresentation:objectRepresentationForDict] autorelease];
+ [self addEmployeesObject:employeesObj];
+ }
+ }
+
+ return self;
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+ NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[super dictionaryRepresentation]];
+ [dict setObjectIfNotNil:self.name forKey:@"ModelCompany.name"];
+ [dict setObjectIfNotNil:self.yearFounded forKey:@"ModelCompany.yearFounded"];
+ if([self.assistants count] > 0)
+ {
+ NSMutableSet *assistantsRepresentationsForDictionary = [NSMutableSet setWithCapacity:[self.assistants count]];
+ for(ModelAssistant *obj in self.assistants)
+ {
+ [assistantsRepresentationsForDictionary addObject:[obj dictionaryRepresentation]];
+ }
+ [dict setObjectIfNotNil:assistantsRepresentationsForDictionary forKey:@"ModelCompany.assistants"];
+ }
+ if([self.departments count] > 0)
+ {
+ NSMutableSet *departmentsRepresentationsForDictionary = [NSMutableSet setWithCapacity:[self.departments count]];
+ for(ModelDepartment *obj in self.departments)
+ {
+ [departmentsRepresentationsForDictionary addObject:[obj dictionaryRepresentation]];
+ }
+ [dict setObjectIfNotNil:departmentsRepresentationsForDictionary forKey:@"ModelCompany.departments"];
+ }
+ if([self.employees count] > 0)
+ {
+ NSMutableSet *employeesRepresentationsForDictionary = [NSMutableSet setWithCapacity:[self.employees count]];
+ for(ModelEmployee *obj in self.employees)
+ {
+ [employeesRepresentationsForDictionary addObject:[obj dictionaryRepresentation]];
+ }
+ [dict setObjectIfNotNil:employeesRepresentationsForDictionary forKey:@"ModelCompany.employees"];
+ }
+ return dict;
+}
+
+- (void)awakeFromDictionaryRepresentationInit
+{
+ if(self.sourceDictionaryRepresentation == nil)
+ return; // awakeFromDictionaryRepresentationInit has been already executed on this object.
+
+ for(ModelDepartment *departmentsObj in self.departments)
+ {
+ [departmentsObj awakeFromDictionaryRepresentationInit];
+ }
+ for(ModelAssistant *assistantsObj in self.assistants)
+ {
+ [assistantsObj awakeFromDictionaryRepresentationInit];
+ }
+ for(ModelEmployee *employeesObj in self.employees)
+ {
+ [employeesObj awakeFromDictionaryRepresentationInit];
+ }
+
+ [super awakeFromDictionaryRepresentationInit];
+}
+
+#pragma mark Direct access
+
+- (void)addAssistantsObject:(ModelAssistant*)value_ settingInverse: (BOOL) setInverse
+{
+ if(self.assistants == nil)
+ {
+ self.assistants = [NSMutableSet set];
+ }
+
+ [(NSMutableSet *)self.assistants addObject:value_];
+ if (setInverse == YES) {
+ [value_ setCompany: (ModelCompany*)self settingInverse: NO];
+ }
+}
+
+- (void)addAssistantsObject:(ModelAssistant*)value_
+{
+ [self addAssistantsObject:(ModelAssistant*)value_ settingInverse: YES];
+}
+
+- (void)removeAssistantsObjects
+{
+ self.assistants = [NSMutableSet set];
+}
+
+- (void)removeAssistantsObject:(ModelAssistant*)value_ settingInverse: (BOOL) setInverse
+{
+ if (setInverse == YES) {
+ [value_ setCompany: nil settingInverse: NO];
+ }
+ [(NSMutableSet *)self.assistants removeObject:value_];
+}
+
+- (void)removeAssistantsObject:(ModelAssistant*)value_
+{
+ [self removeAssistantsObject:(ModelAssistant*)value_ settingInverse: YES];
+}
+
+- (void)addDepartmentsObject:(ModelDepartment*)value_ settingInverse: (BOOL) setInverse
+{
+ if(self.departments == nil)
+ {
+ self.departments = [NSMutableSet set];
+ }
+
+ [(NSMutableSet *)self.departments addObject:value_];
+ if (setInverse == YES) {
+ [value_ setCompany: (ModelCompany*)self settingInverse: NO];
+ }
+}
+
+- (void)addDepartmentsObject:(ModelDepartment*)value_
+{
+ [self addDepartmentsObject:(ModelDepartment*)value_ settingInverse: YES];
+}
+
+- (void)removeDepartmentsObjects
+{
+ self.departments = [NSMutableSet set];
+}
+
+- (void)removeDepartmentsObject:(ModelDepartment*)value_ settingInverse: (BOOL) setInverse
+{
+ if (setInverse == YES) {
+ [value_ setCompany: nil settingInverse: NO];
+ }
+ [(NSMutableSet *)self.departments removeObject:value_];
+}
+
+- (void)removeDepartmentsObject:(ModelDepartment*)value_
+{
+ [self removeDepartmentsObject:(ModelDepartment*)value_ settingInverse: YES];
+}
+
+- (void)addEmployeesObject:(ModelEmployee*)value_ settingInverse: (BOOL) setInverse
+{
+ if(self.employees == nil)
+ {
+ self.employees = [NSMutableSet set];
+ }
+
+ [(NSMutableSet *)self.employees addObject:value_];
+ if (setInverse == YES) {
+ [value_ setCompany: (ModelCompany*)self settingInverse: NO];
+ }
+}
+
+- (void)addEmployeesObject:(ModelEmployee*)value_
+{
+ [self addEmployeesObject:(ModelEmployee*)value_ settingInverse: YES];
+}
+
+- (void)removeEmployeesObjects
+{
+ self.employees = [NSMutableSet set];
+}
+
+- (void)removeEmployeesObject:(ModelEmployee*)value_ settingInverse: (BOOL) setInverse
+{
+ if (setInverse == YES) {
+ [value_ setCompany: nil settingInverse: NO];
+ }
+ [(NSMutableSet *)self.employees removeObject:value_];
+}
+
+- (void)removeEmployeesObject:(ModelEmployee*)value_
+{
+ [self removeEmployeesObject:(ModelEmployee*)value_ settingInverse: YES];
+}
+
+
+- (void)dealloc
+{
+ self.name = nil;
+ self.yearFounded = nil;
+ self.assistants = nil;
+ self.departments = nil;
+ self.employees = nil;
+ [super dealloc];
+}
+
+#pragma mark Synthesizes
+
+@synthesize name;
+@synthesize yearFounded;
+@synthesize assistants;
+@synthesize departments;
+@synthesize employees;
+
+@end
View
63 ...ates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelDepartment.h
@@ -0,0 +1,63 @@
+//
+// ModelDepartment.h
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelDepartment.h instead.
+//
+
+
+#import <Foundation/Foundation.h>
+#import "ModelObject.h"
+#import "ModelObject.h"
+
+@class ModelDepartmentAssistant;
+@class ModelCompany;
+@class ModelDepartmentEmployee;
+
+
+@protocol _ModelDepartment
+
+@end
+
+
+@interface _ModelDepartment : ModelObject <NSCoding>
+{
+ NSString *name;
+
+
+ NSSet *assistants;
+
+ ModelCompany *company;
+
+ NSSet *employees;
+
+}
+
+@property (nonatomic, retain, readwrite) NSString *name;
+
+@property (nonatomic, retain, readonly) NSSet *assistants;
+@property (nonatomic, assign, readwrite) ModelCompany *company;
+
+@property (nonatomic, retain, readonly) NSSet *employees;
+
+
+- (void)addAssistantsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse;
+- (void)addAssistantsObject:(ModelDepartmentAssistant*)value_;
+- (void)removeAssistantsObjects;
+- (void)removeAssistantsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse;
+- (void)removeAssistantsObject:(ModelDepartmentAssistant*)value_;
+
+
+- (void)addEmployeesObject:(ModelDepartmentEmployee*)value_ settingInverse: (BOOL) setInverse;
+- (void)addEmployeesObject:(ModelDepartmentEmployee*)value_;
+- (void)removeEmployeesObjects;
+- (void)removeEmployeesObject:(ModelDepartmentEmployee*)value_ settingInverse: (BOOL) setInverse;
+- (void)removeEmployeesObject:(ModelDepartmentEmployee*)value_;
+
+
+- (void) setCompany: (ModelCompany*) company_ settingInverse: (BOOL) setInverse;
+
+
+@end
View
241 ...ates/Tyrone Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelDepartment.m
@@ -0,0 +1,241 @@
+//
+// ModelDepartment.m
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelDepartment.h instead.
+//
+
+
+#import "_ModelDepartment.h"
+
+#import "ModelDepartmentAssistant.h"
+#import "ModelCompany.h"
+#import "ModelDepartmentEmployee.h"
+
+@interface _ModelDepartment()
+@property (nonatomic, retain, readwrite) NSSet *assistants;
+@property (nonatomic, retain, readwrite) NSSet *employees;
+@end
+
+/** \ingroup DataModel */
+
+NS_INLINE NSMutableSet* NonretainingNSMutableSetMake()
+{
+ CFSetCallBacks callbacks = {0, NULL, NULL, CFCopyDescription, CFEqual, CFHash};
+ return [(NSMutableSet*) CFSetCreateMutable(0, 0, &callbacks) autorelease];
+}
+
+@implementation _ModelDepartment
+- (id)init
+{
+ if((self = [super init]))
+ {
+ }
+
+ return self;
+}
+
+- (id) initWithCoder: (NSCoder*) aDecoder
+{
+ if ([[super class] instancesRespondToSelector: @selector(initWithCoder:)]) {
+ self = [super initWithCoder: aDecoder];
+ } else {
+ self = [super init];
+ }
+ if (self) {
+ self.name = [aDecoder decodeObjectForKey: @"name"];
+ self.assistants = [aDecoder decodeObjectForKey: @"assistants"];
+ self.company = [aDecoder decodeObjectForKey: @"company"];
+ self.employees = [aDecoder decodeObjectForKey: @"employees"];
+ }
+ return self;
+}
+
+- (void) encodeWithCoder: (NSCoder*) aCoder
+{
+ [super encodeWithCoder: aCoder];
+ [aCoder encodeObject: self.name forKey: @"name"];
+ [aCoder encodeObject: self.assistants forKey: @"assistants"];
+ [aCoder encodeObject: self.company forKey: @"company"];
+ [aCoder encodeObject: self.employees forKey: @"employees"];
+}
+
+#pragma mark Scalar values
+
+
+#pragma mark Dictionary representation
+
+- (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary
+{
+ if((self = [super initWithDictionaryRepresentation:dictionary]))
+ {
+ self.name = [dictionary objectForKey:@"ModelDepartment.name"];
+ for(id objectRepresentationForDict in [dictionary objectForKey:@"ModelDepartment.assistants"])
+ {
+ ModelDepartmentAssistant *assistantsObj = [[[ModelDepartmentAssistant alloc] initWithDictionaryRepresentation:objectRepresentationForDict] autorelease];
+ [self addAssistantsObject:assistantsObj];
+ }
+ for(id objectRepresentationForDict in [dictionary objectForKey:@"ModelDepartment.employees"])
+ {
+ ModelDepartmentEmployee *employeesObj = [[[ModelDepartmentEmployee alloc] initWithDictionaryRepresentation:objectRepresentationForDict] autorelease];
+ [self addEmployeesObject:employeesObj];
+ }
+ }
+
+ return self;
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+ NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[super dictionaryRepresentation]];
+ [dict setObjectIfNotNil:self.name forKey:@"ModelDepartment.name"];
+ if([self.assistants count] > 0)
+ {
+ NSMutableSet *assistantsRepresentationsForDictionary = [NSMutableSet setWithCapacity:[self.assistants count]];
+ for(ModelDepartmentAssistant *obj in self.assistants)
+ {
+ [assistantsRepresentationsForDictionary addObject:[obj dictionaryRepresentation]];
+ }
+ [dict setObjectIfNotNil:assistantsRepresentationsForDictionary forKey:@"ModelDepartment.assistants"];
+ }
+ if([self.employees count] > 0)
+ {
+ NSMutableSet *employeesRepresentationsForDictionary = [NSMutableSet setWithCapacity:[self.employees count]];
+ for(ModelDepartmentEmployee *obj in self.employees)
+ {
+ [employeesRepresentationsForDictionary addObject:[obj dictionaryRepresentation]];
+ }
+ [dict setObjectIfNotNil:employeesRepresentationsForDictionary forKey:@"ModelDepartment.employees"];
+ }
+ return dict;
+}
+
+- (void)awakeFromDictionaryRepresentationInit
+{
+ if(self.sourceDictionaryRepresentation == nil)
+ return; // awakeFromDictionaryRepresentationInit has been already executed on this object.
+
+ for(ModelDepartmentAssistant *assistantsObj in self.assistants)
+ {
+ [assistantsObj awakeFromDictionaryRepresentationInit];
+ }
+ for(ModelDepartmentEmployee *employeesObj in self.employees)
+ {
+ [employeesObj awakeFromDictionaryRepresentationInit];
+ }
+
+ [super awakeFromDictionaryRepresentationInit];
+}
+
+#pragma mark Direct access
+
+- (void)addAssistantsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse
+{
+ if(self.assistants == nil)
+ {
+ self.assistants = [NSMutableSet set];
+ }
+
+ [(NSMutableSet *)self.assistants addObject:value_];
+ if (setInverse == YES) {
+ [value_ setDepartment: (ModelDepartment*)self settingInverse: NO];
+ }
+}
+
+- (void)addAssistantsObject:(ModelDepartmentAssistant*)value_
+{
+ [self addAssistantsObject:(ModelDepartmentAssistant*)value_ settingInverse: YES];
+}
+
+- (void)removeAssistantsObjects
+{
+ self.assistants = [NSMutableSet set];
+}
+
+- (void)removeAssistantsObject:(ModelDepartmentAssistant*)value_ settingInverse: (BOOL) setInverse
+{
+ if (setInverse == YES) {
+ [value_ setDepartment: nil settingInverse: NO];
+ }
+ [(NSMutableSet *)self.assistants removeObject:value_];
+}
+
+- (void)removeAssistantsObject:(ModelDepartmentAssistant*)value_
+{
+ [self removeAssistantsObject:(ModelDepartmentAssistant*)value_ settingInverse: YES];
+}
+
+- (void)addEmployeesObject:(ModelDepartmentEmployee*)value_ settingInverse: (BOOL) setInverse
+{
+ if(self.employees == nil)
+ {
+ self.employees = [NSMutableSet set];
+ }
+
+ [(NSMutableSet *)self.employees addObject:value_];
+ if (setInverse == YES) {
+ [value_ setDepartment: (ModelDepartment*)self settingInverse: NO];
+ }
+}
+
+- (void)addEmployeesObject:(ModelDepartmentEmployee*)value_
+{
+ [self addEmployeesObject:(ModelDepartmentEmployee*)value_ settingInverse: YES];
+}
+
+- (void)removeEmployeesObjects
+{
+ self.employees = [NSMutableSet set];
+}
+
+- (void)removeEmployeesObject:(ModelDepartmentEmployee*)value_ settingInverse: (BOOL) setInverse
+{
+ if (setInverse == YES) {
+ [value_ setDepartment: nil settingInverse: NO];
+ }
+ [(NSMutableSet *)self.employees removeObject:value_];
+}
+
+- (void)removeEmployeesObject:(ModelDepartmentEmployee*)value_
+{
+ [self removeEmployeesObject:(ModelDepartmentEmployee*)value_ settingInverse: YES];
+}
+
+- (void) setCompany: (ModelCompany*) company_ settingInverse: (BOOL) setInverse
+{
+ if (company_ == nil && setInverse == YES) {
+ [company removeDepartmentsObject: (ModelDepartment*)self settingInverse: NO];
+ }
+ company = company_;
+ if (setInverse == YES) {
+ [company addDepartmentsObject: (ModelDepartment*)self settingInverse: NO];
+ }
+}
+
+- (void) setCompany: (ModelCompany*) company_
+{
+ [self setCompany: company_ settingInverse: YES];
+}
+
+- (ModelCompany*) company{
+ return company;
+}
+
+
+- (void)dealloc
+{
+ self.name = nil;
+ self.assistants = nil;
+ self.employees = nil;
+ [super dealloc];
+}
+
+#pragma mark Synthesizes
+
+@synthesize name;
+@synthesize assistants;
+@synthesize employees;
+
+@end
View
52 ...ne Trevorrow/ponso/sample project/PonsoTest/Sources/DataModel/_ModelDepartmentAssistant.h
@@ -0,0 +1,52 @@
+//
+// ModelDepartmentAssistant.h
+//
+// $Id$
+//
+// DO NOT EDIT. This file is machine-generated and constantly overwritten.
+// Make changes to ModelDepartmentAssistant.h instead.
+//
+
+
+#import <Foundation/Foundation.h>
+#import "ModelObject.h"
+#import "ModelObject.h"
+
+@class ModelAssistant;
+@class ModelDepartment;
+
+
+@protocol _ModelDepartmentAssistant
+
+- (ModelAssistant *)fetchAssistantObjectWithIDForAssistantRelationship:(id)objectID;
+
+@end
+
+
+@interface _ModelDepartmentAssistant : ModelObject <NSCoding>
+{
+ NSDate *startedWorking;
+
+
+ ModelAssistant *assistant;
+
+ ModelDepartment *department;
+
+}
+
+@property (nonatomic, retain, readwrite) NSDate *startedWorking;
+
+@property (nonatomic, retain, readwrite) ModelAssistant *assistant;
+@property (nonatomic, assign, readwrite) ModelDepartment *department;
+
+
+
+
+
+
+- (void) setAssistant: (ModelAssistant*) assistant_ settingInverse: (BOOL) setInverse;
+
+- (void) setDepartment: (ModelDepartment*) department_ settingInverse: (BOOL) setInverse;
+
+