ProjectController.py
changeset 731 4fc681ed0c61
parent 730 4480b7da6bea
child 732 c4b0f117e106
equal deleted inserted replaced
730:4480b7da6bea 731:4fc681ed0c61
    60               </xsd:complexType>
    60               </xsd:complexType>
    61             </xsd:element>
    61             </xsd:element>
    62             <xsd:element name="Libraries" minOccurs="0">
    62             <xsd:element name="Libraries" minOccurs="0">
    63               <xsd:complexType>
    63               <xsd:complexType>
    64               """+"\n".join(['<xsd:attribute name="Enable_'+
    64               """+"\n".join(['<xsd:attribute name="Enable_'+
    65                              lib.rsplit('.',1)[-1]+
    65                              libname+
    66                              '" type="xsd:boolean" use="optional" default="true"/>' 
    66                              '_Library" type="xsd:boolean" use="optional" default="true"/>' 
    67                              for lib in features.libraries])+"""
    67                              for libname,lib in features.libraries])+"""
    68               </xsd:complexType>
    68               </xsd:complexType>
    69             </xsd:element>
    69             </xsd:element>
    70           </xsd:sequence>
    70           </xsd:sequence>
    71           <xsd:attribute name="URI_location" type="xsd:string" use="optional" default=""/>
    71           <xsd:attribute name="URI_location" type="xsd:string" use="optional" default=""/>
    72           <xsd:attribute name="Disable_Extensions" type="xsd:boolean" use="optional" default="false"/>
    72           <xsd:attribute name="Disable_Extensions" type="xsd:boolean" use="optional" default="false"/>
   110         self.ConfNodeMethods = [dic.copy() for dic in self.ConfNodeMethods]
   110         self.ConfNodeMethods = [dic.copy() for dic in self.ConfNodeMethods]
   111 
   111 
   112     def LoadLibraries(self):
   112     def LoadLibraries(self):
   113         self.Libraries = []
   113         self.Libraries = []
   114         TypeStack=[]
   114         TypeStack=[]
   115         for clsname in features.libraries:
   115         for libname,clsname in features.libraries:
   116             if self.BeremizRoot.Libraries is None or getattr(self.BeremizRoot.Libraries, "Enable_"+clsname.rsplit('.',1)[-1]):
   116             if self.BeremizRoot.Libraries is None or getattr(self.BeremizRoot.Libraries, "Enable_"+libname+"_Library"):
   117                 Lib = GetClassImporter(clsname)()(TypeStack)
   117                 Lib = GetClassImporter(clsname)()(libname, TypeStack)
   118                 TypeStack.append(Lib.GetTypes())
   118                 TypeStack.append(Lib.GetTypes())
   119                 self.Libraries.append(Lib)
   119                 self.Libraries.append(Lib)
   120 
   120 
   121     def __del__(self):
   121     def __del__(self):
   122         if self.DebugTimer:
   122         if self.DebugTimer: