GlueGen: src/java/com/jogamp/gluegen/cgram/LineObject.java Source File

GlueGen v2.6.0-rc-20250721 GlueGen, Native Binding Generator for Java™ (public API).

LineObject.java
Go to the documentation of this file.
1package com.jogamp.gluegen.cgram;
2
3class LineObject {
4 LineObject parent = null;
5 String source = "";
6 int line = 1;
7 boolean enteringFile = false;
8 boolean returningToFile = false;
9 boolean systemHeader = false;
10 boolean treatAsC = false;
11
12 public LineObject()
13 {
14 super();
15 }
16
17 public LineObject( final LineObject lobj )
18 {
19 parent = lobj.getParent();
20 source = lobj.getSource();
21 line = lobj.getLine();
22 enteringFile = lobj.getEnteringFile();
23 returningToFile = lobj.getReturningToFile();
24 systemHeader = lobj.getSystemHeader();
25 treatAsC = lobj.getTreatAsC();
26 }
27
28 public LineObject( final String src)
29 {
30 source = src;
31 }
32
33 public void setSource(final String src)
34 {
35 source = src;
36 }
37
38 public String getSource()
39 {
40 return source;
41 }
42
43 public void setParent(final LineObject par)
44 {
45 parent = par;
46 }
47
48 public LineObject getParent()
49 {
50 return parent;
51 }
52
53 public void setLine(final int l)
54 {
55 line = l;
56 }
57
58 public int getLine()
59 {
60 return line;
61 }
62
63 public void newline()
64 {
65 line++;
66 }
67
68 public void setEnteringFile(final boolean v)
69 {
70 enteringFile = v;
71 }
72
73 public boolean getEnteringFile()
74 {
75 return enteringFile;
76 }
77
78 public void setReturningToFile(final boolean v)
79 {
80 returningToFile = v;
81 }
82
83 public boolean getReturningToFile()
84 {
85 return returningToFile;
86 }
87
88 public void setSystemHeader(final boolean v)
89 {
90 systemHeader = v;
91 }
92
93 public boolean getSystemHeader()
94 {
95 return systemHeader;
96 }
97
98 public void setTreatAsC(final boolean v)
99 {
100 treatAsC = v;
101 }
102
103 public boolean getTreatAsC()
104 {
105 return treatAsC;
106 }
107
108 @Override
109 public String toString() {
110 StringBuilder ret;
111 ret = new StringBuilder("# " + line + " \"" + source + "\"");
112 if (enteringFile) {
113 ret.append(" 1");
114 }
115 if (returningToFile) {
116 ret.append(" 2");
117 }
118 if (systemHeader) {
119 ret.append(" 3");
120 }
121 if (treatAsC) {
122 ret.append(" 4");
123 }
124 return ret.toString();
125 }
126}
127