NDEVR
API Documentation
LandXMLFactory

Reads and writes LandXML files: http://www.landxml.org/About.aspx. More...

Inheritance diagram for LandXMLFactory:
[legend]
Collaboration diagram for LandXMLFactory:
[legend]

Public Member Functions

 LandXMLFactory ()
 Constructs the LandXMLFactory and registers supported LandXML file extensions.
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 File &file)
 Checks whether this factory can write the given file.
virtual bool canWrite (const FileFormat &file)
 Checks whether this factory can write the given file format.
virtual FactoryOptions defaultWriteOptions (const FactoryParameters &file) const
 Returns the default write options for the given factory parameters.
virtual bool determineExtension (const File &file, String &extension)
 Attempts to determine the file extension for the given file.
String factoryReadAppFeature () const
 Returns the application feature string required for read operations.
String factoryWriteAppFeature () const
 Returns the application feature string required for write operations.
virtual Buffer< UUIDfilterModelsToExport (Buffer< UUID > models_to_check, const DesignObjectLookup *lookup, const FileFormat &export_format) const
 Filters a list of model UUIDs to only those that can be exported in the given format.
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 isAutoEnabled () const
 Checks whether this factory is automatically enabled without requiring a password.
virtual bool isFactoryEnabled (bool is_read) const
 Checks whether this factory is enabled for reading or writing.
const Stringname () const
 Returns the name of this factory.
Buffer< UUIDreadFileWithDefaultSettings (const File &file, DesignObjectLookup *lookup)
 Reads a file using default settings and returns the UUIDs of the created models.
Buffer< ScenereadScenesFromFile (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.

Private Member Functions

virtual bool canRead (const File &file) override
 Checks whether the given file can be read by this factory.
FactoryOptions defaultReadOptions (const FactoryParameters &file) const override
 Provides the default read options for a LandXML file.
FactoryFeatures factoryFeatures (const FactoryParameters &file, bool is_import) const override
 Reports the capabilities of this factory for the given file.
virtual String getIcon (const File &file) override
 Returns the icon resource name associated with LandXML files.
virtual void getSupportedFormats (Buffer< FileFormat > &formats, bool is_read) override
 Populates the list of file formats this factory can handle.
virtual bool readFile (FactoryParameters &file) override
 Reads and imports data from a LandXML file into the design model.
virtual bool writeFile (FactoryParameters &) override
 Write support is not implemented for LandXML.

Additional Inherited Members

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.

Detailed Description

Reads and writes LandXML files: http://www.landxml.org/About.aspx.


The goal of the LandXML format is to specify an XML file format for civil engineering design and survey measurement data for the purposes of: 1) Transferring engineering design data between producers and consumers. 2) Providing a data format suitable for long-term data archival. 3) Providing a standard format for electronic design submission.

Note
Writing is not currently supported; writeFile() always returns false.

Definition at line 52 of file LandXMLFactory.h.

Member Function Documentation

◆ canRead()

virtual bool LandXMLFactory::canRead ( const File & file)
overrideprivatevirtual

Checks whether the given file can be read by this factory.

Parameters
[in]fileThe file to inspect.
Returns
True if this factory can read the file, false otherwise.

Reimplemented from IOFactory.

◆ defaultReadOptions()

FactoryOptions LandXMLFactory::defaultReadOptions ( const FactoryParameters & file) const
overrideprivatevirtual

Provides the default read options for a LandXML file.

Parameters
[in]fileThe factory parameters describing the file context.
Returns
A FactoryOptions populated with default import settings.

Reimplemented from IOFactory.

◆ factoryFeatures()

FactoryFeatures LandXMLFactory::factoryFeatures ( const FactoryParameters & file,
bool is_import ) const
overrideprivatevirtual

Reports the capabilities of this factory for the given file.

Parameters
[in]fileThe factory parameters describing the file context.
[in]is_importWhether the operation is an import (true) or export (false).
Returns
A FactoryFeatures describing supported capabilities.

Implements IOFactory.

◆ getIcon()

virtual String LandXMLFactory::getIcon ( const File & file)
overrideprivatevirtual

Returns the icon resource name associated with LandXML files.

Parameters
[in]fileThe file to retrieve an icon for.
Returns
A String containing the icon resource identifier.

Reimplemented from IOFactory.

◆ getSupportedFormats()

virtual void LandXMLFactory::getSupportedFormats ( Buffer< FileFormat > & formats,
bool is_read )
overrideprivatevirtual

Populates the list of file formats this factory can handle.

Parameters
[in]formatsThe buffer to append supported FileFormat entries to.
[in]is_readWhether the caller is asking for read formats (true) or write formats (false).

Implements IOFactory.

◆ readFile()

virtual bool LandXMLFactory::readFile ( FactoryParameters & file)
overrideprivatevirtual

Reads and imports data from a LandXML file into the design model.

Parameters
[in]fileThe factory parameters describing the file and destination model.
Returns
True if the file was read successfully, false otherwise.

Implements IOFactory.

◆ writeFile()

virtual bool LandXMLFactory::writeFile ( FactoryParameters & )
inlineoverrideprivatevirtual

Write support is not implemented for LandXML.

Returns
Always returns false.

Implements IOFactory.

Definition at line 76 of file LandXMLFactory.h.


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