Class StructEntry

  • Direct Known Subclasses:
    ExceptionEntry

    public class StructEntry
    extends SymtabEntry
    This is the symbol table entry for structs.
    • Constructor Detail

      • StructEntry

        protected StructEntry()
      • StructEntry

        protected StructEntry​(StructEntry that)
    • Method Detail

      • clone

        public java.lang.Object clone()
        Description copied from class: SymtabEntry
        This is a shallow copy clone
        Overrides:
        clone in class SymtabEntry
      • generate

        public void generate​(java.util.Hashtable symbolTable,
                             java.io.PrintWriter stream)
        Invoke the struct generator.
        Overrides:
        generate in class SymtabEntry
        Parameters:
        symbolTable - the symbol table is a hash table whose key is a fully qualified type name and whose value is a SymtabEntry or a subclass of SymtabEntry.
        stream - the stream to which the generator should sent its output.
        See Also:
        SymtabEntry
      • generator

        public Generator generator()
        Access the struct generator.
        Overrides:
        generator in class SymtabEntry
        Returns:
        an object which implements the StructGen interface.
        See Also:
        StructGen
      • addMember

        public void addMember​(TypedefEntry member)
        Add a member to the member list.
        Parameters:
        member - member to add to list
      • members

        public java.util.Vector<TypedefEntry> members()
        This is a vector of TypedefEntry's. In this context, only the name, type, and arrayInfo fields hold any meaning.
        Returns:
        a Vector of the members of the stuct
      • addContained

        public void addContained​(SymtabEntry entry)
      • contained

        public java.util.Vector<SymtabEntry> contained()
        This is a vector of SymtabEntry's. It itemizes any types which this struct contains. It is different than the member list. For example:
              struct A
              {
                long x;
                Struct B
                {
                  long a;
                  long b;
                } y;
              }
              
        Struct B is contained within struct A. The members vector will contain entries for x and y.
        Returns:
        a Vector of the SymtabEntry in the Struct