![]() |
NDEVR
API Documentation
|
IOFactory for reading and writing zipped files with an offset, such as KMZ archives that contain embedded model data at a byte offset within the ZIP container. More...
Static Public Member Functions | |
| static ZippedOffset * | DefaultFactory () |
| Returns the singleton ZippedOffset factory instance. | |
| static FileFormat | ZippedOffsetFormat (const StringView &extension) |
| Creates a FileFormat descriptor for a zipped offset format with the given extension. | |
| Static Public Member Functions inherited from IOFactory | |
| static void | EnableExtension (const StringView &extension, const StringView &read_password, const StringView &write_password) |
| Enables a specific file extension with the given read and write passwords. | |
| static void | EnableFactory (const StringView &factory, const StringView &read_password, const StringView &write_password) |
| Enables a factory by name with the given read and write passwords. | |
| static void | EnableFactory (IOFactory *factory, const StringView &read_password, const StringView &write_password) |
| Registers an IOFactory instance with the system, enabling it for read and/or write. | |
Protected Member Functions | |
| ZippedOffset () | |
| Constructs the ZippedOffset factory. | |
| bool | canRead (const File &file) final override |
| Checks whether this factory can read the given file. | |
| bool | canWrite (const File &file) final override |
| Checks whether this factory can write the given file. | |
| FactoryOptions | defaultReadOptions (const FactoryParameters &file) const final override |
| Returns the default read options for the given factory parameters. | |
| FactoryOptions | defaultWriteOptions (const FactoryParameters &file) const final override |
| Returns the default write options for the given factory parameters. | |
| bool | determineExtension (const File &file, String &extension) final override |
| Attempts to determine the file extension for the given file. | |
| FactoryFeatures | factoryFeatures (const FactoryParameters &file, bool is_import) const override |
| Returns the features and configurable options for this factory given the parameters. | |
| Buffer< UUID > | filterModelsToExport (Buffer< UUID > models_to_check, const DesignObjectLookup *lookup, const FileFormat &export_format) const final override |
| Filters a list of model UUIDs to only those that can be exported in the given format. | |
| String | getIcon (const File &file) final override |
| Returns the icon name associated with the given file type. | |
| void | getSupportedFormats (Buffer< FileFormat > &formats, bool is_read) final override |
| Populates the given buffer with supported file formats for reading or writing. | |
| bool | isAutoEnabled () const final override |
| Checks whether this factory is automatically enabled without requiring a password. | |
| bool | readFile (FactoryParameters &file) final override |
| Reads data from a file into the design object hierarchy. | |
| bool | writeFile (FactoryParameters &) final override |
| Writes data from the design object hierarchy to a file. | |
Additional Inherited Members | |
| Public Member Functions inherited from IOFactory | |
| IOFactory (const StringView &factory_name) | |
| Constructs an IOFactory with the given factory name. | |
| virtual | ~IOFactory () |
| Virtual destructor. | |
| virtual bool | canRead (const FactoryParameters &file) |
| Checks whether this factory can read using the given FactoryParameters. | |
| virtual bool | canRead (const FileFormat &file) |
| Checks whether this factory can read the given file format. | |
| virtual bool | canWrite (const FactoryParameters &file) |
| Checks whether this factory can write using the given FactoryParameters. | |
| virtual bool | canWrite (const FileFormat &file) |
| Checks whether this factory can write the given file format. | |
| String | factoryReadAppFeature () const |
| Returns the application feature string required for read operations. | |
| String | factoryWriteAppFeature () const |
| Returns the application feature string required for write operations. | |
| void | getSupportedFormats (Buffer< FileFormat > &formats) |
| Populates the given buffer with all supported file formats (both read and write). | |
| virtual void | getSupportedFormats (Buffer< FileFormat > &formats, const File &file) |
| Populates the given buffer with formats supported for the specified file. | |
| virtual void | getSupportedFormats (Buffer< FileFormat > &formats, DesignObjectLookup *lookup, const Buffer< UUID > &models) |
| Populates the given buffer with formats supported for writing the specified models. | |
| virtual void | getSupportedFormatsByModelType (Buffer< FileFormat > &formats, bool is_read, const StringView &model_type) |
| Populates the given buffer with formats matching a specific model type. | |
| virtual void | getSupportedFormatsForExtension (Buffer< FileFormat > &formats, bool is_read, const StringView &extension) |
| Populates the given buffer with formats matching a specific file extension. | |
| virtual bool | isFactoryEnabled (bool is_read) const |
| Checks whether this factory is enabled for reading or writing. | |
| const String & | name () const |
| Returns the name of this factory. | |
| Buffer< UUID > | readFileWithDefaultSettings (const File &file, DesignObjectLookup *lookup) |
| Reads a file using default settings and returns the UUIDs of the created models. | |
| Buffer< Scene > | readScenesFromFile (const File &file) |
| Reads scenes from a file and returns them as a buffer of Scene objects. | |
| void | throwIfNotEnabled (bool is_read) |
| Throws an exception if the factory is not enabled for the given operation direction. | |
| virtual bool | updateFromFile (const FactoryParameters &file, const FactoryOptions &old_options) |
| Updates the factory parameters from a file, comparing against old options. | |
| bool | writeScenesToFile (const File &file, const Buffer< Scene > &scene) |
| Writes a buffer of scenes to a file. | |
IOFactory for reading and writing zipped files with an offset, such as KMZ archives that contain embedded model data at a byte offset within the ZIP container.
Definition at line 47 of file ZippedOffset.h.
|
finaloverrideprotectedvirtual |
Checks whether this factory can read the given file.
| [in] | file | The file to check. |
Reimplemented from IOFactory.
|
finaloverrideprotectedvirtual |
Checks whether this factory can write the given file.
| [in] | file | The file to check. |
Reimplemented from IOFactory.
|
static |
Returns the singleton ZippedOffset factory instance.
References ZippedOffset().
|
finaloverrideprotectedvirtual |
Returns the default read options for the given factory parameters.
| [in] | file | The FactoryParameters describing the read operation. |
Reimplemented from IOFactory.
References defaultReadOptions().
Referenced by defaultReadOptions().
|
finaloverrideprotectedvirtual |
Returns the default write options for the given factory parameters.
| [in] | file | The FactoryParameters describing the write operation. |
Reimplemented from IOFactory.
References defaultWriteOptions().
Referenced by defaultWriteOptions().
|
finaloverrideprotectedvirtual |
Attempts to determine the file extension for the given file.
| [in] | file | The file to inspect. |
| [in] | extension | Output parameter populated with the determined extension. |
Reimplemented from IOFactory.
References determineExtension().
Referenced by determineExtension().
|
overrideprotectedvirtual |
Returns the features and configurable options for this factory given the parameters.
| [in] | file | The FactoryParameters describing the operation. |
| [in] | is_import | True for import operations, false for export operations. |
Implements IOFactory.
References factoryFeatures().
Referenced by factoryFeatures().
|
finaloverrideprotectedvirtual |
Filters a list of model UUIDs to only those that can be exported in the given format.
| [in] | models_to_check | The candidate model UUIDs to filter. |
| [in] | lookup | The DesignObjectLookup used to resolve the models. |
| [in] | export_format | The target export format. |
Reimplemented from IOFactory.
References filterModelsToExport().
Referenced by filterModelsToExport().
|
finaloverrideprotectedvirtual |
Populates the given buffer with supported file formats for reading or writing.
| [in] | formats | The buffer to populate with supported FileFormat entries. |
| [in] | is_read | True to get read formats, false to get write formats. |
Implements IOFactory.
|
finaloverrideprotectedvirtual |
Checks whether this factory is automatically enabled without requiring a password.
Reimplemented from IOFactory.
|
finaloverrideprotectedvirtual |
Reads data from a file into the design object hierarchy.
| [in] | file | The FactoryParameters describing the read operation and receiving results. |
Implements IOFactory.
|
finaloverrideprotectedvirtual |
Writes data from the design object hierarchy to a file.
| [in] | file | The FactoryParameters describing the write operation. |
Implements IOFactory.
|
static |
Creates a FileFormat descriptor for a zipped offset format with the given extension.
| [in] | extension | The file extension to associate with the format. |