14a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair# Copyright 2015 The Chromium Authors. All rights reserved. 24a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair# Use of this source code is governed by a BSD-style license that can be 34a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair# found in the LICENSE file. 44a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair 54a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair# Derived from telemetry OutputFormatter. Should stay close in architecture 64a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair# to telemetry OutputFormatter. 7cef7893435aa41160dd1255c43cb8498279738ccChris Craik 8cef7893435aa41160dd1255c43cb8498279738ccChris Craik 94a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclairclass OutputFormatter(object): 10cef7893435aa41160dd1255c43cb8498279738ccChris Craik 114a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair def __init__(self, output_stream): 124a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair self._output_stream = output_stream 134a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair 144a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair def Format(self, results): 154a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair raise NotImplementedError() 164a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair 174a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair @property 184a4f2fe02baf385f6c24fc98c6e17bf6ac5e0724Dan Sinclair def output_stream(self): 19cef7893435aa41160dd1255c43cb8498279738ccChris Craik return self._output_stream 20