This class provides methods for handling current workspace in winIDEA. More...
#include <CWorkspaceController.h>
Public Member Functions | |
| void | close () |
| Closes workspace. | |
| void | closeDiscard () |
| Closes workspace and discards all changes. | |
| void | create (const std::string &rstrWorkspaceFileName, const std::string &rstrIOPEN, const CCfg_debug_basic &rCfg) |
| Creates a new workspace. | |
| CWorkspaceController (std::shared_ptr< ConnectionMgr > connectionMgr) | |
| Instantiates object. | |
| CCfg_debug_basic | get_cfg_debug () |
| Returns current debug configuration. | |
| iconnect::StrStrMap | invoke (const std::string &funcUrl, const iconnect::StrStrMap &inParams) |
| This method invokes functions within winIDEA process. | |
| iconnect::StrStrMap | invoke_T (const std::string &funcUrl, const iconnect::StrStrMap &inParams) |
| This method invokes functions within winIDEA process, but throws on failure. | |
| std::string | invokej (const std::string &funcUrl, const std::string &inParams) |
| This method invokes functions within winIDEA process. | |
| void | newWS (const std::string &rstrWorkspaceFileName, const std::string &rstrIOPEN={}) |
| bool | open (const std::string &workspaceFileName) |
| Opens workspace in winIDEA. | |
| std::string | path () |
| returns path of currently opened workspace | |
| void | save () |
| Saves workspace. | |
| void | saveAs (const std::string &workspaceFileName) |
| Saves workspace to a new file. | |
| void | set_cfg_debug (const CCfg_debug_basic &rCfg) |
| Sets debug configuration. | |
This class provides methods for handling current workspace in winIDEA.
Python example: test_close_open.py
| isys::CWorkspaceController::CWorkspaceController | ( | std::shared_ptr< ConnectionMgr > | connectionMgr | ) |
Instantiates object.
| connectionMgr | class which maintains connection to winIDEA. Connection must be established before this call. Python example: test_workspace_save.py |
| void isys::CWorkspaceController::close | ( | ) |
Closes workspace.
If there are some changes, winIDEA prompts user to save the changes.
| IOException | in case of an error |
Python example: test_close_open.py
| void isys::CWorkspaceController::closeDiscard | ( | ) |
Closes workspace and discards all changes.
| IOException | in case of an error |
Python example: test_close_open.py
| void isys::CWorkspaceController::create | ( | const std::string & | rstrWorkspaceFileName, |
| const std::string & | rstrIOPEN, | ||
| const CCfg_debug_basic & | rCfg ) |
Creates a new workspace.
| rstrWorkspaceFileName | file path/name of the workspace |
| rstrIOPEN | name of iOPEN server to use; if empty, the default BlueBox server is used |
| rCfg | initial debug session configuration |
| IOException | in case of an error |
Python example: test_create.py
| CCfg_debug_basic isys::CWorkspaceController::get_cfg_debug | ( | ) |
Returns current debug configuration.
| IOException | in case of an error, or if winIDEA is using Full Debug configuration which cannot be converted to Basic configuration |
Python example: test_get_set_basic_debug_cfg.py
| iconnect::StrStrMap isys::CWorkspaceController::invoke | ( | const std::string & | funcUrl, |
| const iconnect::StrStrMap & | inParams ) |
This method invokes functions within winIDEA process.
Use this method only when instructed by iSYSTEM support. Example:
result = wsCtrl.invoke('/IDE/Divide', {'Dividend': '10', 'Divisor': '2'})
| funcUrl | name of the winIDEA service function to call |
| inParams | input parameters as mapping |
Note: Python and Java support Python mapping and Java Map as input/output types in addition to isystem.connect.StrStrMap. Example for Java:
wsCtrl.invoke("/IDE/Divide", Map.of("Dividend", "10", "Divisor", "2"));
Python example: test_invoke.py
Note: This method is equivalent to CIDEController::invoke().
| iconnect::StrStrMap isys::CWorkspaceController::invoke_T | ( | const std::string & | funcUrl, |
| const iconnect::StrStrMap & | inParams ) |
This method invokes functions within winIDEA process, but throws on failure.
Use this method only when instructed by iSYSTEM support. Example:
result = wsCtrl.invoke('/IDE/Divide', {'Dividend': '10', 'Divisor': '2'})
| funcUrl | name of the winIDEA service function to call |
| inParams | input parameters as mapping |
Note: Python and Java support Python mapping and Java Map as input/output types in addition to isystem.connect.StrStrMap. Example for Java:
wsCtrl.invoke("/IDE/Divide", Map.of("Dividend", "10", "Divisor", "2"));
Python example: test_invoke.py
Note: This method is equivalent to CIDEController::invoke_T().
| std::string isys::CWorkspaceController::invokej | ( | const std::string & | funcUrl, |
| const std::string & | inParams ) |
This method invokes functions within winIDEA process.
Use this method only when instructed by iSYSTEM support. Example:
result = wsCtrl.invoke('/IDE/Divide', '{"Dividend": 10, "Divisor": 2}')
| funcUrl | name of the winIDEA service function to call |
| inParams | input parameters as JSON string |
Python example: test_invokej.py
| void isys::CWorkspaceController::newWS | ( | const std::string & | rstrWorkspaceFileName, |
| const std::string & | rstrIOPEN = {} ) |
Creates a new workspace.
| rstrWorkspaceFileName | file name of the workspace |
| rstrIOPEN | name of iOPEN server to use; if empty, the default BlueBox server is used |
| IOException | in case of an error |
| bool isys::CWorkspaceController::open | ( | const std::string & | workspaceFileName | ) |
Opens workspace in winIDEA.
| workspaceFileName | file path/name of the workspace |
| IOException | in case of an error |
Python example: test_workspace_save.py
| std::string isys::CWorkspaceController::path | ( | ) |
returns path of currently opened workspace
| IOException | in case of an error |
Python example: test_workspace_save.py
| void isys::CWorkspaceController::save | ( | ) |
| void isys::CWorkspaceController::saveAs | ( | const std::string & | workspaceFileName | ) |
Saves workspace to a new file.
| workspaceFileName | file name of the workspace |
| IOException | in case of an error |
Python example: test_workspace_save.py
| void isys::CWorkspaceController::set_cfg_debug | ( | const CCfg_debug_basic & | rCfg | ) |
Sets debug configuration.
| rCfg | Basic Debug configuration |
| IOException | in case of an error, or the configuration is invalid (unsupported device etc.) |
Python example: test_get_set_basic_debug_cfg.py