A node loader plug-in interface.
More...
#include <NodeLoaderPlugin.h>
|
| virtual bool | match (const std::wstring &file_path)=0 |
| | Returns true if the plug-in is able to load the file. If true is returned, then this plug-in and only this is asked to load the file. More...
|
| |
| virtual Node | load (const std::wstring &file_path)=0 |
| | Load the node from a file. More...
|
| |
A node loader plug-in interface.
Those plug-in can load maquina nodes from files. Everytime a file must be loaded, each plug-in is asked if it matches with the file using the match method. If the plug-in object returns true, it will then be asked to load the file with the load method.
◆ load()
| virtual Node maquina::NodeLoaderPlugin::load |
( |
const std::wstring & |
file_path | ) |
|
|
pure virtual |
Load the node from a file.
- Parameters
-
| file_path | The system path of the file to load. The path is a document file path, i-e, it may contain variables or be relative to the workspace. The file path must be expanded before usage with maquina::system_path(). |
- Returns
- The loaded node.
- Exceptions
-
| std::runtime_error | The function must throw std::runtime_error exceptions in case of errors. |
◆ match()
| virtual bool maquina::NodeLoaderPlugin::match |
( |
const std::wstring & |
file_path | ) |
|
|
pure virtual |
Returns true if the plug-in is able to load the file. If true is returned, then this plug-in and only this is asked to load the file.
- Parameters
-
| file_path | The path of the file to check. |
- Returns
- true if this plugin must be used to load this file
The documentation for this class was generated from the following file: