Class MacroTable

java.lang.Object
org.csstudio.opibuilder.util.MacroTable
All Implemented Interfaces:
IMacroTableProvider

public class MacroTable extends Object implements IMacroTableProvider
A table of macros that's initialized from a string or a hash map, keeping the macro names and values in a hash
  • Constructor Details

    • MacroTable

      public MacroTable(Map<String,String> macros)
      Initialize
      Parameters:
      macros - Map with macro name/value entries
    • MacroTable

      public MacroTable(String names_and_values) throws Exception
      Initialize
      Parameters:
      names_and_values - String of the form "macro=value, macro=value"
      Throws:
      Exception - on malformed input
  • Method Details

    • getMacroValue

      public String getMacroValue(String name)
      Description copied from interface: IMacroTableProvider
      Get value of a macro.
      Specified by:
      getMacroValue in interface IMacroTableProvider
      Parameters:
      name - the name of the macro
      Returns:
      the value of the macro, null if no such macro exists.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      String representation for debugging