~ubuntu-branches/ubuntu/lucid/graphviz/lucid-updates

« back to all changes in this revision

Viewing changes to macosx/GVGraphArguments.m

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: GVGraphArguments.m,v 1.1 2008/02/11 12:34:07 glenlow Exp $ $Revision: 1.1 $ */
 
2
/* vim:set shiftwidth=4 ts=8: */
 
3
 
 
4
/**********************************************************
 
5
*      This software is part of the graphviz package      *
 
6
*                http://www.graphviz.org/                 *
 
7
*                                                         *
 
8
*            Copyright (c) 1994-2008 AT&T Corp.           *
 
9
*                and is licensed under the                *
 
10
*            Common Public License, Version 1.0           *
 
11
*                      by AT&T Corp.                      *
 
12
*                                                         *
 
13
*        Information and Software Systems Research        *
 
14
*              AT&T Research, Florham Park NJ             *
 
15
**********************************************************/
 
16
 
 
17
#import "GVGraphArguments.h"
 
18
#import "GVGraph.h"
 
19
 
 
20
@implementation GVGraphArguments
 
21
 
 
22
- (id)initWithGraph:(GVGraph *)graph
 
23
{
 
24
        if (self = [super init]) {
 
25
                _graph = graph; /* no retain to avoid a retain cycle */
 
26
                _arguments = [[NSMutableDictionary alloc] init];
 
27
        }
 
28
        return self;
 
29
}
 
30
 
 
31
- (NSUInteger)count
 
32
{
 
33
        return [_arguments count];
 
34
}
 
35
 
 
36
- (NSEnumerator *)keyEnumerator
 
37
{
 
38
        return [_arguments keyEnumerator];
 
39
}
 
40
 
 
41
- (id)objectForKey:(id)aKey
 
42
{
 
43
        return [_arguments objectForKey:aKey];
 
44
}
 
45
 
 
46
/* mutable dictionary primitive methods */
 
47
- (void)setObject:(id)anObject forKey:(id)aKey
 
48
{
 
49
        [_arguments setObject:anObject forKey:aKey];
 
50
        [_graph noteChanged:YES];
 
51
}
 
52
 
 
53
- (void)removeObjectForKey:(id)aKey
 
54
{
 
55
        [_arguments removeObjectForKey:aKey];
 
56
        [_graph noteChanged:YES];
 
57
}
 
58
 
 
59
- (void)dealloc
 
60
{
 
61
        [_arguments release];
 
62
        [super dealloc];
 
63
}
 
64
 
 
65
@end