File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ class RRemoteFactory
3535
3636 RRemoteFactory () : m_useLocal(false ) { }
3737
38+ ~RRemoteFactory ()
39+ {
40+ close ();
41+ }
42+
3843 int openRemote ();
3944
4045 void close ();
@@ -62,12 +67,26 @@ class RRemoteFactory
6267 m_serverPort = a_port;
6368 }
6469
65- /* *< Set this to true when the RRemoteFactory instance is configured to be used for remote
66- * access, but there is a need to temporarily access the local file system
70+ /* *
71+ * Sets a remote factory temporarily to local mode.
72+ * Set this to true when the RRemoteFactory instance is configured to be used for remote access,
73+ * but there is a need to temporarily access the local file system. This is only meant to be a
74+ * temporary change, and you should restore the old setting as quickly as possible.
75+ *
76+ * Note that this method is only useful for remote factories. It will have no effect for local ones.
77+ *
78+ * @date Tuesday 23-Jul-2024 8:44 am, Code HQ Tokyo Tsukuda
79+ * @param a_useLocal true to treat the factory as a local factory, or false as a remote one
80+ * @return The previous remote setting of the remote factory
6781 */
68- void useLocal (bool a_useLocal)
82+
83+ bool useLocal (bool a_useLocal)
6984 {
85+ bool oldSetting = m_useLocal;
86+
7087 m_useLocal = a_useLocal;
88+
89+ return oldSetting;
7190 }
7291};
7392
You can’t perform that action at this time.
0 commit comments