Class IrpObject

java.lang.Object
org.harctoolbox.irp.IrpObject
All Implemented Interfaces:
Serializable, XmlExport
Direct Known Subclasses:
Assignment, BareIrStream, BitField, BitSpec, BitspecIrstream, Duration, FloatNumber, GeneralSpec, IrStream, NameEngine, NameOrNumber, NumberWithDecimals, ParameterSpec, ParameterSpecs, PrimaryItem, Protocol, RepeatMarker, Variation

public abstract class IrpObject extends Object implements XmlExport, Serializable
See Also:
  • Constructor Details

    • IrpObject

      protected IrpObject(org.antlr.v4.runtime.tree.ParseTree parseTree)
  • Method Details

    • getParseTree

      public final org.antlr.v4.runtime.tree.ParseTree getParseTree()
    • toIrpString

      public abstract String toIrpString(int radix)
      Returns a computed IRP (-segment) string representation of current IrpObject. Numerical parameters, but not durations etc, will be printed using the radix in the argument.
      Parameters:
      radix - Radix for parameters.
      Returns:
      Formatted string.
    • toIrpString

      public final String toIrpString()
      Defaulted version of toIrpString().
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(int radix)
    • toStringTree

      public final String toStringTree(IrpParser parser)
      Return a LISP-like representation of the current object. Mainly for debugging.
      Parameters:
      parser -
      Returns:
    • toStringTree

      public final String toStringTree(ParserDriver parserDriver)
    • equals

      public abstract boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object
    • numberOfInfiniteRepeats

      public int numberOfInfiniteRepeats()
    • toTreeViewer

      public final org.antlr.v4.gui.TreeViewer toTreeViewer(ParserDriver parserDriver)
    • toTreeViewer

      public final org.antlr.v4.gui.TreeViewer toTreeViewer(IrpParser parser)
    • toTreeViewer

      public final org.antlr.v4.gui.TreeViewer toTreeViewer(List<String> ruleNames)
    • weight

      public abstract int weight()
      Returns a (somewhat arbitrary) measure of the complexity of the object. Can be used for determining if a decode is "simpler" than another decode.
      Returns:
      non-negative integer.
    • toElement

      public Element toElement(Document document)
      Specified by:
      toElement in interface XmlExport
      Returns:
    • toDocument

      public Document toDocument()
      Specified by:
      toDocument in interface XmlExport
    • numberOfBits

      public Integer numberOfBits()
    • numberOfBitSpecs

      public Integer numberOfBitSpecs()
    • prerender

      public void prerender(RenderData renderData, IrSignal.Pass pass, List<BitSpec> bitSpecs)
    • propertiesMap

      public Map<String,Object> propertiesMap(int noProperites)
    • updateStateWhenEntering

      public void updateStateWhenEntering(IrSignal.Pass pass, IrStream.PassExtractorState state)
    • updateStateWhenExiting

      public void updateStateWhenExiting(IrSignal.Pass pass, IrStream.PassExtractorState state)
    • createParameterSpecs

      public void createParameterSpecs(ParameterSpecs parameterSpecs) throws InvalidNameException
      Throws:
      InvalidNameException