|
Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
|
Factory registry for all atomic structure writers. More...
#include <StructureWriterFactory.hpp>
Public Member Functions | |
| bool | registerWriter (std::unique_ptr< BaseStructureWriter > writer) |
| Registers a new structure writer instance. | |
| BaseStructureWriter * | getWriterForExtension (std::string_view extension) const |
| Finds a writer matching a file extension. | |
| BaseStructureWriter * | getWriterForFormat (std::string_view format) const |
| Finds a writer matching a format identifier. | |
| std::vector< std::string > | getSupportedFormats () const |
| Returns names of all registered structure formats. | |
| std::vector< std::string > | getSupportedExtensions () const |
| Returns list of all registered file extensions. | |
Static Public Member Functions | |
| static StructureWriterFactory & | instance () |
| Returns the global singleton factory instance. | |
| template<typename T> | |
| static bool | registerTypeSafe (const char *name) noexcept |
| Static helper to register a writer type safely without throwing during static init. | |
Private Member Functions | |
| StructureWriterFactory ()=default | |
| ~StructureWriterFactory ()=default | |
| StructureWriterFactory (const StructureWriterFactory &)=delete | |
| StructureWriterFactory & | operator= (const StructureWriterFactory &)=delete |
| StructureWriterFactory (StructureWriterFactory &&)=delete | |
| StructureWriterFactory & | operator= (StructureWriterFactory &&)=delete |
Private Attributes | |
| std::vector< std::unique_ptr< BaseStructureWriter > > | writers_ |
| std::map< std::string, BaseStructureWriter * > | extension_map_ |
| std::map< std::string, BaseStructureWriter * > | format_map_ |
Factory registry for all atomic structure writers.
|
privatedefault |

|
privatedefault |
|
privatedelete |

|
privatedelete |

|
nodiscard |
Returns list of all registered file extensions.
|
nodiscard |
Returns names of all registered structure formats.
|
nodiscard |
Finds a writer matching a file extension.
| [in] | extension | File extension (e.g. ".poscar", "vasp", ".cell"). |

|
nodiscard |
Finds a writer matching a format identifier.
| [in] | format | Format name (e.g. "poscar", "vasp", "cif", "cell", "car"). |
|
static |
Returns the global singleton factory instance.


|
privatedelete |

|
privatedelete |

|
inlinestaticnoexcept |
Static helper to register a writer type safely without throwing during static init.
| T | Concrete writer type deriving from BaseStructureWriter. |
| [in] | name | Debug name of the writer for error diagnostics. |

| bool correlation::writers::structure::StructureWriterFactory::registerWriter | ( | std::unique_ptr< BaseStructureWriter > | writer | ) |
Registers a new structure writer instance.
| [in] | writer | Owning pointer to the writer instance. |

|
private |
|
private |
|
private |