pif_Iteratorby Popisfizzy |
|
This library implements an iterator protocol for incrementally iterating through data, for example from a data structure like a list or a tree. [More] |
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Popisfizzy.pif_Iterator##version=3 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Popisfizzy.pif_Iterator##version=3 |
pif_Iterator implements a 'protocol class' for Iterator objects. By 'protocol class', I mean that the /pif_Iterator class defines seven methods (three of which are optional) to be used by subclasses to allow programmers to incrementally iterate through some set of data, whether it is from a data structure or streaming from another source or randomly generate as the sequence is iterated through.
The "pif_Iterator class.dm" file defines the /pif_Iterator protocol class and details the protocol itself. Refer to this file for the protocol in full detail, but an abbreivation of it is here. A particular Iterator class should be designed to only accept and 'understand' data from a given source. That is, there should be no "swiss-army knife" Iterator designed to work with any and every possible source of data. Make a given Iterator class do one thing and do it well. The protocol consists of seven methods, along with the constructor. Their behavior is as follows.
Version 1.02.20191216.
Copyright (c) 2016-2024 Timothy "popisfizzy" Reilly Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Please support BYOND through Membership or a donation!
|
Related Libraries
|
|||||||||||||||||||||||||||||||||||
More Libraries by Popisfizzy
|
Copyright © 2024 BYOND Software.
All rights reserved.