diff options
author | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-03-11 15:20:43 +0000 |
---|---|---|
committer | randomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64> | 2012-03-11 15:20:43 +0000 |
commit | bf911ac87c17599bc07bb25726f1fa332d233a64 (patch) | |
tree | 1a59d4dccf02f54d493174ddead94bd2e53e3b4e | |
parent | 84d4bc6f0f38e237f2a40faaf75e921211ab0ac6 (diff) |
Tidy methods up
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@425 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
-rw-r--r-- | tikzit/src/common/Node.h | 2 | ||||
-rw-r--r-- | tikzit/src/common/Node.m | 26 |
2 files changed, 15 insertions, 13 deletions
diff --git a/tikzit/src/common/Node.h b/tikzit/src/common/Node.h index e2d4520..1e580ce 100644 --- a/tikzit/src/common/Node.h +++ b/tikzit/src/common/Node.h @@ -50,6 +50,8 @@ @brief The shape to use @detail This is a convenience property that resolves the shape name from the style, and uses a circle if there is no style. + + This property is NOT KVO-compliant */ @property (readonly) Shape *shape; diff --git a/tikzit/src/common/Node.m b/tikzit/src/common/Node.m index db1da44..7818a28 100644 --- a/tikzit/src/common/Node.m +++ b/tikzit/src/common/Node.m @@ -42,6 +42,19 @@ return self; } +- (id)copyWithZone:(NSZone*)z { + Node *cp = [[Node allocWithZone:z] init]; + [cp setPropertiesFromNode:self]; + return cp; +} + +- (void)dealloc { + [name release]; + [style release]; + [data release]; + [super dealloc]; +} + - (Shape*) shape { if (style) { return [Shape shapeForName:[style shapeName]]; @@ -172,19 +185,6 @@ [self updateData]; } -- (void)dealloc { - [name release]; - [style release]; - [data release]; - [super dealloc]; -} - -- (id)copyWithZone:(NSZone*)z { - Node *cp = [[Node allocWithZone:z] init]; - [cp setPropertiesFromNode:self]; - return cp; -} - @end // vi:ft=objc:ts=4:noet:sts=4:sw=4 |