Module: common-dylan-internals Author: Gary Palter Synopsis: The three Locator classes used by File System and Streams Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND // Define so that s, which are streams, can // be closed using the same mechanism as s which aren't // streams. define open abstract class () end class ; define open abstract class () end class ; define open abstract class () end class ; define open abstract class () end class ; define open abstract class () end class ; define open abstract class () end class ; /// Stream protocols define open generic close (object :: , #rest keys, #key, #all-keys) => (); // default method so that subclasses can call next method with impunity define method close (object :: , #key) => () #f end method close; /// Base locator protocols // Open protocols define open generic supports-open-locator? (locator :: ) => (openable? :: ); define method supports-open-locator? (locator :: ) => (openable? :: ) #f end method supports-open-locator?; define open generic open-locator (locator :: , #key, #all-keys) => (stream :: ); // List protocols define open generic supports-list-locator? (locator :: ) => (listable? :: ); define method supports-list-locator? (locator :: ) => (listable? :: ) #f end method supports-list-locator?; define open generic list-locator (locator :: ) => (locators :: );