pdal::StageFactory

class pdal::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.

Return
Pointer to created stage.
Parameters
  • stage_name: Type of stage to by created.

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

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

Infer the reader to use based on a filename.

Find the default reader for a file.

Return
Driver name or empty string if no reader can be inferred from the filename.
Return
Name of the reader driver associated with the file.
Parameters
  • filename: Filename that should be analyzed to determine a driver.
Parameters
  • filename: Filename for which to infer a reader.

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

Infer the writer to use based on filename extension.

Find the default writer for a file.

Return
Driver name or empty string if no writer can be inferred from the filename.
Return
Name of the writer driver associated with the file.
Parameters
  • filename: Filename for which to infer a writer.