You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2002/12/01 15:51:58 UTC
cvs commit: xml-fop/src/org/apache/fop/xml FoXMLEvent.java XMLEvent.java
pbwest 2002/12/01 06:51:58
Modified: src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design
FoXMLEvent.java XMLEvent.java
Log:
Added copyEvent() methods.
Revision Changes Path
No revision
No revision
1.1.2.4 +29 -5 xml-fop/src/org/apache/fop/xml/Attic/FoXMLEvent.java
Index: FoXMLEvent.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/FoXMLEvent.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- FoXMLEvent.java 27 Nov 2002 03:24:35 -0000 1.1.2.3
+++ FoXMLEvent.java 1 Dec 2002 14:51:58 -0000 1.1.2.4
@@ -75,7 +75,7 @@
/**
* Clear the fields of this event. Provided for pool operations.
- * The <i>namespaces</i> field is not cleared.
+ * Neither the <i>namespaces</i> nor the <i>id</i> field is cleared.
* @return the cleared <tt>XMLEvent</tt> event.
*/
public XMLEvent clear() {
@@ -85,11 +85,35 @@
/**
* Clear the fields of this event. Provided for pool operations.
- * The <i>namespaces</i> field is not cleared.
+ * Neither the <i>namespaces</i> nor the <i>id</i> field is cleared.
* @return the cleared <tt>XMLEvent</tt> event.
*/
public FoXMLEvent clearFo() {
return (FoXMLEvent)clear();
+ }
+
+ /**
+ * Copy the fields of the argument event to this event.
+ * Provided for pool operations.
+ * Neither the <i>namespaces</i> nor the <i>id</i> field is copied.
+ * The <i>namespaces</i> field is not cleared.
+ * @param ev the <tt>XMLEvent</tt> to copy.
+ * @return the copied <tt>XMLEvent</tt> event.
+ */
+ public XMLEvent copyEvent(FoXMLEvent ev) {
+ foType = ev.foType;
+ return super.copyEvent(ev);
+ }
+
+ /**
+ * Copy the fields of the argument event to this event.
+ * Provided for pool operations.
+ * Neither the <i>namespaces</i> nor the <i>id</i> field is copied.
+ * The <i>namespaces</i> field is not cleared.
+ * @return the copied <tt>XMLEvent</tt> event.
+ */
+ public FoXMLEvent copyFoEvent(FoXMLEvent ev) {
+ return (FoXMLEvent)copyEvent(ev);
}
/**
1.1.2.10 +20 -3 xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java
Index: XMLEvent.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- XMLEvent.java 29 Nov 2002 17:35:24 -0000 1.1.2.9
+++ XMLEvent.java 1 Dec 2002 14:51:58 -0000 1.1.2.10
@@ -135,6 +135,23 @@
return this;
}
+ /**
+ * Copy the fields of the argument event to this event.
+ * Provided for pool operations.
+ * Neither the <i>namespaces</i> nor the <i>id</i> field is copied.
+ * @param ev the <tt>XMLEvent</tt> to copy.
+ * @return this (copied) event.
+ */
+ public XMLEvent copyEvent(XMLEvent ev) {
+ type = ev.type;
+ chars = ev.chars;
+ uriIndex = ev.uriIndex;
+ localName = ev.localName;
+ qName = ev.qName;
+ attributes = ev.attributes;
+ return this;
+ }
+
public int getType() { return type; }
public void setType(int type) {
if (type < MIN_XML_EV_TYPE || type > MAX_XML_EV_TYPE) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org