|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GBXGenerator
The is a DOM-based GBX Generator. It is used to write macro and workspace files. Outputs DOM to a String using the DOM Serializer. Cool, huh?
Field Summary | |
(package private) CircuitDiagram |
CD
Our circuitDiagram |
(package private) org.w3c.dom.Document |
doc
The document that we will be creating. |
(package private) GateBuilder |
gb
Our very own GateBulder |
(package private) int |
type
This tells us what we want to generate ( a workspace, a macro, or both) |
Constructor Summary | |
(package private) |
GBXGenerator(CircuitDiagram newCD,
GateBuilder newGB)
Nominal Constructor. |
Method Summary | |
org.w3c.dom.Element |
connection2xml(GraphicGate obj,
GraphicGate input)
Takes two gates and generates an xml connection between them. |
org.w3c.dom.Element |
gate2xml(GraphicGate obj)
Takes a gate and returns a dom object representing that gate. |
java.lang.String |
generate(boolean isMacro)
This method actually generates the String. |
org.w3c.dom.Element |
macro2xml(Macro macro)
Takes a macro object and returns a DOM element representing the objec. |
Methods inherited from class java.lang.Object |
|
Field Detail |
org.w3c.dom.Document doc
CircuitDiagram CD
GateBuilder gb
int type
Constructor Detail |
GBXGenerator(CircuitDiagram newCD, GateBuilder newGB)
newCD
- The circuidiagram that we will use.newGB
- The gatebuilder to raise alters.Method Detail |
public java.lang.String generate(boolean isMacro)
isMacro
- tells whether or not this is a call from the exportMacro
function.public org.w3c.dom.Element connection2xml(GraphicGate obj, GraphicGate input)
obj
- the source gate.input
- the destination gate.public org.w3c.dom.Element gate2xml(GraphicGate obj)
obj
- the gate we would like to translate.public org.w3c.dom.Element macro2xml(Macro macro)
macro
- The macro to convert.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |