Skip to content

Commit

Permalink
Renamed TextOutputWriter to ByteOutputWriter and made it accept a Byt…
Browse files Browse the repository at this point in the history
…eOutputFormatter.
  • Loading branch information
tonystone committed Dec 30, 2018
1 parent d864b28 commit e64a4da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ All significant changes to this project will be documented in this file.
## [5.0] (Upcoming release)

#### Added
- Added `TextOutputWriter` protocol to define types that write text to their output and accept `ZTextOutputFormatter` types to format the output.
- Added `ByteOutputFormatter` protocol to define formatters for use with byte output stream type Writers.
- Added `TextFormat`, an implementation of a ByteOutputFormatter that formats its output based on a supplied template (this is the default formatter for Console and File output).
- Added `ByteOutputWriter` protocol to define types that write byte streams to their output and accept `ByteOutputFormatter` types to format the output.

#### Changed
- Required Swift 5 for compilation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///
/// TextOutputWriter.swift
/// ByteOutputWriter.swift
///
/// Copyright 2018 Tony Stone
///
Expand All @@ -19,14 +19,17 @@
///
import Foundation

/// TextOutputWriter
/// ByteOutputStreamWriter
///
/// A higher level Writer interface that specifically writes to
/// a `TextOutputStream` and it's text output format can be controlled
/// by a `TextOutputFormatter`.
/// a `ByteOutputStream` and it's output format can be controlled
/// by a `ByteOutputFormatter`.
///
/// - SeeAlso: `TextOutputFormatter`
/// - SeeAlso: `ByteOutputFormatter`
///
public protocol TextOutputWriter: Writer {
init(format: TextOutputFormatter)
public protocol ByteOutputWriter: Writer {

/// ByteOutputFormatter being used for formating output.
///
var format: ByteOutputFormatter { get }
}

0 comments on commit e64a4da

Please sign in to comment.