|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openfdl.core.OpenFDL
public class OpenFDL
OpenFDL.java Main entry point for OpenFDL. Meaning this is where arguments are checked, the parser is called and output processing is handled. Also contains the program name and version strings in case someone cares.
Field Summary | |
---|---|
private static boolean |
buildStatus
|
protected static java.lang.String |
PRODUCT_NAME
|
protected static java.lang.String |
PRODUCT_VERSION
|
Constructor Summary | |
---|---|
OpenFDL()
|
Method Summary | |
---|---|
private static java.lang.String |
format(java.lang.String str,
int width)
Right justifies the input string over the given width. |
static void |
main(java.lang.String[] args)
Checks areguments and calls the parser. |
private static void |
parseFile(java.lang.String inFile,
java.lang.String outFile)
Parses an input file to create a properly formatted C header file. |
private static void |
printFileHeader(java.io.PrintStream out,
java.lang.String inFile,
java.lang.String outFile)
Prints the file header to a supplied PrintStream object. |
private static void |
printUsage(java.io.PrintStream out)
Prints help on how to run this program from the console. |
static void |
setBuildFailed()
Changes the build status to failure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String PRODUCT_NAME
protected static final java.lang.String PRODUCT_VERSION
private static boolean buildStatus
Constructor Detail |
---|
public OpenFDL()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- Program arguments from the console. Possible arguments
include:
parseFile(String, String)
,
printUsage(PrintStream)
public static void setBuildFailed()
private static void parseFile(java.lang.String inFile, java.lang.String outFile)
inFile
- Create output from this file.outFile
- Header file to send frame attribute data to.FrameAttrNode
private static void printFileHeader(java.io.PrintStream out, java.lang.String inFile, java.lang.String outFile)
PrintStream
object.
More specifically just outputs the file we are to create, the date,
the input we got, and what is outputing this code (this compiler).
out
- PrintStream
to output this info to. Usually a
file.inFile
- The input filename that we are processing.outFile
- The output filename.private static void printUsage(java.io.PrintStream out)
java -jar openfdl.jar inputfile.fdl [outputfile.h]
inputfile.fdl
is a *.fdl file created by the user.
outputfile.h
is the C header file to send output. If
help is needed you may also use ?
or help
.
out
- Send output to this PrintStream
object.
Usually System.out
.private static java.lang.String format(java.lang.String str, int width)
System.out.println(format("OpenFDL", 10));
results in [ OpenFDL] being printed.
str
- Input string to right justify.width
- Length of new string to create, generally greater than
length of input string.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |