Class ABookmarkedStream

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type ABookmarkedStream = class(AStreamWrapper)

Description

This class represents a bookmarked stream, which is a stream that is capable of saving and reading its own list of bookmarks.

Instances of ABookmarkedStream do not themselves record the position of their bookmark dictionary; this allows descendant classes to specify where that value is recorded.

You will probably not create an instance of ABookmarkedStream directly as it provides no functionality for reading or writing; instead, you will use either ABookmarkedInputStream or ABookmarkedOutputStream.

Hierarchy

Overview

Fields

Protected MyBookmarks: AStreamBookmarkDictionary;

Methods

Public function init: boolean; override;
Public destructor destroy; override;
Public function seek(const thisBookmarkName: string): TStreamOffset; virtual;
Public function Bookmarks: AStreamBookmarkDictionary; virtual;

Description

Fields

Protected MyBookmarks: AStreamBookmarkDictionary;

Refers to the dictionary of bookmarks maintained for the stream

Methods

Public function init: boolean; override;

Initializer

Public destructor destroy; override;

Free the bookmarked stream.

If ABookmarkedStream.ownsTarget is True, then this method will also free AStreamWrapper.Target ABookmarkedStream.Target.

Public function seek(const thisBookmarkName: string): TStreamOffset; virtual;

Set the current position in the stream to the one specified by the named bookmark.

If no bookmark with thisBookmarkName is found in the dictionary of bookmarks maintained by the stream, then this routine does nothing.

Returns

The previous position within the stream. This will always be an offset from the beginning of the stream.

Public function Bookmarks: AStreamBookmarkDictionary; virtual;

Retrieve a reference to the dictionary of bookmarks maintained by the stream.

The reference returned by this routine may be used to query the dictionary of bookmarks, but it should NOT be freed by the caller.

Note: For instances of ABookmarkedInputStream and its descendants, this routine may return Nil until ABookmarkedInputStream.readBookmarksAt is called; this behavior allows descendant classes to define custom bookmarks type and a bookmarks dictionary to handle them.


Generated by PasDoc 0.13.0 on 2015-01-10 17:13:18