Skip to content

Commit

Permalink
Make generated machine classes and their attributes public.
Browse files Browse the repository at this point in the history
  • Loading branch information
fritza committed Dec 7, 2014
1 parent 448e833 commit 2c8b11c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum <$managedObjectClassName$>UserInfo: String {<$foreach UserInfo userInfoKeyV
}
<$endif$>

@objc
@objc public
class _<$managedObjectClassName$>: <$customSuperentity$> {

// MARK: - Class methods
Expand Down Expand Up @@ -56,18 +56,18 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
<$if Attribute.hasDefinedAttributeType$>
<$if Attribute.hasScalarAttributeType$>
<$if Attribute.isReadonly$>
@NSManaged
@NSManaged public
let <$Attribute.name$>: NSNumber?
<$else$>
@NSManaged
@NSManaged public
var <$Attribute.name$>: NSNumber?
<$endif$>
<$else$>
<$if Attribute.isReadonly$>
@NSManaged
@NSManaged public
let <$Attribute.name$>: <$Attribute.objectAttributeType$><$if Attribute.isOptional$>?<$endif$>
<$else$>
@NSManaged
@NSManaged public
var <$Attribute.name$>: <$Attribute.objectAttributeType$><$if Attribute.isOptional$>?<$endif$>
<$endif$>
<$endif$>
Expand All @@ -78,11 +78,11 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
// MARK: - Relationships
<$foreach Relationship noninheritedRelationships do$>
<$if Relationship.isToMany$>
@NSManaged
@NSManaged public
var <$Relationship.name$>: <$Relationship.immutableCollectionClassName$>

<$else$>
@NSManaged
@NSManaged public
var <$Relationship.name$>: <$Relationship.destinationEntity.managedObjectClassName$><$if Relationship.isOptional$>?<$endif$>

// func validate<$Relationship.name.initialCapitalString$>(value: AutoreleasingUnsafePointer<AnyObject>, error: NSErrorPointer) {}
Expand Down Expand Up @@ -154,7 +154,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
<$endforeach do$>

<$foreach FetchedProperty noninheritedFetchedProperties do$>
@NSManaged
@NSManaged public
let <$FetchedProperty.name$>: [<$FetchedProperty.entity.managedObjectClassName$>]
<$endforeach do$>
}
Expand Down Expand Up @@ -187,4 +187,4 @@ extension _<$managedObjectClassName$> {
}

}
<$endif$><$endforeach do$>
<$endif$><$endforeach do$>

0 comments on commit 2c8b11c

Please sign in to comment.