czmq-ffi-gen 0.9.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +1 -0
  3. data/CHANGES.md +88 -0
  4. data/Gemfile +2 -0
  5. data/LICENSE +14 -0
  6. data/README.md +112 -0
  7. data/lib/czmq-ffi-gen.rb +7 -0
  8. data/lib/czmq-ffi-gen/czmq/ffi.rb +1210 -0
  9. data/lib/czmq-ffi-gen/czmq/ffi/version.rb +15 -0
  10. data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +186 -0
  11. data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +286 -0
  12. data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +307 -0
  13. data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +222 -0
  14. data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +388 -0
  15. data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +140 -0
  16. data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +442 -0
  17. data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +156 -0
  18. data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +283 -0
  19. data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +194 -0
  20. data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +353 -0
  21. data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +359 -0
  22. data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +416 -0
  23. data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +659 -0
  24. data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +189 -0
  25. data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +365 -0
  26. data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +478 -0
  27. data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +396 -0
  28. data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +515 -0
  29. data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +194 -0
  30. data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +294 -0
  31. data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +3479 -0
  32. data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +203 -0
  33. data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +203 -0
  34. data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +221 -0
  35. data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +227 -0
  36. data/lib/czmq-ffi-gen/errors.rb +12 -0
  37. data/lib/czmq-ffi-gen/gem_version.rb +5 -0
  38. data/lib/czmq-ffi-gen/legacy.rb +16 -0
  39. data/lib/czmq-ffi-gen/libzmq.rb +18 -0
  40. data/lib/czmq-ffi-gen/signals.rb +27 -0
  41. data/lib/czmq-ffi-gen/vendor.rb +5 -0
  42. data/lib/czmq-ffi-gen/versions.rb +19 -0
  43. data/vendor/local/bin/inproc_lat.exe +0 -0
  44. data/vendor/local/bin/inproc_thr.exe +0 -0
  45. data/vendor/local/bin/libczmq.dll +0 -0
  46. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  47. data/vendor/local/bin/libstdc++-6.dll +0 -0
  48. data/vendor/local/bin/libzmq.dll +0 -0
  49. data/vendor/local/bin/local_lat.exe +0 -0
  50. data/vendor/local/bin/local_thr.exe +0 -0
  51. data/vendor/local/bin/remote_lat.exe +0 -0
  52. data/vendor/local/bin/remote_thr.exe +0 -0
  53. data/vendor/local/include/czmq.h +31 -0
  54. data/vendor/local/include/czmq_library.h +199 -0
  55. data/vendor/local/include/czmq_prelude.h +641 -0
  56. data/vendor/local/include/readme.txt +83 -0
  57. data/vendor/local/include/sha1.h +76 -0
  58. data/vendor/local/include/sha1.inc_c +335 -0
  59. data/vendor/local/include/slre.h +92 -0
  60. data/vendor/local/include/slre.inc_c +660 -0
  61. data/vendor/local/include/zactor.h +76 -0
  62. data/vendor/local/include/zarmour.h +114 -0
  63. data/vendor/local/include/zauth.h +100 -0
  64. data/vendor/local/include/zauth_v2.h +88 -0
  65. data/vendor/local/include/zbeacon.h +86 -0
  66. data/vendor/local/include/zbeacon_v2.h +75 -0
  67. data/vendor/local/include/zcert.h +136 -0
  68. data/vendor/local/include/zcertstore.h +100 -0
  69. data/vendor/local/include/zchunk.h +163 -0
  70. data/vendor/local/include/zclock.h +73 -0
  71. data/vendor/local/include/zconfig.h +185 -0
  72. data/vendor/local/include/zctx.h +107 -0
  73. data/vendor/local/include/zdigest.h +65 -0
  74. data/vendor/local/include/zdir.h +149 -0
  75. data/vendor/local/include/zdir_patch.h +82 -0
  76. data/vendor/local/include/zfile.h +177 -0
  77. data/vendor/local/include/zframe.h +176 -0
  78. data/vendor/local/include/zgossip.h +95 -0
  79. data/vendor/local/include/zgossip_engine.inc +927 -0
  80. data/vendor/local/include/zgossip_msg.h +129 -0
  81. data/vendor/local/include/zhash.h +195 -0
  82. data/vendor/local/include/zhash_primes.inc +329 -0
  83. data/vendor/local/include/zhashx.h +298 -0
  84. data/vendor/local/include/ziflist.h +77 -0
  85. data/vendor/local/include/zlist.h +158 -0
  86. data/vendor/local/include/zlistx.h +205 -0
  87. data/vendor/local/include/zloop.h +168 -0
  88. data/vendor/local/include/zmonitor.h +73 -0
  89. data/vendor/local/include/zmonitor_v2.h +56 -0
  90. data/vendor/local/include/zmq.h +617 -0
  91. data/vendor/local/include/zmq_utils.h +48 -0
  92. data/vendor/local/include/zmsg.h +280 -0
  93. data/vendor/local/include/zmutex.h +55 -0
  94. data/vendor/local/include/zpoller.h +92 -0
  95. data/vendor/local/include/zproc.h +168 -0
  96. data/vendor/local/include/zproxy.h +111 -0
  97. data/vendor/local/include/zproxy_v2.h +62 -0
  98. data/vendor/local/include/zrex.h +82 -0
  99. data/vendor/local/include/zsock.h +912 -0
  100. data/vendor/local/include/zsock_option.inc +4126 -0
  101. data/vendor/local/include/zsocket.h +110 -0
  102. data/vendor/local/include/zsockopt.h +256 -0
  103. data/vendor/local/include/zstr.h +110 -0
  104. data/vendor/local/include/zsys.h +386 -0
  105. data/vendor/local/include/zthread.h +50 -0
  106. data/vendor/local/include/ztimerset.h +90 -0
  107. data/vendor/local/include/ztrie.h +106 -0
  108. data/vendor/local/include/zuuid.h +96 -0
  109. data/vendor/local/lib/libczmq.dll.a +0 -0
  110. data/vendor/local/lib/liblibzmq.dll.a +0 -0
  111. data/vendor/local/lib/libzmq-static.a +0 -0
  112. data/vendor/local/lib/pkgconfig/libczmq.pc +23 -0
  113. data/vendor/local/lib/pkgconfig/libzmq.pc +11 -0
  114. data/vendor/local/share/zmq/AUTHORS.txt +147 -0
  115. data/vendor/local/share/zmq/COPYING.LESSER.txt +181 -0
  116. data/vendor/local/share/zmq/COPYING.txt +674 -0
  117. data/vendor/local/share/zmq/NEWS.txt +978 -0
  118. metadata +230 -0
@@ -0,0 +1,478 @@
1
+ ################################################################################
2
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
+ ################################################################################
5
+
6
+ module CZMQ
7
+ module FFI
8
+
9
+ # extended generic list container
10
+ # @note This class is 100% generated using zproject.
11
+ class Zlistx
12
+ # Raised when one tries to use an instance of {Zlistx} after
13
+ # the internal pointer to the native object has been nullified.
14
+ class DestroyedError < RuntimeError; end
15
+
16
+ # Boilerplate for self pointer, initializer, and finalizer
17
+ class << self
18
+ alias :__new :new
19
+ end
20
+ # Attaches the pointer _ptr_ to this instance and defines a finalizer for
21
+ # it if necessary.
22
+ # @param ptr [::FFI::Pointer]
23
+ # @param finalize [Boolean]
24
+ def initialize(ptr, finalize = true)
25
+ @ptr = ptr
26
+ if @ptr.null?
27
+ @ptr = nil # Remove null pointers so we don't have to test for them.
28
+ elsif finalize
29
+ @finalizer = self.class.create_finalizer_for @ptr
30
+ ObjectSpace.define_finalizer self, @finalizer
31
+ end
32
+ end
33
+ # @param ptr [::FFI::Pointer]
34
+ # @return [Proc]
35
+ def self.create_finalizer_for(ptr)
36
+ Proc.new do
37
+ ptr_ptr = ::FFI::MemoryPointer.new :pointer
38
+ ptr_ptr.write_pointer ptr
39
+ ::CZMQ::FFI.zlistx_destroy ptr_ptr
40
+ end
41
+ end
42
+ # @return [Boolean]
43
+ def null?
44
+ !@ptr or @ptr.null?
45
+ end
46
+ # Return internal pointer
47
+ # @return [::FFI::Pointer]
48
+ def __ptr
49
+ raise DestroyedError unless @ptr
50
+ @ptr
51
+ end
52
+ # So external Libraries can just pass the Object to a FFI function which expects a :pointer
53
+ alias_method :to_ptr, :__ptr
54
+ # Nullify internal pointer and return pointer pointer.
55
+ # @note This detaches the current instance from the native object
56
+ # and thus makes it unusable.
57
+ # @return [::FFI::MemoryPointer] the pointer pointing to a pointer
58
+ # pointing to the native object
59
+ def __ptr_give_ref
60
+ raise DestroyedError unless @ptr
61
+ ptr_ptr = ::FFI::MemoryPointer.new :pointer
62
+ ptr_ptr.write_pointer @ptr
63
+ __undef_finalizer if @finalizer
64
+ @ptr = nil
65
+ ptr_ptr
66
+ end
67
+ # Undefines the finalizer for this object.
68
+ # @note Only use this if you need to and can guarantee that the native
69
+ # object will be freed by other means.
70
+ # @return [void]
71
+ def __undef_finalizer
72
+ ObjectSpace.undefine_finalizer self
73
+ @finalizer = nil
74
+ end
75
+
76
+ # Create a new callback of the following type:
77
+ # Destroy an item
78
+ # typedef void (zlistx_destructor_fn) (
79
+ # void **item);
80
+ #
81
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
82
+ # FFI::Function object after passing it to a C function call,
83
+ # it may be garbage collected while C still holds the pointer,
84
+ # potentially resulting in a segmentation fault.
85
+ def self.destructor_fn
86
+ ::FFI::Function.new :void, [:pointer], blocking: true do |item|
87
+ result = yield item
88
+ result
89
+ end
90
+ end
91
+
92
+ # Create a new callback of the following type:
93
+ # Duplicate an item
94
+ # typedef void * (zlistx_duplicator_fn) (
95
+ # const void *item);
96
+ #
97
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
98
+ # FFI::Function object after passing it to a C function call,
99
+ # it may be garbage collected while C still holds the pointer,
100
+ # potentially resulting in a segmentation fault.
101
+ def self.duplicator_fn
102
+ ::FFI::Function.new :pointer, [:pointer], blocking: true do |item|
103
+ result = yield item
104
+ result
105
+ end
106
+ end
107
+
108
+ # Create a new callback of the following type:
109
+ # Compare two items, for sorting
110
+ # typedef int (zlistx_comparator_fn) (
111
+ # const void *item1, const void *item2);
112
+ #
113
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
114
+ # FFI::Function object after passing it to a C function call,
115
+ # it may be garbage collected while C still holds the pointer,
116
+ # potentially resulting in a segmentation fault.
117
+ def self.comparator_fn
118
+ ::FFI::Function.new :int, [:pointer, :pointer], blocking: true do |item1, item2|
119
+ result = yield item1, item2
120
+ result = Integer(result)
121
+ result
122
+ end
123
+ end
124
+
125
+ # Create a new, empty list.
126
+ # @return [CZMQ::Zlistx]
127
+ def self.new()
128
+ ptr = ::CZMQ::FFI.zlistx_new()
129
+ __new ptr
130
+ end
131
+
132
+ # Destroy a list. If an item destructor was specified, all items in the
133
+ # list are automatically destroyed as well.
134
+ #
135
+ # @return [void]
136
+ def destroy()
137
+ return unless @ptr
138
+ self_p = __ptr_give_ref
139
+ result = ::CZMQ::FFI.zlistx_destroy(self_p)
140
+ result
141
+ end
142
+
143
+ # Add an item to the head of the list. Calls the item duplicator, if any,
144
+ # on the item. Resets cursor to list head. Returns an item handle on
145
+ # success, NULL if memory was exhausted.
146
+ #
147
+ # @param item [::FFI::Pointer, #to_ptr]
148
+ # @return [::FFI::Pointer]
149
+ def add_start(item)
150
+ raise DestroyedError unless @ptr
151
+ self_p = @ptr
152
+ result = ::CZMQ::FFI.zlistx_add_start(self_p, item)
153
+ result
154
+ end
155
+
156
+ # Add an item to the tail of the list. Calls the item duplicator, if any,
157
+ # on the item. Resets cursor to list head. Returns an item handle on
158
+ # success, NULL if memory was exhausted.
159
+ #
160
+ # @param item [::FFI::Pointer, #to_ptr]
161
+ # @return [::FFI::Pointer]
162
+ def add_end(item)
163
+ raise DestroyedError unless @ptr
164
+ self_p = @ptr
165
+ result = ::CZMQ::FFI.zlistx_add_end(self_p, item)
166
+ result
167
+ end
168
+
169
+ # Return the number of items in the list
170
+ #
171
+ # @return [Integer]
172
+ def size()
173
+ raise DestroyedError unless @ptr
174
+ self_p = @ptr
175
+ result = ::CZMQ::FFI.zlistx_size(self_p)
176
+ result
177
+ end
178
+
179
+ # Return first item in the list, or null, leaves the cursor
180
+ #
181
+ # @return [::FFI::Pointer]
182
+ def head()
183
+ raise DestroyedError unless @ptr
184
+ self_p = @ptr
185
+ result = ::CZMQ::FFI.zlistx_head(self_p)
186
+ result
187
+ end
188
+
189
+ # Return last item in the list, or null, leaves the cursor
190
+ #
191
+ # @return [::FFI::Pointer]
192
+ def tail()
193
+ raise DestroyedError unless @ptr
194
+ self_p = @ptr
195
+ result = ::CZMQ::FFI.zlistx_tail(self_p)
196
+ result
197
+ end
198
+
199
+ # Return the item at the head of list. If the list is empty, returns NULL.
200
+ # Leaves cursor pointing at the head item, or NULL if the list is empty.
201
+ #
202
+ # @return [::FFI::Pointer]
203
+ def first()
204
+ raise DestroyedError unless @ptr
205
+ self_p = @ptr
206
+ result = ::CZMQ::FFI.zlistx_first(self_p)
207
+ result
208
+ end
209
+
210
+ # Return the next item. At the end of the list (or in an empty list),
211
+ # returns NULL. Use repeated zlistx_next () calls to work through the list
212
+ # from zlistx_first (). First time, acts as zlistx_first().
213
+ #
214
+ # @return [::FFI::Pointer]
215
+ def next()
216
+ raise DestroyedError unless @ptr
217
+ self_p = @ptr
218
+ result = ::CZMQ::FFI.zlistx_next(self_p)
219
+ result
220
+ end
221
+
222
+ # Return the previous item. At the start of the list (or in an empty list),
223
+ # returns NULL. Use repeated zlistx_prev () calls to work through the list
224
+ # backwards from zlistx_last (). First time, acts as zlistx_last().
225
+ #
226
+ # @return [::FFI::Pointer]
227
+ def prev()
228
+ raise DestroyedError unless @ptr
229
+ self_p = @ptr
230
+ result = ::CZMQ::FFI.zlistx_prev(self_p)
231
+ result
232
+ end
233
+
234
+ # Return the item at the tail of list. If the list is empty, returns NULL.
235
+ # Leaves cursor pointing at the tail item, or NULL if the list is empty.
236
+ #
237
+ # @return [::FFI::Pointer]
238
+ def last()
239
+ raise DestroyedError unless @ptr
240
+ self_p = @ptr
241
+ result = ::CZMQ::FFI.zlistx_last(self_p)
242
+ result
243
+ end
244
+
245
+ # Returns the value of the item at the cursor, or NULL if the cursor is
246
+ # not pointing to an item.
247
+ #
248
+ # @return [::FFI::Pointer]
249
+ def item()
250
+ raise DestroyedError unless @ptr
251
+ self_p = @ptr
252
+ result = ::CZMQ::FFI.zlistx_item(self_p)
253
+ result
254
+ end
255
+
256
+ # Returns the handle of the item at the cursor, or NULL if the cursor is
257
+ # not pointing to an item.
258
+ #
259
+ # @return [::FFI::Pointer]
260
+ def cursor()
261
+ raise DestroyedError unless @ptr
262
+ self_p = @ptr
263
+ result = ::CZMQ::FFI.zlistx_cursor(self_p)
264
+ result
265
+ end
266
+
267
+ # Returns the item associated with the given list handle, or NULL if passed
268
+ # in handle is NULL. Asserts that the passed in handle points to a list element.
269
+ #
270
+ # @param handle [::FFI::Pointer, #to_ptr]
271
+ # @return [::FFI::Pointer]
272
+ def self.handle_item(handle)
273
+ result = ::CZMQ::FFI.zlistx_handle_item(handle)
274
+ result
275
+ end
276
+
277
+ # Find an item in the list, searching from the start. Uses the item
278
+ # comparator, if any, else compares item values directly. Returns the
279
+ # item handle found, or NULL. Sets the cursor to the found item, if any.
280
+ #
281
+ # @param item [::FFI::Pointer, #to_ptr]
282
+ # @return [::FFI::Pointer]
283
+ def find(item)
284
+ raise DestroyedError unless @ptr
285
+ self_p = @ptr
286
+ result = ::CZMQ::FFI.zlistx_find(self_p, item)
287
+ result
288
+ end
289
+
290
+ # Detach an item from the list, using its handle. The item is not modified,
291
+ # and the caller is responsible for destroying it if necessary. If handle is
292
+ # null, detaches the first item on the list. Returns item that was detached,
293
+ # or null if none was. If cursor was at item, moves cursor to previous item,
294
+ # so you can detach items while iterating forwards through a list.
295
+ #
296
+ # @param handle [::FFI::Pointer, #to_ptr]
297
+ # @return [::FFI::Pointer]
298
+ def detach(handle)
299
+ raise DestroyedError unless @ptr
300
+ self_p = @ptr
301
+ result = ::CZMQ::FFI.zlistx_detach(self_p, handle)
302
+ result
303
+ end
304
+
305
+ # Detach item at the cursor, if any, from the list. The item is not modified,
306
+ # and the caller is responsible for destroying it as necessary. Returns item
307
+ # that was detached, or null if none was. Moves cursor to previous item, so
308
+ # you can detach items while iterating forwards through a list.
309
+ #
310
+ # @return [::FFI::Pointer]
311
+ def detach_cur()
312
+ raise DestroyedError unless @ptr
313
+ self_p = @ptr
314
+ result = ::CZMQ::FFI.zlistx_detach_cur(self_p)
315
+ result
316
+ end
317
+
318
+ # Delete an item, using its handle. Calls the item destructor is any is
319
+ # set. If handle is null, deletes the first item on the list. Returns 0
320
+ # if an item was deleted, -1 if not. If cursor was at item, moves cursor
321
+ # to previous item, so you can delete items while iterating forwards
322
+ # through a list.
323
+ #
324
+ # @param handle [::FFI::Pointer, #to_ptr]
325
+ # @return [Integer]
326
+ def delete(handle)
327
+ raise DestroyedError unless @ptr
328
+ self_p = @ptr
329
+ result = ::CZMQ::FFI.zlistx_delete(self_p, handle)
330
+ result
331
+ end
332
+
333
+ # Move an item to the start of the list, via its handle.
334
+ #
335
+ # @param handle [::FFI::Pointer, #to_ptr]
336
+ # @return [void]
337
+ def move_start(handle)
338
+ raise DestroyedError unless @ptr
339
+ self_p = @ptr
340
+ result = ::CZMQ::FFI.zlistx_move_start(self_p, handle)
341
+ result
342
+ end
343
+
344
+ # Move an item to the end of the list, via its handle.
345
+ #
346
+ # @param handle [::FFI::Pointer, #to_ptr]
347
+ # @return [void]
348
+ def move_end(handle)
349
+ raise DestroyedError unless @ptr
350
+ self_p = @ptr
351
+ result = ::CZMQ::FFI.zlistx_move_end(self_p, handle)
352
+ result
353
+ end
354
+
355
+ # Remove all items from the list, and destroy them if the item destructor
356
+ # is set.
357
+ #
358
+ # @return [void]
359
+ def purge()
360
+ raise DestroyedError unless @ptr
361
+ self_p = @ptr
362
+ result = ::CZMQ::FFI.zlistx_purge(self_p)
363
+ result
364
+ end
365
+
366
+ # Sort the list. If an item comparator was set, calls that to compare
367
+ # items, otherwise compares on item value. The sort is not stable, so may
368
+ # reorder equal items.
369
+ #
370
+ # @return [void]
371
+ def sort()
372
+ raise DestroyedError unless @ptr
373
+ self_p = @ptr
374
+ result = ::CZMQ::FFI.zlistx_sort(self_p)
375
+ result
376
+ end
377
+
378
+ # Create a new node and insert it into a sorted list. Calls the item
379
+ # duplicator, if any, on the item. If low_value is true, starts searching
380
+ # from the start of the list, otherwise searches from the end. Use the item
381
+ # comparator, if any, to find where to place the new node. Returns a handle
382
+ # to the new node, or NULL if memory was exhausted. Resets the cursor to the
383
+ # list head.
384
+ #
385
+ # @param item [::FFI::Pointer, #to_ptr]
386
+ # @param low_value [Boolean]
387
+ # @return [::FFI::Pointer]
388
+ def insert(item, low_value)
389
+ raise DestroyedError unless @ptr
390
+ self_p = @ptr
391
+ low_value = !(0==low_value||!low_value) # boolean
392
+ result = ::CZMQ::FFI.zlistx_insert(self_p, item, low_value)
393
+ result
394
+ end
395
+
396
+ # Move an item, specified by handle, into position in a sorted list. Uses
397
+ # the item comparator, if any, to determine the new location. If low_value
398
+ # is true, starts searching from the start of the list, otherwise searches
399
+ # from the end.
400
+ #
401
+ # @param handle [::FFI::Pointer, #to_ptr]
402
+ # @param low_value [Boolean]
403
+ # @return [void]
404
+ def reorder(handle, low_value)
405
+ raise DestroyedError unless @ptr
406
+ self_p = @ptr
407
+ low_value = !(0==low_value||!low_value) # boolean
408
+ result = ::CZMQ::FFI.zlistx_reorder(self_p, handle, low_value)
409
+ result
410
+ end
411
+
412
+ # Make a copy of the list; items are duplicated if you set a duplicator
413
+ # for the list, otherwise not. Copying a null reference returns a null
414
+ # reference.
415
+ #
416
+ # @return [Zlistx]
417
+ def dup()
418
+ raise DestroyedError unless @ptr
419
+ self_p = @ptr
420
+ result = ::CZMQ::FFI.zlistx_dup(self_p)
421
+ result = Zlistx.__new result, false
422
+ result
423
+ end
424
+
425
+ # Set a user-defined deallocator for list items; by default items are not
426
+ # freed when the list is destroyed.
427
+ #
428
+ # @param destructor [::FFI::Pointer, #to_ptr]
429
+ # @return [void]
430
+ def set_destructor(destructor)
431
+ raise DestroyedError unless @ptr
432
+ self_p = @ptr
433
+ result = ::CZMQ::FFI.zlistx_set_destructor(self_p, destructor)
434
+ result
435
+ end
436
+
437
+ # Set a user-defined duplicator for list items; by default items are not
438
+ # copied when the list is duplicated.
439
+ #
440
+ # @param duplicator [::FFI::Pointer, #to_ptr]
441
+ # @return [void]
442
+ def set_duplicator(duplicator)
443
+ raise DestroyedError unless @ptr
444
+ self_p = @ptr
445
+ result = ::CZMQ::FFI.zlistx_set_duplicator(self_p, duplicator)
446
+ result
447
+ end
448
+
449
+ # Set a user-defined comparator for zlistx_find and zlistx_sort; the method
450
+ # must return -1, 0, or 1 depending on whether item1 is less than, equal to,
451
+ # or greater than, item2.
452
+ #
453
+ # @param comparator [::FFI::Pointer, #to_ptr]
454
+ # @return [void]
455
+ def set_comparator(comparator)
456
+ raise DestroyedError unless @ptr
457
+ self_p = @ptr
458
+ result = ::CZMQ::FFI.zlistx_set_comparator(self_p, comparator)
459
+ result
460
+ end
461
+
462
+ # Self test of this class.
463
+ #
464
+ # @param verbose [Boolean]
465
+ # @return [void]
466
+ def self.test(verbose)
467
+ verbose = !(0==verbose||!verbose) # boolean
468
+ result = ::CZMQ::FFI.zlistx_test(verbose)
469
+ result
470
+ end
471
+ end
472
+ end
473
+ end
474
+
475
+ ################################################################################
476
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
477
+ # Read the zproject/README.md for information about making permanent changes. #
478
+ ################################################################################