Ejemplo n.º 1
0
 public static bool HasAllDependencies(BuildModule Module, HashSet<string> UnbuiltModules)
 {
     foreach (string Dependency in Module.Dependencies)
     {
         if (UnbuiltModules.Contains(Dependency))
         {
             return false;
         }
     }
     return true;
 }
Ejemplo n.º 2
0
 public static BuildModule FromXml(XmlNode Node)
 {
     BuildModule NewModule = new BuildModule(Node.Attributes["name"].Value, Node.Attributes["path"].Value, Node.Attributes["type"].Value);
     if (NewModule.Type == "cpp")
     {
         using (XmlNodeList DependencyNodeList = Node.SelectNodes("dependencies/dependency"))
         {
             foreach (XmlNode DependencyNode in DependencyNodeList)
             {
                 NewModule.Dependencies.Add(DependencyNode.Attributes["module"].Value);
             }
         }
         using (XmlNodeList DefinitionNodeList = Node.SelectNodes("definitions/definition"))
         {
             foreach (XmlNode DefinitionNode in DefinitionNodeList)
             {
                 NewModule.Definitions.Add(DefinitionNode.Attributes["name"].Value);
             }
         }
         using (XmlNodeList IncludeNodeList = Node.SelectNodes("includes/include"))
         {
             foreach (XmlNode IncludeNode in IncludeNodeList)
             {
                 NewModule.IncludePaths.Add(IncludeNode.Attributes["path"].Value);
             }
         }
     }
     return NewModule;
 }