![]() |
HAL
|
Typedefs | |
using | WriterFactory = std::function< std::unique_ptr< NetlistWriter >()> |
Functions | |
ProgramOptions | get_cli_options () |
const std::unordered_map< std::string, std::vector< std::string > > & | get_writer_extensions () |
Retrieve the extensions for which extensions have been registered. More... | |
void | register_writer (const std::string &name, const WriterFactory &writer_factory, const std::vector< std::string > &supported_file_extensions) |
void | unregister_writer (const std::string &name) |
bool | write (Netlist *netlist, const ProgramArguments &args) |
bool | write (Netlist *netlist, const std::filesystem::path &file_path) |
The netlist writer manager keeps track of all netlist writers that are available within HAL. It is used to dispatch writing tasks to the respective writers.
using hal::netlist_writer_manager::WriterFactory = typedef std::function<std::unique_ptr<NetlistWriter>()> |
Definition at line 50 of file netlist_writer_manager.h.
ProgramOptions hal::netlist_writer_manager::get_cli_options | ( | ) |
Return the command line interface options of the netlist writer dispatcher.
Definition at line 41 of file netlist_writer_manager.cpp.
References hal::ProgramOptions::A_REQUIRED_PARAMETER, and hal::ProgramOptions::add().
const std::unordered_map< std::string, std::vector< std::string > > & hal::netlist_writer_manager::get_writer_extensions | ( | ) |
Retrieve the extensions for which extensions have been registered.
Definition at line 48 of file netlist_writer_manager.cpp.
NETLIST_API void hal::netlist_writer_manager::register_writer | ( | const std::string & | name, |
const WriterFactory & | writer_factory, | ||
const std::vector< std::string > & | supported_file_extensions | ||
) |
Register a new netlist writer for a selection of file types. If writers for some of the extensions already exist, they remain unchanged and the new parser is not registered at all.
[in] | name | - The name of the writer. |
[in] | writer_factory | - A factory function that constructs a new writer instance. |
[in] | supported_file_extensions | - The file extensions this writer can process. |
Definition at line 53 of file netlist_writer_manager.cpp.
References log_info, log_warning, name, hal::utils::to_lower(), and hal::utils::trim().
Referenced by hal::plugin_manager::load().
NETLIST_API void hal::netlist_writer_manager::unregister_writer | ( | const std::string & | name | ) |
Unregister the specified writer.
[in] | name | - The name of the writer. |
Definition at line 74 of file netlist_writer_manager.cpp.
References log_info, and name.
Referenced by hal::plugin_manager::unload().
bool hal::netlist_writer_manager::write | ( | Netlist * | netlist, |
const ProgramArguments & | args | ||
) |
Write the given netlist into a file at the location specified by command line options.
[in] | netlist | - The netlist. |
[in] | args | - The command line options. |
Definition at line 90 of file netlist_writer_manager.cpp.
References control::args, and test_multiple::netlist.
Referenced by hal::ExportRegisteredFormat::exportNetlist(), and hal::netlist_writer_manager_init().
bool hal::netlist_writer_manager::write | ( | Netlist * | netlist, |
const std::filesystem::path & | file_path | ||
) |
Write the given netlist into a file at the given location.
[in] | netlist | - The netlist. |
[in] | file_path | - The output path. |
Definition at line 101 of file netlist_writer_manager.cpp.
References log_error, log_info, and test_multiple::netlist.