From: <ki...@us...> - 2003-02-11 02:26:58
|
Update of /cvsroot/pymerase/pymerase/util In directory sc8-pr-cvs1:/tmp/cvs-serv24467 Modified Files: iPymeraseUtil.py Log Message: Updated functions so that they may be used by output modules Index: iPymeraseUtil.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/util/iPymeraseUtil.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** iPymeraseUtil.py 30 Oct 2002 23:08:10 -0000 1.3 --- iPymeraseUtil.py 11 Feb 2003 02:26:55 -0000 1.4 *************** *** 67,71 **** ! def getClassByName(classList, className): """ Given a list of classes and a className --- 67,71 ---- ! def getClassByName(classList, className, translator=TRANSLATOR_NAME): """ Given a list of classes and a className *************** *** 75,79 **** """ for cls in classList: ! if cls.getName(TRANSLATOR_NAME) == className: return cls --- 75,79 ---- """ for cls in classList: ! if cls.getName(translator) == className: return cls *************** *** 81,85 **** ! def getAttribByName(attibList, attribName): """ Given a list of attributes and an attribute name --- 81,85 ---- ! def getAttribByName(attribList, attribName, translator=TRANSLATOR_NAME): """ Given a list of attributes and an attribute name *************** *** 89,93 **** """ for attrib in attribList: ! if attrib.getName(TRANSLATOR_NAME) == attribName: return attrib --- 89,93 ---- """ for attrib in attribList: ! if attrib.getName(translator) == attribName: return attrib *************** *** 95,99 **** ! def getAssocByName(assocList, assocName): """ Given a list of associations and an association name --- 95,99 ---- ! def getAssocByName(assocList, assocName, translator=TRANSLATOR_NAME): """ Given a list of associations and an association name *************** *** 103,107 **** """ for assoc in assocList: ! if assoc.getName(TRANSLATOR_NAME) == assocName: return assoc --- 103,107 ---- """ for assoc in assocList: ! if assoc.getName(translator) == assocName: return assoc |