/*
 * 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 cx2x.xcodeml.helper.*;

/**
 * The XstructConstructor represents the FstructConstructor (7.3.1) element in
 * XcodeML intermediate representation.
 *
 * Elements: ( exprModel )*
 * - Optional:
 *   - exprModel (XexprModel) TODO
 *
 * Attributes:
 * - Optional:
 *   - type (text)
 *
 * @author clementval
 */

public class XstructConstructor extends XbaseElement {

  private String _type = null;

  /**
   * 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 XstructConstructor(Element baseElement){
    super(baseElement);
    _type = XelementHelper.getAttributeValue(this,
      XelementName.ATTR_TYPE);
  }

  /**
   * Get the struct constructor type.
   * @return Type of the strcut constructor as a String value.
   */
  public String getType(){
    return _type;
  }

}

@@ -185,16 +185,68 @@
 per.*;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0A
 /**%0A * T
@@ -439,13 +439,8 @@
 del)
- TODO
 %0A *%0A
@@ -604,16 +604,59 @@
  = null;
+%0A  private List%3CXexprModel%3E _models = null;
 %0A%0A  /**%0A
@@ -1002,16 +1002,80 @@
 _TYPE);%0A
+    _models = new ArrayList%3C%3E();%0A    // TODO read all exprModel%0A
   %7D%0A%0A  /
@@ -1234,10 +1234,180 @@
 e;%0A  %7D%0A%0A
+%0A  /**%0A   * Get the list of inner expression models.%0A   * @return A list of XexprModel objects. %0A   */%0A  public List%3CXexprModel%3E getExprModels()%7B%0A    return _models;%0A  %7D%0A
 %7D%0A

Add exprModel list