Esempio n. 1
0
 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_ = {}
Esempio n. 2
0
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)
Esempio n. 3
0
 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
Esempio n. 4
0
 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
Esempio n. 5
0
    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))
Esempio n. 6
0
    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))