summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/cgram/LineObject.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 22:42:48 +0000
committerKenneth Russel <[email protected]>2009-06-15 22:42:48 +0000
commitc91f003551542c2aab62dd8ef89a7894c7e50689 (patch)
treee49c45b21c3ebeb8d238e8eb96415c745f9427da /src/java/com/sun/gluegen/cgram/LineObject.java
parent90bcb596e88898f807b39c9e7c85485ab8c006b6 (diff)
Copied JOGL_2_SANDBOX r145 on to trunk; JOGL_2_SANDBOX branch is now closed
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@147 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/cgram/LineObject.java')
-rw-r--r--src/java/com/sun/gluegen/cgram/LineObject.java126
1 files changed, 126 insertions, 0 deletions
diff --git a/src/java/com/sun/gluegen/cgram/LineObject.java b/src/java/com/sun/gluegen/cgram/LineObject.java
new file mode 100644
index 0000000..0ed470c
--- /dev/null
+++ b/src/java/com/sun/gluegen/cgram/LineObject.java
@@ -0,0 +1,126 @@
+package com.sun.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();
+ }
+}
+