/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */
package cx2x.xcodeml.xnode;

import org.w3c.dom.Element;

/**
 * The XstructType class represents the FstructType element in XcodeML.
 *
 * @author clementval
 */
public class XstructType extends Xnode {

  /**
   * Basic ctor from Xnode.
   *
   * @param node Xnode object.
   */
  public XstructType(Xnode node) {
    this(node.element());
  }

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

  /**
   * Check is the struct type is an extension of another type.
   *
   * @return True if the struct type is an extension. False otherwise.
   */
  public boolean isExtend() {
    return hasAttribute(Xattr.EXTEND);
  }

  /**
   * Get the value of the extend attribute.
   *
   * @return String value of the extend attribute.
   */
  public String getExtend() {
    return getAttribute(Xattr.EXTEND);
  }
}

@@ -206,16 +206,22 @@
 ructType
+ (3.5)
  element
@@ -231,17 +231,308 @@
  XcodeML
-.
+/F.%0A * %3Cp%3E%0A * Elements: (params?)%0A * - Optional: typeParams, symbols, typeBoundProcedures%0A * %3Cp%3E%0A * Attributes:%0A * - Required: type (text)%0A * - Optional: is_public (bool), is_private (bool), is_sequence (bool),%0A * is_internal_private (bool), is_abstract (bool), extends (text),%0A * bind (text)
 %0A *%0A * @
@@ -1362,32 +1362,32 @@
 g getExtend() %7B%0A
-
     return getAt
@@ -1412,11 +1412,1343 @@
 ND);%0A  %7D
+%0A%0A  /**%0A   * Get the value of the bind attribute.%0A   *%0A   * @return String value of the bind attribute.%0A   */%0A  public String getBind() %7B%0A    return getAttribute(Xattr.BIND);%0A  %7D%0A%0A  /**%0A   * Check whether the type is public.%0A   *%0A   * @return True if the attribute is_public is set to true. False otherwise.%0A   */%0A  public boolean isPublic() %7B%0A    return getBooleanAttribute(Xattr.IS_PUBLIC);%0A  %7D%0A%0A  /**%0A   * Check whether the type is private.%0A   *%0A   * @return True if the attribute is_private is set to true. False otherwise.%0A   */%0A  public boolean isPrivate() %7B%0A    return getBooleanAttribute(Xattr.IS_PRIVATE);%0A  %7D%0A%0A  /**%0A   * Check whether the type is sequence.%0A   *%0A   * @return True if the attribute is_sequence is set to true. False otherwise.%0A   */%0A  public boolean isSequence() %7B%0A    return getBooleanAttribute(Xattr.IS_SEQUENCE);%0A  %7D%0A%0A  /**%0A   * Check whether the type is internal private.%0A   *%0A   * @return True if the attribute is_internal_private is set to true. False%0A   * otherwise.%0A   */%0A  public boolean isInternalPrivate() %7B%0A    return getBooleanAttribute(Xattr.IS_INTERNAL_PRIVATE);%0A  %7D%0A%0A  /**%0A   * Check whether the type is abstract.%0A   *%0A   * @return True if the attribute is_abstract is set to true. False otherwise.%0A   */%0A  public boolean isAbstract() %7B%0A    return getBooleanAttribute(Xattr.IS_ABSTRACT);%0A  %7D
 %0A%7D%0A

Complete FstructType element