InstanceManager class
Controls when multiple JMAG-Designer instances start and shut down from external controls.
.
More...
Public Member Functions | |
| void | CloseAll () |
| Closes all running instances of JMAG-Designer. | |
| void | CloseInstance (String &key) |
| Shuts down an instance of JMAG-Designer with a specified key. More... | |
| IDispatch * | GetInstance () |
| Returns a JMAG-Designer Application object if a JMAG-Designer instance started by GetInstance() exist. If there is no JMAG-Designer instance started by GetInstance, starts a new JMAG-Designer instance and returns its Application object. Even if only a JMAG-Designer instance started by GetNamedInstance() exists, by calling GetInstance() a new JMAG-Designer instance is started. More... | |
| IDispatch * | GetNamedInstance (String &key, String &sessionKey="") |
| Returns a JMAG-Designer Application object. If the specified JMAG-Designer key does not exist, a new instance of JMAG-Designer is started. More... | |
| int | GetTimeoutSeconds () |
| Returns the value that sets the time to wait until JMAG-Designer starts when starting a new instance. More... | |
| void | Quit () |
| Quits InstanceManager object. More... | |
| void | QuitIfEmpty (int timeout=5000) |
| Exits InstanceManager object if no instance of JMAG-Designer is running. If an instance of JMAG-Designer is running, repeated checks will be made until the specified timeout. If all JMAG-Designer instances do not end within the specified time, InstanceManager object will not quit. More... | |
| void | SetTimeoutMinutes (int min) |
| Specifies the time in minutes to wait for a new instance of JMAG-Designer to start. This can be used when waiting for a running instance of JMAG-Designer to release a license. More... | |
| void | SetTimeoutSeconds (int sec) |
| Specifies the time in seconds to wait for a new instance of JMAG-Designer to start. This can be used when waiting for a running instance of JMAG-Designer to release a license. More... | |
InstanceManager class
Controls when multiple JMAG-Designer instances start and shut down from external controls.
.
Example of obtaining the class object:
| void InstanceManager::CloseInstance | ( | String & | key | ) |
Shuts down an instance of JMAG-Designer with a specified key.
| key | An arbitrary string to identify a Designer object |
| IDispatch * InstanceManager::GetInstance | ( | ) |
Returns a JMAG-Designer Application object if a JMAG-Designer instance started by GetInstance() exist. If there is no JMAG-Designer instance started by GetInstance, starts a new JMAG-Designer instance and returns its Application object. Even if only a JMAG-Designer instance started by GetNamedInstance() exists, by calling GetInstance() a new JMAG-Designer instance is started.
Used when operating a single instance of JMAG-Designer.
GetInstance is equivalent to GetNamedInstance("hotstart").
| IDispatch * InstanceManager::GetNamedInstance | ( | String & | key, |
| String & | sessionKey = "" |
||
| ) |
Returns a JMAG-Designer Application object. If the specified JMAG-Designer key does not exist, a new instance of JMAG-Designer is started.
This command is used when independently operating multiple instances of JMAG-Designer.
| key | An arbitrary string to identify a Designer object |
| int InstanceManager::GetTimeoutSeconds | ( | ) |
Returns the value that sets the time to wait until JMAG-Designer starts when starting a new instance.
| void InstanceManager::Quit | ( | ) |
Quits InstanceManager object.
Running instances of JMAG-Designer will not exit even if this command is performed.
| void InstanceManager::QuitIfEmpty | ( | int | timeout = 5000 | ) |
Exits InstanceManager object if no instance of JMAG-Designer is running. If an instance of JMAG-Designer is running, repeated checks will be made until the specified timeout. If all JMAG-Designer instances do not end within the specified time, InstanceManager object will not quit.
Timeout does not need to be specified; if it is not, a default time of 5000 milliseconds (5 seconds) is applied.
| timeout | Waiting time (msec) |
| void InstanceManager::SetTimeoutMinutes | ( | int | min | ) |
Specifies the time in minutes to wait for a new instance of JMAG-Designer to start. This can be used when waiting for a running instance of JMAG-Designer to release a license.
| min | Waiting time (min) |
| void InstanceManager::SetTimeoutSeconds | ( | int | sec | ) |
Specifies the time in seconds to wait for a new instance of JMAG-Designer to start. This can be used when waiting for a running instance of JMAG-Designer to release a license.
| sec | Waiting time (sec) |