From bf911ac87c17599bc07bb25726f1fa332d233a64 Mon Sep 17 00:00:00 2001 From: randomguy3 Date: Sun, 11 Mar 2012 15:20:43 +0000 Subject: Tidy methods up git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@425 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64 --- tikzit/src/common/Node.h | 2 ++ tikzit/src/common/Node.m | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'tikzit/src/common') 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 -- cgit v1.2.3