corba.js 0.1.20 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +15 -14
  2. package/lib/idl/idl.cjs +1123 -1262
  3. package/lib/idl/idl.cjs.map +1 -1
  4. package/lib/idl/src/idl/cc/typeIDLtoCC.d.ts +4 -2
  5. package/lib/idl/src/idl/cc/typeIDLtoGIOPCC.d.ts +2 -2
  6. package/lib/idl/src/idl/cc/write-code.d.ts +2 -2
  7. package/lib/idl/src/idl/cc/write-interface.d.ts +4 -4
  8. package/lib/idl/src/idl/cc/write-skeleton.d.ts +2 -2
  9. package/lib/idl/src/idl/cc/write-stub.d.ts +2 -2
  10. package/lib/idl/src/idl/idl-lexer.d.ts +9 -4
  11. package/lib/idl/src/idl/idl-node.d.ts +157 -27
  12. package/lib/idl/src/idl/idl-parser.d.ts +2 -2
  13. package/lib/idl/src/idl/ts/typeIDLtoGIOPTS.d.ts +2 -2
  14. package/lib/idl/src/idl/ts/typeIDLtoTS.d.ts +3 -2
  15. package/lib/idl/src/idl/ts/write-interface.d.ts +2 -2
  16. package/lib/idl/src/idl/ts/write-skeleton.d.ts +2 -2
  17. package/lib/idl/src/idl/ts/write-stub.d.ts +2 -2
  18. package/lib/idl/src/idl/ts/write-value.d.ts +2 -2
  19. package/lib/idl/src/idl/ts/write-valueimpl.d.ts +2 -2
  20. package/lib/idl/src/idl/ts/write-valuetype.d.ts +2 -2
  21. package/lib/idl/src/idl/util.d.ts +11 -4
  22. package/lib/src/idl/cc/typeIDLtoCC.d.ts +4 -2
  23. package/lib/src/idl/cc/typeIDLtoCC.js +32 -29
  24. package/lib/src/idl/cc/typeIDLtoCC.js.map +1 -1
  25. package/lib/src/idl/cc/typeIDLtoGIOPCC.d.ts +2 -2
  26. package/lib/src/idl/cc/typeIDLtoGIOPCC.js +15 -19
  27. package/lib/src/idl/cc/typeIDLtoGIOPCC.js.map +1 -1
  28. package/lib/src/idl/cc/write-code.d.ts +2 -2
  29. package/lib/src/idl/cc/write-code.js +43 -70
  30. package/lib/src/idl/cc/write-code.js.map +1 -1
  31. package/lib/src/idl/cc/write-interface.d.ts +4 -4
  32. package/lib/src/idl/cc/write-interface.js +64 -65
  33. package/lib/src/idl/cc/write-interface.js.map +1 -1
  34. package/lib/src/idl/cc/write-skeleton.d.ts +2 -2
  35. package/lib/src/idl/cc/write-skeleton.js +6 -7
  36. package/lib/src/idl/cc/write-skeleton.js.map +1 -1
  37. package/lib/src/idl/cc/write-stub.d.ts +2 -2
  38. package/lib/src/idl/cc/write-stub.js +17 -26
  39. package/lib/src/idl/cc/write-stub.js.map +1 -1
  40. package/lib/src/idl/idl-lexer.d.ts +9 -4
  41. package/lib/src/idl/idl-lexer.js +124 -76
  42. package/lib/src/idl/idl-lexer.js.map +1 -1
  43. package/lib/src/idl/idl-node.d.ts +157 -27
  44. package/lib/src/idl/idl-node.js +12 -140
  45. package/lib/src/idl/idl-node.js.map +1 -1
  46. package/lib/src/idl/idl-parser.d.ts +2 -2
  47. package/lib/src/idl/idl-parser.js +426 -450
  48. package/lib/src/idl/idl-parser.js.map +1 -1
  49. package/lib/src/idl/idl.js +0 -2
  50. package/lib/src/idl/idl.js.map +1 -1
  51. package/lib/src/idl/ts/typeIDLtoGIOPTS.d.ts +2 -2
  52. package/lib/src/idl/ts/typeIDLtoGIOPTS.js +22 -18
  53. package/lib/src/idl/ts/typeIDLtoGIOPTS.js.map +1 -1
  54. package/lib/src/idl/ts/typeIDLtoTS.d.ts +3 -2
  55. package/lib/src/idl/ts/typeIDLtoTS.js +73 -66
  56. package/lib/src/idl/ts/typeIDLtoTS.js.map +1 -1
  57. package/lib/src/idl/ts/write-interface.d.ts +2 -2
  58. package/lib/src/idl/ts/write-interface.js +89 -90
  59. package/lib/src/idl/ts/write-interface.js.map +1 -1
  60. package/lib/src/idl/ts/write-skeleton.d.ts +2 -2
  61. package/lib/src/idl/ts/write-skeleton.js +24 -33
  62. package/lib/src/idl/ts/write-skeleton.js.map +1 -1
  63. package/lib/src/idl/ts/write-stub.d.ts +2 -2
  64. package/lib/src/idl/ts/write-stub.js +26 -35
  65. package/lib/src/idl/ts/write-stub.js.map +1 -1
  66. package/lib/src/idl/ts/write-value.d.ts +2 -2
  67. package/lib/src/idl/ts/write-value.js +39 -59
  68. package/lib/src/idl/ts/write-value.js.map +1 -1
  69. package/lib/src/idl/ts/write-valueimpl.d.ts +2 -2
  70. package/lib/src/idl/ts/write-valueimpl.js +33 -50
  71. package/lib/src/idl/ts/write-valueimpl.js.map +1 -1
  72. package/lib/src/idl/ts/write-valuetype.d.ts +2 -2
  73. package/lib/src/idl/ts/write-valuetype.js +20 -29
  74. package/lib/src/idl/ts/write-valuetype.js.map +1 -1
  75. package/lib/src/idl/util.d.ts +11 -4
  76. package/lib/src/idl/util.js +71 -12
  77. package/lib/src/idl/util.js.map +1 -1
  78. package/package.json +10 -10
package/README.md CHANGED
@@ -68,17 +68,18 @@ the clients an object of type _Client_, which are to be defined in an IDL file:
68
68
  (`out` and `inout` are not implemented by corba.js)
69
69
 
70
70
  For each interface, the IDL compiler will generate stub and skeleton
71
- classes:
71
+ classes. They are named after the interface with a `_stub` or `_skel` suffix,
72
+ as in the C++ mapping, so for an interface `Server`:
72
73
 
73
- * the stub class represents the remote object as if it is a local object
74
- within your program
75
- * the skeleton class is the super class of the interface's implementation
76
- you will need to provide
74
+ * the stub class `Server_stub` represents the remote object as if it is a
75
+ local object within your program
76
+ * the skeleton class `Server_skel` is the super class of the interface's
77
+ implementation you will need to provide
77
78
 
78
79
  Here are example implementations for the client and server defined earlier:
79
80
 
80
81
  ```javascript
81
- class Client_impl extends skel.Client {
82
+ class Client_impl extends Client_skel {
82
83
  constructor(orb: ORB) {
83
84
  super(orb)
84
85
  }
@@ -88,7 +89,7 @@ Here are example implementations for the client and server defined earlier:
88
89
  }
89
90
  }
90
91
 
91
- class Server_impl extends skel.Server {
92
+ class Server_impl extends Server_skel {
92
93
  clients: Array<Client>
93
94
 
94
95
  constructor(orb: ORB) {
@@ -96,7 +97,7 @@ Here are example implementations for the client and server defined earlier:
96
97
  this.clients = new Array<Client>()
97
98
  }
98
99
 
99
- async registerClient(client: stub.Client) {
100
+ async registerClient(client: Client_stub) {
100
101
  clients.push(client)
101
102
  }
102
103
 
@@ -123,7 +124,7 @@ The server side initialization:
123
124
 
124
125
  // for the server, the client is a remote object,
125
126
  // so we need to register the client's stub
126
- orb.registerStubClass(stub.Client)
127
+ orb.registerStubClass(Client_stub)
127
128
 
128
129
  // listen for incoming WebSocket connections
129
130
  const protocol = new WsProtocol()
@@ -141,13 +142,13 @@ The client side initialization:
141
142
 
142
143
  // for the client, the server is a remote object,
143
144
  // so we need to register the server's stub
144
- orb.registerStubClass(stub.Server)
145
+ orb.registerStubClass(Server_stub)
145
146
 
146
147
  // find the object registered as "MyServer"
147
148
  const object = orb.stringToObject("corbaname::localhost:8809#MyServer")
148
149
 
149
- // try to cast it to type stub.Server
150
- let server = stub.Server.narrow(object)
150
+ // try to cast it to type Server_stub
151
+ let server = Server_stub.narrow(object)
151
152
 
152
153
  // we also want the server to call us thru our Client object
153
154
  let me = new Client_impl(orb)
@@ -181,7 +182,7 @@ made the object publicly accessible via
181
182
  ```
182
183
  and the side using the remote object gained access to it via
183
184
  ```javascript
184
- const server = stub.Server.narrow(
185
+ const server = Server_stub.narrow(
185
186
  await orb.stringToObject("corbaname::localhost:2809#MyServer")
186
187
  )
187
188
  ```
@@ -205,7 +206,7 @@ boolean | boolean
205
206
  octet, short, long float, double | number
206
207
  char, string | string
207
208
  sequence&lt;T&gt; | Array&lt;T&gt;
208
- interface T | skel.T, stub.T
209
+ interface T | T_skel, T_stub
209
210
 
210
211
  While IDL interfaces are used to provide communication between objects
211
212
  registered at different ORBs, valuetypes can be used to exchange data