Package pyxsd :: Package transforms :: Module transform :: Class Transform
[hide private]
[frames] | no frames]

Class Transform

source code

object --+
         |
        Transform
Known Subclasses:
cellSizer.CellSizer

The base abstract class for all transforms. All methods should mix into the usable transform classes. Contains methods to retrieve elements from the tree.

Instance Methods [hide private]
  __init__(self)
Cannot Initialize a true abstact class!
  makeElemObj(self, name)
Creates a new element that contains the proper tree stucture
  makeCommentElem(self, comment)
  walk(self, instance, visitor, *args, **kwargs)
  classCollector(self, instance, attrNames, elemNames, collectorDict)
Visitor function to make a dictionary that associates a class with its instances.
  tagCollector(self, instance, attrNames, elemNames, collectorDict)
A visitor function that is used to make a dictionary that associates a tag name with its children.
  tagFinder(self, instance, attrNames, elemNames, collection, name)
A visitor function to collect all tags with a particular name, and put them into a list.
  getInstancesByClassName(self, root)
Function to use the walk function with the classCollector visitor function.
  getAllSubElements(self, root)
Function to use the walk function with the tagCollector visitor function to make a dictionary that associates all elements with their sub-Elements.
  getElementsByName(self, root, name)
Function to use the walk function with the tagFinder visitor function to make a list containing all elements with a particular name.
  find(self, tagName, baseElem)
  findAll(self, tagName, baseElem)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self)
(Constructor)

source code 
Cannot Initialize a true abstact class!
Overrides: object.__init__

makeElemObj(self, name)

source code 
Creates a new element that contains the proper tree stucture

makeCommentElem(self, comment)

source code 
None

walk(self, instance, visitor, *args, **kwargs)

source code 
None

classCollector(self, instance, attrNames, elemNames, collectorDict)

source code 
Visitor function to make a dictionary that associates a class with its instances. The class name is the key, and the value is the list of associated instances. SEE getInstancesByClassName

tagCollector(self, instance, attrNames, elemNames, collectorDict)

source code 
A visitor function that is used to make a dictionary that associates a tag name with its children. SEE getAllSubElements

tagFinder(self, instance, attrNames, elemNames, collection, name)

source code 
A visitor function to collect all tags with a particular name, and put them into a list. SEE getElementsByName

getInstancesByClassName(self, root)

source code 
Function to use the walk function with the classCollector visitor function. Used to associate a class name with the class' instances.

getAllSubElements(self, root)

source code 
Function to use the walk function with the tagCollector visitor function to make a dictionary that associates all elements with their sub-Elements.

getElementsByName(self, root, name)

source code 
Function to use the walk function with the tagFinder visitor function to make a list containing all elements with a particular name.

find(self, tagName, baseElem)

source code 
None

findAll(self, tagName, baseElem)

source code 
None