venus: Remove dedebug
[openafs.git] / src / platform / DARWIN / AFSPreference / CellIp.m
1 //
2 //  CellIp.m
3 //  AFSCommander
4 //
5 //  Created by Claudio Bisegni on 14/06/07.
6 //  Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved.
7 //
8
9 #import "CellIp.h"
10
11
12 @implementation CellIp
13 // -------------------------------------------------------------------------------
14 //  init:
15 // -------------------------------------------------------------------------------
16 -(id)init {
17         [super init];
18         ip = @"0.0.0.0";
19         ipComment = @"-----";
20         return self;
21 }
22
23 // -------------------------------------------------------------------------------
24 //  dealloc:
25 // -------------------------------------------------------------------------------
26 -(void)dealloc{
27         if(ip) [ip release];
28         if(ipComment) [ipComment release];
29         [super dealloc];
30 }
31
32 // -------------------------------------------------------------------------------
33 //  setCellIp:
34 // -------------------------------------------------------------------------------
35 -(void)setCellIp:(NSString*)newip{
36         if(ip){
37                 [ip release];
38         }
39         ip = [newip retain];
40 }
41
42 // -------------------------------------------------------------------------------
43 //  getCellIp:
44 // -------------------------------------------------------------------------------
45 -(NSString*) getCellIp{
46         return ip;
47 }
48
49 // -------------------------------------------------------------------------------
50 //  setCellComment:(NSString*)newcomment
51 // -------------------------------------------------------------------------------
52 -(void)setCellComment:(NSString*)newcomment{
53         if(ipComment){
54                 [ipComment release];
55         }
56         ipComment = [newcomment retain];
57 }
58
59 // -------------------------------------------------------------------------------
60 //  getCellComment:
61 // -------------------------------------------------------------------------------
62 -(NSString*) getCellComment{
63         return ipComment;
64 }
65
66 // -------------------------------------------------------------------------------
67 //  description:
68 // -------------------------------------------------------------------------------
69 -(NSString*) description{
70         NSMutableString *desc = [[NSMutableString alloc] init];
71         [desc autorelease];
72         [desc appendString:ip];[desc appendString:@" "];[desc appendString:@"#"];[desc appendString:ipComment];[desc appendString:@"\n"];
73         return desc;
74 }
75
76 @end