Struct CopyingCursor

A cursor that wraps another cursor, copying all output strings.

The cursor specification (std.experimental.xml.interfaces.isCursor) clearly states that a cursor (as the underlying parser and lexer) is free to reuse its internal buffers and thus invalidate every output. This wrapper returns freshly allocated strings, thus allowing references to its outputs to outlive calls to advancing methods.

This type should not be instantiated directly, but using the helper function copyingCursor.

Template arguments

struct CopyingCursor(CursorType, Alloc, std.typecons.Flag!("intern").Flag intern)
if (isCursor!CursorType && isArray!(CursorType.StringType));

Authors

Lodovico Giaretta

Copyright

Copyright Lodovico Giaretta 2016 --

License

Boost License 1.0.