API Documentation
Loading...
Searching...
No Matches
ModelFactory Class Reference

#include <ModelFactory.h>

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

Public Member Functions

virtual void getSupportedFormats (Buffer< FileFormat > &formats, bool is_read) override
 
virtual void getSupportedFormats (Buffer< FileFormat > &formats, const File &file) override
 
virtual void getSupportedFormatsByModelType (Buffer< FileFormat > &formats, bool is_read, const String &model_type) override
 
virtual void getSupportedFormats (Buffer< FileFormat > &formats, DesignObjectLookup *lookup, const Buffer< UUID > &models) override
 
virtual String getIcon (const File &file) override
 
virtual bool canRead (const FactoryParameters &file) override
 
virtual bool canWrite (const FactoryParameters &file) override
 
virtual bool determineExtension (const File &file, String &extension) override
 
virtual FactoryOptions defaultReadOptions (const FactoryParameters &file) const override
 
virtual FactoryOptions defaultWriteOptions (const FactoryParameters &file) const override
 
virtual Buffer< UUIDfilterModelsToExport (Buffer< UUID > models_to_check, const DesignObjectLookup *lookup, const FileFormat &export_format) const override
 
FactoryFeatures factoryFeatures (const FactoryParameters &file, bool is_import) const override
 
virtual bool canRead (const File &file) override
 
virtual bool canWrite (const File &file) override
 
virtual bool readFile (FactoryParameters &file) override
 
virtual bool updateFromFile (const FactoryParameters &file, const FactoryOptions &old_options) override
 
virtual bool writeFile (FactoryParameters &file) override
 
void addFactory (IOFactory *factory)
 
void addFactory (String extension, IOFactory *factory)
 
void enableExtension (String extension, const String &read_password, const String &write_password)
 
void enableFactory (IOFactory *factory, const String &read_password, const String &write_password)
 
void enableFactory (const String &factory, const String &read_password, const String &write_password)
 
void clearFactories ()
 
- Public Member Functions inherited from IOFactory
 IOFactory (const String &factory_name)
 
const Stringname () const
 
virtual ~IOFactory ()
 
bool writeScenesToFile (const File &file, const Buffer< Scene > &scene)
 
bool readFileWithDefaultSettings (const File &file, DesignObjectLookup *lookup)
 
void getSupportedFormats (Buffer< FileFormat > &formats)
 
virtual void getSupportedFormatsForExtension (Buffer< FileFormat > &formats, bool is_read, const String &extension)
 
virtual bool isFactoryEnabled (bool is_read) const
 
virtual bool isAutoEnabled () const
 
virtual bool canRead (const FileFormat &file)
 
virtual bool canWrite (const FileFormat &file)
 
Buffer< ScenereadScenesFromFile (const File &file)
 
String factoryReadAppFeature () const
 
String factoryWriteAppFeature () const
 
void throwIfNotEnabled (bool is_read)
 

Static Public Member Functions

static ModelFactoryDefaultFactory ()
 
- Static Public Member Functions inherited from IOFactory
static void EnableFactory (IOFactory *factory, const String &read_password, const String &write_password)
 
static void EnableFactory (const String &factory, const String &read_password, const String &write_password)
 
static void EnableExtension (const String &extension, const String &read_password, const String &write_password)
 

Protected Member Functions

 ModelFactory ()
 
 ~ModelFactory ()
 

Protected Attributes

Buffer< IOFactory * > * m_factory_objects
 
Dictionary< String, IOFactory * > m_extension_factories
 
Dictionary< String, IOFactory * > m_named_factories
 
Dictionary< String, Stringm_extension_read_passwords
 
Dictionary< String, Stringm_extension_write_passwords
 

Constructor & Destructor Documentation

◆ ModelFactory()

ModelFactory ( )
protected

◆ ~ModelFactory()

~ModelFactory ( )
protected

Member Function Documentation

◆ addFactory() [1/2]

void addFactory ( IOFactory * factory)

◆ addFactory() [2/2]

void addFactory ( String extension,
IOFactory * factory )

◆ canRead() [1/2]

bool canRead ( const FactoryParameters & file)
overridevirtual

Reimplemented from IOFactory.

◆ canRead() [2/2]

bool canRead ( const File & file)
overridevirtual

Reimplemented from IOFactory.

◆ canWrite() [1/2]

bool canWrite ( const FactoryParameters & file)
overridevirtual

Reimplemented from IOFactory.

◆ canWrite() [2/2]

bool canWrite ( const File & file)
overridevirtual

Reimplemented from IOFactory.

◆ clearFactories()

void clearFactories ( )

◆ DefaultFactory()

ModelFactory & DefaultFactory ( )
static

◆ defaultReadOptions()

FactoryOptions defaultReadOptions ( const FactoryParameters & file) const
overridevirtual

Reimplemented from IOFactory.

◆ defaultWriteOptions()

FactoryOptions defaultWriteOptions ( const FactoryParameters & file) const
overridevirtual

Reimplemented from IOFactory.

◆ determineExtension()

bool determineExtension ( const File & file,
String & extension )
overridevirtual

Reimplemented from IOFactory.

◆ enableExtension()

void enableExtension ( String extension,
const String & read_password,
const String & write_password )

◆ enableFactory() [1/2]

void enableFactory ( const String & factory,
const String & read_password,
const String & write_password )

◆ enableFactory() [2/2]

void enableFactory ( IOFactory * factory,
const String & read_password,
const String & write_password )

◆ factoryFeatures()

FactoryFeatures factoryFeatures ( const FactoryParameters & file,
bool is_import ) const
overridevirtual

Implements IOFactory.

◆ filterModelsToExport()

Buffer< UUID > filterModelsToExport ( Buffer< UUID > models_to_check,
const DesignObjectLookup * lookup,
const FileFormat & export_format ) const
overridevirtual

Reimplemented from IOFactory.

◆ getIcon()

String getIcon ( const File & file)
overridevirtual

Reimplemented from IOFactory.

◆ getSupportedFormats() [1/3]

void getSupportedFormats ( Buffer< FileFormat > & formats,
bool is_read )
overridevirtual

Implements IOFactory.

◆ getSupportedFormats() [2/3]

virtual void getSupportedFormats ( Buffer< FileFormat > & formats,
const File & file )
inlineoverridevirtual

Reimplemented from IOFactory.

◆ getSupportedFormats() [3/3]

void getSupportedFormats ( Buffer< FileFormat > & formats,
DesignObjectLookup * lookup,
const Buffer< UUID > & models )
overridevirtual

Reimplemented from IOFactory.

◆ getSupportedFormatsByModelType()

void getSupportedFormatsByModelType ( Buffer< FileFormat > & formats,
bool is_read,
const String & model_type )
overridevirtual

Reimplemented from IOFactory.

◆ readFile()

bool readFile ( FactoryParameters & file)
overridevirtual

Implements IOFactory.

◆ updateFromFile()

bool updateFromFile ( const FactoryParameters & file,
const FactoryOptions & old_options )
overridevirtual

Reimplemented from IOFactory.

◆ writeFile()

bool writeFile ( FactoryParameters & file)
overridevirtual

Implements IOFactory.

Member Data Documentation

◆ m_extension_factories

Dictionary<String, IOFactory*> m_extension_factories
protected

◆ m_extension_read_passwords

Dictionary<String, String> m_extension_read_passwords
protected

◆ m_extension_write_passwords

Dictionary<String, String> m_extension_write_passwords
protected

◆ m_factory_objects

Buffer<IOFactory*>* m_factory_objects
protected

◆ m_named_factories

Dictionary<String, IOFactory*> m_named_factories
protected

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