pw::GridExporter

The GridExporter IO mode type

Derives From

pw::Object pw::Mode pw::IOMode

Notes

To create a mode of this type, use the pw::Application.begin command with the mode GridExport specified, like this:

set exporter [pw::Application begin GridExport $entities]
Summary
pw::GridExporterThe GridExporter IO mode type
Instance Actions
getFileTypesThis action gets a list of the file types that can export all of the entities of this mode.
verifyThis action verifies the IO mode attributes and the entities of the mode that should be exported.
canWriteThis action checks if there is data that will be written out when the write action is used.
writeThis action writes the file by converting pw::GridEntity objects into the format required for the exported data.

Instance Actions

getFileTypes

$io getFileTypes

This action gets a list of the file types that can export all of the entities of this mode.

Parameters

This action has no parameters.

Returns

This action returns a list containing file type names that can be used in the <initialize> command.

verify

$io verify

This action verifies the IO mode attributes and the entities of the mode that should be exported.

Parameters

This action has no parameters.

Returns

This action returns a boolean of true if verified, false if not.  A Tcl error is thrown on failure if -strict was specified for <initialize>.

Note

This action must be called after initialize, but before write.

Possible Errors

AttributeIsInvalid, UnsupportedEntityDetected, Unknown

canWrite

$io canWrite

This action checks if there is data that will be written out when the write action is used.

Parameters

This action has no parameters.

Returns

This action returns a boolean of true if write will export data, false if not.

write

$io write

This action writes the file by converting pw::GridEntity objects into the format required for the exported data.

Parameters

This action has no parameters.

Returns

This action returns a boolean of true if written, false if not.  A Tcl error is thrown on failure if -strict was specified for <initialize>.

Note

This action must be called after initialize and verify.

Possible Errors

AttributeIsInvalid, UnsupportedEntityDetected, Unknown

$io getFileTypes
This action gets a list of the file types that can export all of the entities of this mode.
$io verify
This action verifies the IO mode attributes and the entities of the mode that should be exported.
$io canWrite
This action checks if there is data that will be written out when the write action is used.
$io write
This action writes the file by converting pw::GridEntity objects into the format required for the exported data.
Base type for all grid entities.
Base type for all glyph types
The mode base type
The base IO mode type
pw::Application begin ?-mode_specific_flags? mode ?entities?
This action begins a mode in the application.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
Close