/// An interface to write objects into some content format.
// ignore: one_member_abstracts
abstract class BaseWriter {
/// A string representation of content already written to this (text) writer.
///
/// Must return a valid string representation when this writer is writing to
/// a text output. If an output does not support a string representation then
/// returned representation is undefined.
@override
String toString();
}
There is also an issue #126 as an proposition to change it.
Actual writers, PropertyWriter, CoordinateWriter, GeometryWriter and FeatureWriter are mixins that implement BaseWriter.
However mixin writers define content stream method and the base writer output data access. So different purposes.
Some refactoring and remodeling is needed:
actual content stream writers are renamed => PropertyContent, CoordinateContent, GeometryContent and FeatureContent
these mixins no longer implement BaseWriter
BaseWriter is enhanced and refactored as #126 suggests
new class ContentWriter is defined
class ContentWriter<T> extends BaseWriter {
}
Now when actual content writer are needed they are referenced as ContentWriter<PropertyContent>, ContentWriter<CoordinateContent>, ContentWriter<GeometryContent> and ContentWriter<FeatureContent>.
This shall be breaking change but maybe worth it...
BaseWriter
is specified as:There is also an issue #126 as an proposition to change it.
Actual writers,
PropertyWriter
,CoordinateWriter
,GeometryWriter
andFeatureWriter
are mixins that implementBaseWriter
.However mixin writers define content stream method and the base writer output data access. So different purposes.
Some refactoring and remodeling is needed:
PropertyContent
,CoordinateContent
,GeometryContent
andFeatureContent
BaseWriter
BaseWriter
is enhanced and refactored as #126 suggestsContentWriter
is definedNow when actual content writer are needed they are referenced as
ContentWriter<PropertyContent>
,ContentWriter<CoordinateContent>
,ContentWriter<GeometryContent>
andContentWriter<FeatureContent>
.This shall be breaking change but maybe worth it...