mirror of https://github.com/acidanthera/audk.git
first step for MsaOwner in ModuleInfo
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1595 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
423ba71f85
commit
6ef5feb50e
|
@ -15,6 +15,8 @@ package org.tianocore.migration;
|
|||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.tianocore.ModuleSurfaceAreaDocument;
|
||||
|
||||
/*
|
||||
Class ModuleInfo is built for scanning the source files, it contains all the needed
|
||||
information and all the temporary data.
|
||||
|
@ -28,6 +30,9 @@ public final class ModuleInfo {
|
|||
public final String modulepath;
|
||||
public final String temppath;
|
||||
|
||||
private MsaOwner msaowner = new MsaWriter(this);
|
||||
public ModuleSurfaceAreaDocument msadoc = ModuleSurfaceAreaDocument.Factory.newInstance();
|
||||
|
||||
public String modulename = null;
|
||||
public String guidvalue = null;
|
||||
public String moduletype = null;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package org.tianocore.migration;
|
||||
|
||||
public interface MsaOwner {
|
||||
public void addSourceFiles(String filename, int arch);
|
||||
}
|
|
@ -19,14 +19,14 @@ import org.tianocore.*;
|
|||
import org.tianocore.SupportedArchitectures.Enum;
|
||||
import org.apache.xmlbeans.*;
|
||||
|
||||
public class MsaWriter {
|
||||
MsaWriter(ModuleInfo moduleinfo) {
|
||||
mi = moduleinfo;
|
||||
}
|
||||
|
||||
public class MsaWriter implements MsaOwner {
|
||||
MsaWriter(ModuleInfo moduleinfo) {
|
||||
mi = moduleinfo;
|
||||
msadoc = mi.msadoc;
|
||||
}
|
||||
|
||||
private ModuleInfo mi;
|
||||
|
||||
private ModuleSurfaceAreaDocument msadoc = ModuleSurfaceAreaDocument.Factory.newInstance();
|
||||
private ModuleSurfaceAreaDocument msadoc;
|
||||
|
||||
private ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = msadoc.addNewModuleSurfaceArea();
|
||||
private MsaHeaderDocument.MsaHeader msaheader = msa.addNewMsaHeader();
|
||||
|
@ -207,6 +207,14 @@ public class MsaWriter {
|
|||
bw.close();
|
||||
}
|
||||
|
||||
//---------------------------MsaOwner---------------------------------//
|
||||
|
||||
public void addSourceFiles(String filename, int arch) {
|
||||
|
||||
}
|
||||
|
||||
//---------------------------MsaOwner---------------------------------//
|
||||
|
||||
public static final void parse(String msafile) throws Exception {
|
||||
ModuleSurfaceAreaDocument msadoc = ModuleSurfaceAreaDocument.Factory.parse(msafile);
|
||||
flush("c:\\temp.msa", msadoc);
|
||||
|
|
Loading…
Reference in New Issue