|
HAL
|
Typedefs | |
| using | ParserFactory = std::function< std::unique_ptr< NetlistParser >()> |
Functions | |
| ProgramOptions | get_cli_options () |
| bool | can_parse (const std::filesystem::path &file_name) |
| void | register_parser (const std::string &name, const ParserFactory &parser_factory, const std::vector< std::string > &supported_file_extensions) |
| void | unregister_parser (const std::string &name) |
| std::unique_ptr< Netlist > | parse (const std::filesystem::path &file_name, const ProgramArguments &args) |
| std::unique_ptr< Netlist > | parse (const std::filesystem::path &file_name, const GateLibrary *gate_library) |
| std::vector< std::unique_ptr< Netlist > > | parse_all (const std::filesystem::path &file_name) |
| std::unordered_map< std::string, std::vector< std::string > > | get_parser_to_extensions () |
| using hal::netlist_parser_manager::ParserFactory = typedef std::function<std::unique_ptr<NetlistParser>()> |
Definition at line 47 of file netlist_parser_manager.h.
| bool hal::netlist_parser_manager::can_parse | ( | const std::filesystem::path & | file_name | ) |
Checks whether there is a parser registered for file extension
| file_name | - The input file |
Definition at line 135 of file netlist_parser_manager.cpp.
References hal::utils::to_lower().
Referenced by hal::FileManager::directoryStatus().
| NETLIST_API ProgramOptions hal::netlist_parser_manager::get_cli_options | ( | ) |
Returns the command line interface options of the hdl parser manager
Definition at line 130 of file netlist_parser_manager.cpp.
Referenced by Q_DECLARE_METATYPE().
| std::unordered_map< std::string, std::vector< std::string > > hal::netlist_parser_manager::get_parser_to_extensions | ( | ) |
Returns parser map
Definition at line 238 of file netlist_parser_manager.cpp.
| NETLIST_API std::unique_ptr< Netlist > hal::netlist_parser_manager::parse | ( | const std::filesystem::path & | file_name, |
| const GateLibrary * | gate_library = nullptr |
||
| ) |
Returns the netlist for a file, parsed with a defined gate library.
| [in] | file_name | - The input file. |
| [in] | gate_library | - The gate library used in the file. |
Definition at line 209 of file netlist_parser_manager.cpp.
References configuration::netlists.
| NETLIST_API std::unique_ptr< Netlist > hal::netlist_parser_manager::parse | ( | const std::filesystem::path & | file_name, |
| const ProgramArguments & | args | ||
| ) |
Returns the netlist for the file and specified command line options.
| [in] | file_name | - The input file. |
| [in] | args | - The command line options. |
Definition at line 185 of file netlist_parser_manager.cpp.
References control::args, hal::gate_library_manager::get_gate_library(), and log_error.
Referenced by hal::netlist_factory::load_netlist().
| std::vector< std::unique_ptr< Netlist > > hal::netlist_parser_manager::parse_all | ( | const std::filesystem::path & | file_name | ) |
If gatelibrary name is empty : tries to match the HDL file with each of the preloaded gate libraries and returns a vector of netlist objects for which the matching was successful.
| [in] | file_name | - The netlist file. |
Definition at line 227 of file netlist_parser_manager.cpp.
Referenced by hal::netlist_factory::load_netlists().
| NETLIST_API void hal::netlist_parser_manager::register_parser | ( | const std::string & | name, |
| const ParserFactory & | parser_factory, | ||
| const std::vector< std::string > & | supported_file_extensions | ||
| ) |
Registers a new HDL parser for a selection of file types. If parsers for some of the extensions already exist, they are not changed, only the new ones are registered.
| [in] | name | - The name of the parser. |
| [in] | parser_factory | - A factory function that constructs a new parser instance. |
| [in] | supported_file_extensions | - The file extensions this parser can process. |
Definition at line 148 of file netlist_parser_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_parser_manager::unregister_parser | ( | const std::string & | name | ) |
Unregisters a specific parser.
| [in] | name | - The name of the parser. |
Definition at line 169 of file netlist_parser_manager.cpp.
References log_info, and name.
Referenced by hal::plugin_manager::unload().