java.lang.Object
com.inductiveautomation.ignition.common.expressions.functions.BaseFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
AbstractFunction, DefaultFunctionFactory.CastFunction, DefaultFunctionFactory.CharFunction, DefaultFunctionFactory.ConcatFunction, DefaultFunctionFactory.EscapeSQL, DefaultFunctionFactory.EscapeXML, DefaultFunctionFactory.GradientFunction, DefaultFunctionFactory.IndexOfFunction, DefaultFunctionFactory.OrdinalFunction, DefaultFunctionFactory.PowerFunction, DefaultFunctionFactory.QualityOfFunction, DefaultFunctionFactory.RepeatFunction, DefaultFunctionFactory.RoundFunction, DefaultFunctionFactory.SingleArgMathFunction, DefaultFunctionFactory.SplitStringFunction, DefaultFunctionFactory.StringCaseFunction, DefaultFunctionFactory.StringTrimFunction, DefaultFunctionFactory.SubstringFunction, DefaultFunctionFactory.TimestampOfFunction, DefaultFunctionFactory.TypeOfFunction, DefaultFunctionFactory.UrlEncode, JsonFormat, JsonGet, JsonSet

public abstract class BaseFunction extends Object implements Function
The base class of all functions, includes blank implementations of some of the methods from Function that aren't used by many functions, like the connect/startup stuff. Returns this from copy()
  • Constructor Details

    • BaseFunction

      public BaseFunction()
  • Method Details

    • connect

      public void connect(CommonContext context, InteractionListener updateListener)
      Empty implementation from BaseFunction. Override if necessary.
      Specified by:
      connect in interface Function
      Parameters:
      context - the CommonContext used to look up external resources
      updateListener - the InteractionListener to notify when the function value changes
    • disconnect

      public void disconnect()
      Empty implementation from BaseFunction. Override if necessary.
      Specified by:
      disconnect in interface Function
    • shutdown

      public void shutdown()
      Empty implementation from BaseFunction. Override if necessary.
      Specified by:
      shutdown in interface Function
    • startup

      public void startup()
      Empty implementation from BaseFunction. Override if necessary.
      Specified by:
      startup in interface Function
    • copy

      public Function copy()
      Returns this. Override to create a clone if you need a unique function object per Expression.
      Specified by:
      copy in interface Function
      Returns:
      a copy of this function
    • executeAll

      protected QualifiedValue[] executeAll(Expression[] args) throws ExpressionException
      Helper function to execute all sub expressions for simple functions that just use all values.
      Parameters:
      args - the sub-expressions to execute
      Returns:
      an array of QualifiedValue results
      Throws:
      ExpressionException - if any sub-expression fails to execute