Class UDMFInlineTypeListener

java.lang.Object
net.mtrop.doom.map.udmf.listener.UDMFInlineTypeListener
All Implemented Interfaces:
UDMFParserListener

public abstract class UDMFInlineTypeListener extends Object implements UDMFParserListener
A parser listener that listens for specific structure/object types, however, unlike UDMFTypeListener, this reuses the same UDMFObject per read. Do not store the reference to the read object anywhere because the next read will overwrite its contents!
Author:
Matthew Tropiano
  • Constructor Details

    • UDMFInlineTypeListener

      public UDMFInlineTypeListener()
  • Method Details

    • onStart

      public void onStart()
      Description copied from interface: UDMFParserListener
      Called when reading a UDMF document starts.
      Specified by:
      onStart in interface UDMFParserListener
    • onEnd

      public void onEnd()
      Description copied from interface: UDMFParserListener
      Called when reading a UDMF document ends.
      Specified by:
      onEnd in interface UDMFParserListener
    • onAttribute

      public void onAttribute(String name, Object value)
      Description copied from interface: UDMFParserListener
      Called when an attribute is read from a UDMF structure.
      Specified by:
      onAttribute in interface UDMFParserListener
      Parameters:
      name - the name of the field.
      value - the parsed value.
    • onObjectStart

      public void onObjectStart(String name)
      Description copied from interface: UDMFParserListener
      Called when the start of an object is read from a UDMF structure.
      Specified by:
      onObjectStart in interface UDMFParserListener
      Parameters:
      name - the name (type) of the structure.
    • onObjectEnd

      public void onObjectEnd(String name)
      Description copied from interface: UDMFParserListener
      Called when an object is ended in a UDMF structure.
      Specified by:
      onObjectEnd in interface UDMFParserListener
      Parameters:
      name - the name (type) of the structure.
    • onParseError

      public abstract void onParseError(String error)
      Description copied from interface: UDMFParserListener
      Called when a parsing error occurs.
      Specified by:
      onParseError in interface UDMFParserListener
      Parameters:
      error - the error message.
    • onGlobalAttribute

      public abstract void onGlobalAttribute(String name, Object value)
      Called when a global attribute is encountered.
      Parameters:
      name - the name of the attribute.
      value - the parsed value.
    • onType

      public abstract void onType(String type, UDMFObject object)
      Called when the parser has finished reading an object.
      Parameters:
      type - the object type.
      object - the object itself.