def __GetDefaultValues(self, elem: ET.Element, ownerPackageName: str) -> LocalPackageDefaultValues: defaultValues = LocalPackageDefaultValues() customizations = set() # type: Set[str] for child in elem: key = DefaultValueName.DEFAULT_PLATFORM_Supported if child.tag == key: defaultValues.Platform_Supported = self._ReadBoolAttrib(child, "Value") if key in customizations: raise DefaultValueAlreadyDefinedException(child, key) customizations.add(key) elif child.tag.startswith('Default.'): raise UnknownDefaultValueException(child) return defaultValues
def __init__(self, config: Config, defaultPackageLanguage: int) -> None: super().__init__(config, FakeXmlElementFactory.CreateWithName("FakeGenFile", "FSLBUILD_INVALID_INITIAL_VALUE"), SubPackageSupportConfig(PackageType.TopLevel, SubPackageSupport.Disabled)) self.SourceFilename = None # type: Optional[str] self.SourceFileHash = "" # type: str self.Name = '' self.ShortName = None # type: Optional[str] self.Namespace = None # type: Optional[str] self.PackageFile = None # type: Optional[PackageFile] self.PackageLocation = None # type: Optional[ToolConfigPackageLocation] self.Type = PackageType.Library self.IsVirtual = False self.DirectDependencies = [] # type: List[XmlGenFileDependency] self.DirectRequirements = [] # type: List[XmlGenFileRequirement] self.DirectDefines = [] self.DirectExperimentalRecipe = None # type: Optional[XmlExperimentalRecipe] self.Platforms = {} # type: Dict[str, XmlGenFilePlatform] self.IncludePath = None # type: Optional[PackagePath] self.SourcePath = None # type: Optional[PackagePath] self.ContentPath = None # type: Optional[PackagePath] self.ContentSourcePath = None # type: Optional[PackagePath] self.PackageLanguage = defaultPackageLanguage self.BaseIncludePath = "include" self.BaseSourcePath = "source" self.BuildCustomization = {} # type: Dict[str, XmlGenFileBuildCustomization] self.CompanyName = "NotDefined" self.CreationYear = None # type: Optional[str] self.TemplateType = "" self.AllowCheck = True self.EnableExtendedSourceExtensions = False self.AllowCombinedDirectory = False self.PackageNameBasedIncludePath = True self.PlatformDefaultSupportedValue = True self.SystemDefaultValues = LocalPackageDefaultValues() self.UnitTest = False self.ShowInMainReadme = True