NDEVR
API Documentation
FactoryParameters

A container of input information that is to be filled with output information by an IOFactory. More...

Collaboration diagram for FactoryParameters:
[legend]

Public Member Functions

 FactoryParameters (const FactoryParameters &params)
 Copy constructor.
 FactoryParameters (const File &file, const FileFormat &format, const StringView &name="default")
 Constructs FactoryParameters from a file, format, and optional name.
 FactoryParameters (const FileRequest &request, const StringView &name="default")
 Constructs FactoryParameters from a FileRequest and optional name.
void addMissingFile (const DynamicPointer< FindFileFunction > &file)
 Registers a missing file that the user needs to locate before the operation can complete.
void addWarning (const FileFactoryWarning &warning)
 Adds a warning that will be shown to the user when the IOFactory operation is completed.
const Filefile (const StringView &name="default") const
 The address for reading/writing.
FileFormatformat (const StringView &name="default")
 The format to read/write.
const FileFormatformat (const StringView &name="default") const
 The format to read/write.
FactoryParametersoperator= (const FactoryParameters &params)
 Copy assignment operator.
void setInfoPipe (InfoPipe *pipe)
 Sets the info pipe for streaming log messages or cancelling the operation.
bool shouldWriteModel (const Model &model) const
 Checks whether a given model is in the list of models to be written.

Public Attributes

std::function< bool(UUID library_id, Model &model)> assign_to_library
 Callback to assign a model to a specific library by UUID.
Buffer< UUIDcameras
 UUIDs of cameras created or targeted by the operation.
CancelInfo cancel
 Provides cancellation support for the operation.
TranslatedString custom_message
 An optional custom message to display during the operation.
String custom_message_icon
 An optional icon name for the custom message.
DesignObjectLookuplookup = nullptr
 The design object lookup used to resolve models and objects.
Buffer< DynamicPointer< FindFileFunction > > missing_files
 Files that could not be found and require user input.
Buffer< UUIDmodels
 UUIDs of models created or targeted by the operation.
FactoryOptions options
 All read/write options including special parameters.
ProgressInfo progress
 Tracks progress of the read/write operation.
Dictionary< String, FileRequestrequests
 Maps name keys to FileRequest objects for multi-file formats.
Buffer< FileFactoryWarningwarnings
 Any warnings to show to the user after the operation.

Detailed Description

A container of input information that is to be filled with output information by an IOFactory.


FactoryParameters bundles together the file, format, options, and output state needed by an IOFactory read or write operation. It is passed into the factory and populated with results such as created model UUIDs, warnings, and missing file requests.

Definition at line 104 of file IOFactory.h.

Constructor & Destructor Documentation

◆ FactoryParameters() [1/3]

FactoryParameters::FactoryParameters ( const File & file,
const FileFormat & format,
const StringView & name = "default" )

Constructs FactoryParameters from a file, format, and optional name.


Parameters
[in]fileThe file to read from or write to.
[in]formatThe file format to use.
[in]nameAn optional name key for multi-file formats (e.g., "default").

References file(), and format().

Referenced by FactoryParameters(), and operator=().

◆ FactoryParameters() [2/3]

FactoryParameters::FactoryParameters ( const FileRequest & request,
const StringView & name = "default" )

Constructs FactoryParameters from a FileRequest and optional name.


Parameters
[in]requestThe file request containing file and format information.
[in]nameAn optional name key for multi-file formats (e.g., "default").

◆ FactoryParameters() [3/3]

FactoryParameters::FactoryParameters ( const FactoryParameters & params)

Copy constructor.


Parameters
[in]paramsThe FactoryParameters to copy from.

References FactoryParameters().

Member Function Documentation

◆ addMissingFile()

void FactoryParameters::addMissingFile ( const DynamicPointer< FindFileFunction > & file)

Registers a missing file that the user needs to locate before the operation can complete.


Parameters
[in]fileThe missing file request wrapped in a DynamicPointer.

References file().

◆ addWarning()

void FactoryParameters::addWarning ( const FileFactoryWarning & warning)

Adds a warning that will be shown to the user when the IOFactory operation is completed.


Parameters
[in]warningThe warning to add to the warnings list.

◆ file()

const File & FactoryParameters::file ( const StringView & name = "default") const

The address for reading/writing.


If factory supports more than one file (eg: .obj and .mtl), the name parameter can specify which part to lookup.

Parameters
[in]nameThe name key identifying which file to retrieve.
Returns
A const reference to the requested File.

Referenced by FactoryParameters(), and addMissingFile().

◆ format() [1/2]

FileFormat & FactoryParameters::format ( const StringView & name = "default")

The format to read/write.


If factory supports more than one format (eg: .obj and .mtl), the name parameter can specify which part to lookup.

Parameters
[in]nameThe name key identifying which format to retrieve.
Returns
A mutable reference to the requested FileFormat.

◆ format() [2/2]

const FileFormat & FactoryParameters::format ( const StringView & name = "default") const

The format to read/write.


If factory supports more than one format (eg: .obj and .mtl), the name parameter can specify which part to lookup.

Parameters
[in]nameThe name key identifying which format to retrieve.
Returns
A const reference to the requested FileFormat.

Referenced by FactoryParameters().

◆ operator=()

FactoryParameters & FactoryParameters::operator= ( const FactoryParameters & params)

Copy assignment operator.


Parameters
[in]paramsThe FactoryParameters to copy from.
Returns
A reference to this object after assignment.

References FactoryParameters().

◆ setInfoPipe()

void FactoryParameters::setInfoPipe ( InfoPipe * pipe)

Sets the info pipe for streaming log messages or cancelling the operation.


Parameters
[in]pipeThe InfoPipe to use for progress and cancellation.

Referenced by GoogleEarthApplicationManager::createAppLauncher().

◆ shouldWriteModel()

bool FactoryParameters::shouldWriteModel ( const Model & model) const

Checks whether a given model is in the list of models to be written.


Parameters
[in]modelThe model to check.
Returns
True if the model should be included in the write operation, false otherwise.

The documentation for this struct was generated from the following file: