| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'sol-pretty-printer/src/Waveforms.java')
| -rw-r--r-- | sol-pretty-printer/src/Waveforms.java | 40 | 
1 files changed, 40 insertions, 0 deletions
| diff --git a/sol-pretty-printer/src/Waveforms.java b/sol-pretty-printer/src/Waveforms.java new file mode 100644 index 0000000..3a40869 --- /dev/null +++ b/sol-pretty-printer/src/Waveforms.java @@ -0,0 +1,40 @@ +import java.util.Map; +import java.util.HashMap; + +public class Waveforms +{ +   private static final Map<String, String> FROM_WAVEFORM; + +   static +   { +      FROM_WAVEFORM = new HashMap<String, String>(); +   } + +   private Waveforms () {} /* Utility class. */ + +   public static void register_map (final String wfm_id, final String elem_id) +   { +      FROM_WAVEFORM.put(wfm_id, elem_id); +   } + +   public static String get_id_from_waveform_id (final String wfm_id) +   { +      final String result; + +      result = FROM_WAVEFORM.get(wfm_id); + +      if (result == null) +      { +         System.err.println +         ( +            "[F] There is no element associated with waveform \"" +            + wfm_id +            + "\". Is the model complete?" +         ); + +         System.exit(-1); +      } + +      return result; +   } +} | 


