Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (43 sloc) 1006 Bytes
# Copyright (C) 2001-2008, Parrot Foundation.
# $Id$
=head1 TITLE
IO - Cardinal IO class
=head2 Functions
=item onload()
Perform initializations and create the IO class
.namespace ['IO']
.const int DEFAULT_BLOCK_SIZE = 8129
.sub 'onload' :anon :init :load
.local pmc cardinalmeta
$P0 = get_hll_global ['CardinalObject'], '!CARDINALMETA'
cardinalmeta = $P0.'new_class'('IO', 'parent'=>'CardinalObject', 'attr'=>'!io')
.sub 'ACCEPTS' :method
.param pmc topic
.local int i
.local string what
what = topic.'WHAT'()
if what == "IO" goto match
goto no_match
#.sub 'get_string' :vtable
# $S0 = 'IO'
# .return ($S0)
.sub 'read' :method
.param string path
.param pmc end_offset :optional
.param pmc start_offset :optional
# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir: