/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xelement;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

/**
 * The Xpragma represents the FpragmaStatement (6.25) element in XcodeML
 * intermediate representation.
 *
 * Elements: contains value of the pragma line.
 *
 * @author clementval
 */

public class Xpragma extends XenhancedElement implements Xclonable<Xpragma> {

  /**
   * Xelement standard ctor. Pass the base element to the base class and read
   * inner information (elements and attributes).
   * @param baseElement The root element of the Xelement
   */
  public Xpragma(Element baseElement){
    super(baseElement);
  }

  /**
   * Clone the current object.
   * @return A new object Xpragma that is the clone of the current object.
   */
  public Xpragma cloneObject(){
    Node clone = cloneNode();
    return new Xpragma((Element)clone);
  }

  /**
   * Append information to the current pragma.
   * @param data New information to be inserted.
   */
  public void append(String data){
    setValue(getValue() + " " + data);
  }

}

@@ -126,16 +126,121 @@
 ement;%0A%0A
+import cx2x.xcodeml.exception.IllegalTransformationException;%0Aimport cx2x.xcodeml.helper.XelementHelper;%0A
 import o
@@ -1231,10 +1231,580 @@
 );%0A  %7D%0A%0A
+%0A  /**%0A   * Create a pragma statement with its original value.%0A   * @param value   String value of the pragma statement.%0A   * @param xcodeml Current XcodeML program unit in which the element will be%0A   *                created.%0A   * @return A new Xpragma object holding the element information.%0A   * @throws IllegalTransformationException%0A   */%0A  public static Xpragma create(String value, XcodeProgram xcodeml)%0A      throws IllegalTransformationException%0A  %7B%0A    Xpragma p = XelementHelper.createEmpty(Xpragma.class, xcodeml);%0A    p.setValue(value);%0A    return p;%0A  %7D%0A%0A
 %7D%0A

Add create method