summaryrefslogtreecommitdiffstats
path: root/src/net/java/games/gluegen/cgram/LineObject.java
diff options
context:
space:
mode:
authordjp <[email protected]>2003-06-08 19:27:01 +0000
committerdjp <[email protected]>2003-06-08 19:27:01 +0000
commitd49fd968963909f181423eae46c613189468fac3 (patch)
treeb231329e6b65fd54aa24b3bcc0a3ecc623daec61 /src/net/java/games/gluegen/cgram/LineObject.java
parent9c8fb046dee5d832bea3f36dcbd43285054f49a0 (diff)
Initial revision
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@3 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen/cgram/LineObject.java')
-rw-r--r--src/net/java/games/gluegen/cgram/LineObject.java126
1 files changed, 126 insertions, 0 deletions
diff --git a/src/net/java/games/gluegen/cgram/LineObject.java b/src/net/java/games/gluegen/cgram/LineObject.java
new file mode 100644
index 000000000..578e14194
--- /dev/null
+++ b/src/net/java/games/gluegen/cgram/LineObject.java
@@ -0,0 +1,126 @@
+package net.java.games.gluegen.cgram;
+
+class LineObject {
+ LineObject parent = null;
+ String source = "";
+ int line = 1;
+ boolean enteringFile = false;
+ boolean returningToFile = false;
+ boolean systemHeader = false;
+ boolean treatAsC = false;
+
+ public LineObject()
+ {
+ super();
+ }
+
+ public LineObject( LineObject lobj )
+ {
+ parent = lobj.getParent();
+ source = lobj.getSource();
+ line = lobj.getLine();
+ enteringFile = lobj.getEnteringFile();
+ returningToFile = lobj.getReturningToFile();
+ systemHeader = lobj.getSystemHeader();
+ treatAsC = lobj.getTreatAsC();
+ }
+
+ public LineObject( String src)
+ {
+ source = src;
+ }
+
+ public void setSource(String src)
+ {
+ source = src;
+ }
+
+ public String getSource()
+ {
+ return source;
+ }
+
+ public void setParent(LineObject par)
+ {
+ parent = par;
+ }
+
+ public LineObject getParent()
+ {
+ return parent;
+ }
+
+ public void setLine(int l)
+ {
+ line = l;
+ }
+
+ public int getLine()
+ {
+ return line;
+ }
+
+ public void newline()
+ {
+ line++;
+ }
+
+ public void setEnteringFile(boolean v)
+ {
+ enteringFile = v;
+ }
+
+ public boolean getEnteringFile()
+ {
+ return enteringFile;
+ }
+
+ public void setReturningToFile(boolean v)
+ {
+ returningToFile = v;
+ }
+
+ public boolean getReturningToFile()
+ {
+ return returningToFile;
+ }
+
+ public void setSystemHeader(boolean v)
+ {
+ systemHeader = v;
+ }
+
+ public boolean getSystemHeader()
+ {
+ return systemHeader;
+ }
+
+ public void setTreatAsC(boolean v)
+ {
+ treatAsC = v;
+ }
+
+ public boolean getTreatAsC()
+ {
+ return treatAsC;
+ }
+
+ public String toString() {
+ StringBuffer ret;
+ ret = new StringBuffer("# " + line + " \"" + source + "\"");
+ if (enteringFile) {
+ ret.append(" 1");
+ }
+ if (returningToFile) {
+ ret.append(" 2");
+ }
+ if (systemHeader) {
+ ret.append(" 3");
+ }
+ if (treatAsC) {
+ ret.append(" 4");
+ }
+ return ret.toString();
+ }
+}
+