def __init__(self): """Initialize the TypeList object.""" self.dataTypeDict_ = utilities.serializeObject(datatype.DataTypeDict, 'metadata/types/types') self.superTypeDict_ = utilities.serializeObject( supertype.SuperTypeDict, 'metadata/types/supertypes') # A dictionary of all FullType objects required for this running instance of gensrc. # Each FullType object is created on the fly as required and is derived # from a pair of DataType/SuperType objects (deserialized above). self.fullTypeDict_ = {}
def init(ohDir): """Initialize the application. Logically these operations belong to the constructor of class Environment but must be physically separate to avoid circular imports.""" config = utilities.serializeObject(configuration.Configuration, 'config/config') environment.Environment.instance().init(config, typelist.TypeList(), ohDir)
def loadCategories(self, catList, configPath): if not configPath: return for categoryName in catList: cat = utilities.serializeObject(category.Category, configPath + 'metadata/functions/' + categoryName) if self.categoryDict_.has_key(cat.name()): raise exceptions.DuplicateNameException(cat.name()) self.categoryDict_[cat.name()] = cat
def loadCategories(self, catList, configPath): if not configPath: return for categoryName in catList: cat = utilities.serializeObject( category.Category, configPath + 'metadata/functions/' + categoryName) if self.categoryDict_.has_key(cat.name()): raise exceptions.DuplicateNameException(cat.name()) self.categoryDict_[cat.name()] = cat
def __init__(self, addinIds): """Initialize the AddinList object.""" self.categoryList_ = categorylist.CategoryList() if environment.config().usingEnumerations(): self.enumerationList_ = enumerationlist.EnumerationList() else: self.enumerationList_ = None self.categoryList_.init(self.enumerationList_) self.addins_ = [] for addinId in addinIds: creator, fileName = AddinList.creators[addinId] self.addins_.append(utilities.serializeObject(creator, "metadata/addins/" + fileName))
def __init__(self, addinIds): """Initialize the AddinList object.""" self.categoryList_ = categorylist.CategoryList() if environment.config().usingEnumerations(): self.enumerationList_ = enumerationlist.EnumerationList() else: self.enumerationList_ = None self.categoryList_.init(self.enumerationList_) self.addins_ = [] for addinId in addinIds: creator, fileName = AddinList.creators[addinId] self.addins_.append( utilities.serializeObject(creator, 'metadata/addins/' + fileName))