rename "module" to "target"
Stefan Schuermans

Stefan Schuermans commited on 2019-05-04 14:39:12
Showing 14 changed files, with 48 additions and 45 deletions.

... ...
@@ -54,6 +54,11 @@
54 54
       If this feature is not needed, the file <code>haltstream</code>
55 55
       should not exist.
56 56
     </p>
57
+    <h2>Operator Connection Interface</h2>
58
+    <p>
59
+    The name of the operator connection interface provided by this module
60
+    is the module name, i.e., <code>loveletters/NAME</code>.
61
+    </p>
57 62
   </body>
58 63
 </html>
59 64
 
... ...
@@ -23,6 +23,11 @@
23 23
       There are no further configuration files, i.e. the subdirectory for
24 24
       an operator connector module is empty.
25 25
     </p>
26
+    <h2>Operator Connection Interface</h2>
27
+    <p>
28
+    The name of the operator connection interface provided by this module
29
+    is the module name, i.e., <code>opprinters/NAME</code>.
30
+    </p>
26 31
   </body>
27 32
 </html>
28 33
 
... ...
@@ -64,14 +64,15 @@
64 64
       The configuration inside an extension consists of the following
65 65
       settings:
66 66
     </p>
67
-    <h4>Module</h4>
67
+    <h4>Target Operator Connection Slot</h4>
68 68
     <p>
69
-      The file <code>module</code> contains the name of the module to
69
+      The file <code>target</code> contains the name of the operator interface to
70 70
       contact via an operator connection if the extension is called.
71
-      The module name consists of two parts: <code>CLASS/NAME</class>
72
-      E.g. to connect to the operator connection printer named
73
-      <code>debug</code>, the file has to contain
74
-      <code>opprinters/debug</code> as module name.
71
+    </p>
72
+    <h2>Operator Connection Interface</h2>
73
+    <p>
74
+    The name of the operator connection interface provided by this module
75
+    is the module name, i.e., <code>opsplitters/NAME</code>.
75 76
     </p>
76 77
   </body>
77 78
 </html>
... ...
@@ -49,14 +49,10 @@
49 49
       The configuration inside an extension consists of the following
50 50
       settings:
51 51
     </p>
52
-    <h4>Module</h4>
52
+    <h4>Target Operator Connection Slot</h4>
53 53
     <p>
54
-      The file <code>module</code> contains the name of the module to
54
+      The file <code>target</code> contains the name of the operator interface to
55 55
       contact via an operator connection if the extension is called.
56
-      The module name consists of two parts: <code>CLASS/NAME</class>
57
-      E.g. to connect to the operator connection printer named
58
-      <code>debug</code>, the file has to contain
59
-      <code>opprinters/debug</code> as module name.
60 56
     </p>
61 57
   </body>
62 58
 </html>
... ...
@@ -49,14 +49,10 @@
49 49
       The configuration inside an extension consists of the following
50 50
       settings:
51 51
     </p>
52
-    <h4>Module</h4>
52
+    <h4>Target Operator Connection Slot</h4>
53 53
     <p>
54
-      The file <code>module</code> contains the name of the module to
54
+      The file <code>target</code> contains the name of the operator interface to
55 55
       contact via an operator connection if the extension is called.
56
-      The module name consists of two parts: <code>CLASS/NAME</class>
57
-      E.g. to connect to the operator connection printer named
58
-      <code>debug</code>, the file has to contain
59
-      <code>opprinters/debug</code> as module name.
60 56
     </p>
61 57
   </body>
62 58
 </html>
... ...
@@ -25,11 +25,11 @@ OpSplitter::Extension::Extension(OpSplitter &opSplitter,
25 25
                                  const Directory &dirBase):
26 26
   m_opSplitter(opSplitter),
27 27
   m_name(name),
28
-  m_fileModule(dirBase.getFile("module"))
28
+  m_fileTarget(dirBase.getFile("target"))
29 29
 {
30 30
   // set up
31 31
   name2number(m_name, m_number);
32
-  getModule();
32
+  getTarget();
33 33
 }
34 34
 
35 35
 /// destructor
... ...
@@ -43,13 +43,13 @@ OpSplitter::Extension::~Extension()
43 43
 /// check for update of configuration
44 44
 void OpSplitter::Extension::updateConfig()
45 45
 {
46
-  // module file was modified -> re-get module to connect to
47
-  if (m_fileModule.checkModified())
48
-    getModule();
46
+  // target file was modified -> re-get target operator interface to connect to
47
+  if (m_fileTarget.checkModified())
48
+    getTarget();
49 49
 }
50 50
 
51
-/// (re-)get module to connect to
52
-void OpSplitter::Extension::getModule()
51
+/// (re-)get target operator interface to connect to
52
+void OpSplitter::Extension::getTarget()
53 53
 {
54 54
   // remove old extension information from extension map
55 55
   if (m_addedToMap) {
... ...
@@ -57,13 +57,13 @@ void OpSplitter::Extension::getModule()
57 57
     m_addedToMap = false;
58 58
   }
59 59
 
60
-  // get new module name from file
61
-  m_fileModule.update();
60
+  // get new target operator interface name from file
61
+  m_fileTarget.update();
62 62
 
63 63
   // add new module name to extension map
64
-  if (m_fileModule.m_valid) {
64
+  if (m_fileTarget.m_valid) {
65 65
     if (m_opSplitter.m_extMap.find(m_number) == m_opSplitter.m_extMap.end()) {
66
-      m_opSplitter.m_extMap[m_number] = m_fileModule.m_obj.m_str;
66
+      m_opSplitter.m_extMap[m_number] = m_fileTarget.m_obj.m_str;
67 67
       m_addedToMap = true;
68 68
     }
69 69
   }
... ...
@@ -43,8 +43,8 @@ public:
43 43
   void updateConfig();
44 44
 
45 45
 protected:
46
-  /// (re-)get module to connect to
47
-  void getModule();
46
+  /// (re-)get target operator interface to connect to
47
+  void getTarget();
48 48
 
49 49
   /**
50 50
    * @brief convert extension name to extension number
... ...
@@ -56,7 +56,7 @@ protected:
56 56
 protected:
57 57
   OpSplitter  &m_opSplitter; ///< owning operator connection splitter object
58 58
   std::string m_name;        ///< extension name (i.e. number)
59
-  NameFile    m_fileModule;  ///< file containing module to connect to
59
+  NameFile    m_fileTarget;  ///< target operator interface name to connect to
60 60
   std::string m_number;      ///< number of extension
61 61
   bool        m_addedToMap;  ///< if extension number could be added to map
62 62
 }; // class OpSplitter::Extension
... ...
@@ -43,13 +43,13 @@ public:
43 43
   void updateConfig();
44 44
 
45 45
 protected:
46
-  /// (re-)get module to connect to
47
-  void getModule();
46
+  /// (re-)get target operator interface to connect to
47
+  void getTarget();
48 48
 
49 49
 protected:
50 50
   Phone       &m_phone;     ///< owning phone object
51 51
   std::string m_name;       ///< extension name (i.e. phone number)
52
-  NameFile    m_fileModule; ///< file containing module to connect to
52
+  NameFile    m_fileTarget; ///< target operator interface name to connect to
53 53
 }; // class Phone<ADDR, SOCK>::Extension
54 54
 
55 55
 } // namespace Blinker
... ...
@@ -28,10 +28,10 @@ Phone<ADDR, SOCK>::Extension::Extension(Phone &phone, const std::string &name,
28 28
                                const Directory &dirBase):
29 29
   m_phone(phone),
30 30
   m_name(name),
31
-  m_fileModule(dirBase.getFile("module"))
31
+  m_fileTarget(dirBase.getFile("target"))
32 32
 {
33 33
   // set up
34
-  getModule();
34
+  getTarget();
35 35
 }
36 36
 
37 37
 /// destructor
... ...
@@ -46,24 +46,24 @@ Phone<ADDR, SOCK>::Extension::~Extension()
46 46
 template<typename ADDR, typename SOCK>
47 47
 void Phone<ADDR, SOCK>::Extension::updateConfig()
48 48
 {
49
-  // module file was modified -> re-get module to connect to
50
-  if (m_fileModule.checkModified())
51
-    getModule();
49
+  // target file was modified -> re-get target operator interface to connect to
50
+  if (m_fileTarget.checkModified())
51
+    getTarget();
52 52
 }
53 53
 
54
-/// (re-)get module to connect to
54
+/// (re-)get target operator interface to connect to
55 55
 template<typename ADDR, typename SOCK>
56
-void Phone<ADDR, SOCK>::Extension::getModule()
56
+void Phone<ADDR, SOCK>::Extension::getTarget()
57 57
 {
58 58
   // remove old extension information from extension map
59 59
   m_phone.m_extMap.erase(m_name);
60 60
 
61 61
   // get new module name from file
62
-  m_fileModule.update();
62
+  m_fileTarget.update();
63 63
 
64 64
   // add new module name to extension map
65
-  if (m_fileModule.m_valid)
66
-    m_phone.m_extMap[m_name] = m_fileModule.m_obj.m_str;
65
+  if (m_fileTarget.m_valid)
66
+    m_phone.m_extMap[m_name] = m_fileTarget.m_obj.m_str;
67 67
 }
68 68
 
69 69
 } // namespace Blinker
70 70