pw::SourceImporter

The SourceImporter 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 SourceImport specified, like this:

set importer [pw::Application begin SourceImport]
Summary
pw::SourceImporterThe SourceImporter IO mode type
Instance Actions
getFileTypesThis action gets a list of the file types that are supported for source import - currently only PCD-formatted files are imported.
readThis action verifies the IO mode attributes and tries to read the file that is being imported.
canConvertThis action checks if there is data that will be converted when the read action is used.
convertThis action converts the data read in by creating pw::SourceEntity objects based on the imported data.

Instance Actions

getFileTypes

$io getFileTypes

This action gets a list of the file types that are supported for source import - currently only PCD-formatted files are imported.

Parameters

This action has no parameters.

Returns

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

read

$io read

This action verifies the IO mode attributes and tries to read the file that is being imported.

Parameters

This action has no parameters.

Returns

This action returns a boolean of true if read, 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 convert.

Possible Errors

HeaderIsInvalid, FormatIsInvalid, CannotOpenFile, CannotAccessFile, Unknown

canConvert

$io canConvert

This action checks if there is data that will be converted when the read action is used.

Parameters

This action has no parameters.

Returns

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

convert

$io convert

This action converts the data read in by creating pw::SourceEntity objects based on the imported data.

Parameters

This action has no parameters.

Returns

This action returns a boolean of true if read, 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 read.

Possible Errors

CannotConvertEntity, Unknown

$io getFileTypes
This action gets a list of the file types that are supported for source import - currently only PCD-formatted files are imported.
$io read
This action verifies the IO mode attributes and tries to read the file that is being imported.
$io canConvert
This action checks if there is data that will be converted when the read action is used.
$io convert
This action converts the data read in by creating pw::SourceEntity objects based on the imported data.
Base type for all source 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