1 '''
2 Defines an abstract base class acting as an interface for all walkers. Defines
3 the methods to be provided.
4
5 @author: Peter Parente
6 @organization: IBM Corporation
7 @copyright: Copyright (c) 2005, 2007 IBM Corporation
8 @license: The BSD License
9
10 All rights reserved. This program and the accompanying materials are made
11 available under the terms of the BSD license which accompanies
12 this distribution, and is available at
13 U{http://www.opensource.org/licenses/bsd-license.php}
14 '''
15
17 '''
18 Walks accessible hiearchy in a well-defined order determined by a subclass of
19 this base class. The traversal is stateless so that the walker can begin at
20 any node in the tree and walk in any direction.
21
22 @ivar por: The starting L{AEPor} for the L{AEWalker}
23 @type por: L{AEPor}
24 '''
26 '''
27 Stores the starting L{AEPor}.
28
29 @param por: The current L{AEPor} for the L{AEWalker}
30 @type por: L{AEPor}
31 '''
32 self.por = por
33
35 '''
36 @return: Point of regard to the current object
37 @rtype: L{AEPor}
38 @raise NotImplementedError: When not overriden in a subclass
39 '''
40 return self.por
41
43 '''
44 @return: Point of regard to the parent of the current object
45 @rtype: L{AEPor}
46 @raise NotImplementedError: When not overriden in a subclass
47 '''
48 raise NotImplementedError
49
51 '''
52 @return: Point of regard to the next object in the walk order
53 @rtype: L{AEPor}
54 @raise NotImplementedError: When not overriden in a subclass
55 '''
56 raise NotImplementedError
57
59 '''
60 @return: Point of regard to the previous object in the walk order
61 @rtype: L{AEPor}
62 @raise NotImplementedError: When not overriden in a subclass
63 '''
64 raise NotImplementedError
65
67 '''
68 @return: Point of regard to the first of all objects
69 @rtype: L{AEPor}
70 @raise NotImplementedError: When not overriden in a subclass
71 '''
72 raise NotImplementedError
73
75 '''
76 @return: Point of regard to the last of all objects
77 @rtype: L{AEPor}
78 @raise NotImplementedError: When not overriden in a subclass
79 '''
80 raise NotImplementedError
81