Beispiel #1
0
def _print_actual_classes(actuals, out):
    """Generates C++ class definitions 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_DEF_HEADER % values)
        dgen_decoder.DefineDecoder(actual, actual_name, out)
def _print_actual_classes(actuals, out):
  """Generates C++ class definitions 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_DEF_HEADER % values)
    dgen_decoder.DefineDecoder(actual, actual_name, out)
Beispiel #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)
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)