Esempio n. 1
0
def _print_baseline_classes(baselines, out):
    """Generates C++ class definitions for each of the given baseline
     decoders."""
    for baseline in baselines:
        baseline_name = BaselineName(baseline)
        values = {
            'decoder_name': baseline_name,
            'baseline_rep': dgen_decoder.commented_decoder_repr(baseline),
        }
        out.write(BASELINE_CLASS_HEADER % values)
        dgen_decoder.DefineDecoder(baseline, baseline_name, out)
def _print_baseline_classes(baselines, out):
  """Generates C++ class definitions for each of the given baseline
     decoders."""
  for baseline in baselines:
    baseline_name = BaselineName(baseline)
    values = {
        'decoder_name': baseline_name,
        'baseline_rep': dgen_decoder.commented_decoder_repr(baseline),
        }
    out.write(BASELINE_CLASS_HEADER % values)
    dgen_decoder.DefineDecoder(baseline, baseline_name, out)
Esempio n. 3
0
def _print_actual_headers(actuals, out):
    """Generates C++ class declarations for each of the given actual decoders."""
    for actual in actuals:
        actual_name = ActualName(actual)
        values = {
            'decoder_name': actual_name,
            'actual_rep': dgen_decoder.commented_decoder_neutral_repr(actual)
        }
        out.write(ACTUAL_CLASS_HEADER % values)
        for baseline in ACTUAL_TO_BASELINE_MAP[actual]:
            values['baseline_rep'] = (
                dgen_decoder.commented_decoder_repr(baseline))
            out.write(ACTUAL_CLASS_REP % values)
        dgen_decoder.DeclareDecoder(actual, actual_name, out)
Esempio n. 4
0
def _print_actual_headers(actuals, out):
  """Generates C++ class declarations for each of the given actual decoders."""
  for actual in actuals:
    actual_name = ActualName(actual)
    values = {
        'decoder_name': actual_name,
        'actual_rep':  dgen_decoder.commented_decoder_neutral_repr(actual)
        }
    out.write(ACTUAL_CLASS_HEADER % values)
    for baseline in ACTUAL_TO_BASELINE_MAP[actual]:
      values['baseline_rep'] = (
          dgen_decoder.commented_decoder_repr(baseline))
      out.write(ACTUAL_CLASS_REP % values)
    dgen_decoder.DeclareDecoder(actual, actual_name, out)