internal package
Foswiki::Tables::Reader Abstract reader for tables; builds tables using the default table model classes.
The reader is provided with the name of the table_class, which defaults to Foswiki::Tables::Table. This class provides arow_class
method which is
used to get the factory for a row (default: Foswiki::Tables::Row), which in turn
can be interrogated for the cell_class
(default: Foswiki::Tables::Cell).
ClassMethod
new($table_class) → $parser $table_class
- name of table factory class. Defaults to Foswiki::Tables::Table
parse
.
ObjectMethod
finish() ObjectMethod
parse($text [, $topicObject]) → \@list $table_class
, and contains
a set of attrs (read from the macro) and a list of rows. You can
spot the tables in the list by doing:
if (UNIVERSAL::isa($line, $table_class)) {text lines are scalars, so will also return false to
ref($line)
The $topicObject
is an instance of Foswiki::Meta, and is required to
provide an expansion context for macros embedded in parameters. If it
is not provided, then macros will be passed on unexpanded, and support
for table decorators (such as %EDITTABLE) will be unavailable.