pdal::StageFactory

pdal::StageFactory#

class StageFactory#

This class provides a mechanism for creating Stage objects given a driver name.

Creates stages are owned by the factory and destroyed when the factory is destroyed. Stages can be explicitly destroyed with destroyStage() if desired.

Note

Stage creation is thread-safe.

Public Functions

StageFactory(bool ignored = true)#

Create a stage factory.

Parameters:

ignored – Ignored argument.

Stage *createStage(const std::string &type)#

Create a stage and return a pointer to the created stage.

The factory takes ownership of any successfully created stage.

Parameters:

stage_name – Type of stage to by created.

Returns:

Pointer to created stage.

void destroyStage(Stage *stage)#

Destroy a stage created by this factory.

This doesn’t need to be called unless you specifically want to destroy a stage as all stages are destroyed when the factory is destroyed.

Parameters:

stage – Pointer to stage to destroy.

Public Static Functions

static std::string inferReaderDriver(const std::string &filename)#

Infer the reader to use based on a filename.

Find the default reader for a file.

Parameters:
  • filename – Filename that should be analyzed to determine a driver.

  • filename – Filename for which to infer a reader.

Returns:

Driver name or empty string if no reader can be inferred from the filename.

Returns:

Name of the reader driver associated with the file.

static std::string inferWriterDriver(const std::string &filename)#

Infer the writer to use based on filename extension.

Find the default writer for a file.

Parameters:

filename – Filename for which to infer a writer.

Returns:

Driver name or empty string if no writer can be inferred from the filename.

Returns:

Name of the writer driver associated with the file.