czmq-ffi-gen 0.9.2-x64-mingw32
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.
- checksums.yaml +7 -0
- data/AUTHORS +1 -0
- data/CHANGES.md +92 -0
- data/Gemfile +2 -0
- data/LICENSE +14 -0
- data/README.md +112 -0
- data/lib/czmq-ffi-gen.rb +7 -0
- data/lib/czmq-ffi-gen/czmq/ffi.rb +1210 -0
- data/lib/czmq-ffi-gen/czmq/ffi/version.rb +15 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +186 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +286 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +307 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +222 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +388 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +140 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +442 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +156 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +283 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +194 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +353 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +359 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +416 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +659 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +189 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +365 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +478 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +396 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +515 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +194 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +294 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +3479 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +203 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +203 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +221 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +227 -0
- data/lib/czmq-ffi-gen/errors.rb +12 -0
- data/lib/czmq-ffi-gen/gem_version.rb +5 -0
- data/lib/czmq-ffi-gen/legacy.rb +16 -0
- data/lib/czmq-ffi-gen/libzmq.rb +18 -0
- data/lib/czmq-ffi-gen/signals.rb +27 -0
- data/lib/czmq-ffi-gen/vendor.rb +5 -0
- data/lib/czmq-ffi-gen/versions.rb +19 -0
- data/vendor/local/bin/inproc_lat.exe +0 -0
- data/vendor/local/bin/inproc_thr.exe +0 -0
- data/vendor/local/bin/libczmq.dll +0 -0
- data/vendor/local/bin/libgcc_s_seh-1.dll +0 -0
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/libzmq.dll +0 -0
- data/vendor/local/bin/local_lat.exe +0 -0
- data/vendor/local/bin/local_thr.exe +0 -0
- data/vendor/local/bin/remote_lat.exe +0 -0
- data/vendor/local/bin/remote_thr.exe +0 -0
- data/vendor/local/include/czmq.h +31 -0
- data/vendor/local/include/czmq_library.h +199 -0
- data/vendor/local/include/czmq_prelude.h +641 -0
- data/vendor/local/include/readme.txt +83 -0
- data/vendor/local/include/sha1.h +76 -0
- data/vendor/local/include/sha1.inc_c +335 -0
- data/vendor/local/include/slre.h +92 -0
- data/vendor/local/include/slre.inc_c +660 -0
- data/vendor/local/include/zactor.h +76 -0
- data/vendor/local/include/zarmour.h +114 -0
- data/vendor/local/include/zauth.h +100 -0
- data/vendor/local/include/zauth_v2.h +88 -0
- data/vendor/local/include/zbeacon.h +86 -0
- data/vendor/local/include/zbeacon_v2.h +75 -0
- data/vendor/local/include/zcert.h +136 -0
- data/vendor/local/include/zcertstore.h +100 -0
- data/vendor/local/include/zchunk.h +163 -0
- data/vendor/local/include/zclock.h +73 -0
- data/vendor/local/include/zconfig.h +185 -0
- data/vendor/local/include/zctx.h +107 -0
- data/vendor/local/include/zdigest.h +65 -0
- data/vendor/local/include/zdir.h +149 -0
- data/vendor/local/include/zdir_patch.h +82 -0
- data/vendor/local/include/zfile.h +177 -0
- data/vendor/local/include/zframe.h +176 -0
- data/vendor/local/include/zgossip.h +95 -0
- data/vendor/local/include/zgossip_engine.inc +927 -0
- data/vendor/local/include/zgossip_msg.h +129 -0
- data/vendor/local/include/zhash.h +195 -0
- data/vendor/local/include/zhash_primes.inc +329 -0
- data/vendor/local/include/zhashx.h +298 -0
- data/vendor/local/include/ziflist.h +77 -0
- data/vendor/local/include/zlist.h +158 -0
- data/vendor/local/include/zlistx.h +205 -0
- data/vendor/local/include/zloop.h +168 -0
- data/vendor/local/include/zmonitor.h +73 -0
- data/vendor/local/include/zmonitor_v2.h +56 -0
- data/vendor/local/include/zmq.h +617 -0
- data/vendor/local/include/zmq_utils.h +48 -0
- data/vendor/local/include/zmsg.h +280 -0
- data/vendor/local/include/zmutex.h +55 -0
- data/vendor/local/include/zpoller.h +92 -0
- data/vendor/local/include/zproc.h +168 -0
- data/vendor/local/include/zproxy.h +111 -0
- data/vendor/local/include/zproxy_v2.h +62 -0
- data/vendor/local/include/zrex.h +82 -0
- data/vendor/local/include/zsock.h +912 -0
- data/vendor/local/include/zsock_option.inc +4126 -0
- data/vendor/local/include/zsocket.h +110 -0
- data/vendor/local/include/zsockopt.h +256 -0
- data/vendor/local/include/zstr.h +110 -0
- data/vendor/local/include/zsys.h +386 -0
- data/vendor/local/include/zthread.h +50 -0
- data/vendor/local/include/ztimerset.h +90 -0
- data/vendor/local/include/ztrie.h +106 -0
- data/vendor/local/include/zuuid.h +96 -0
- data/vendor/local/lib/libczmq.dll.a +0 -0
- data/vendor/local/lib/liblibzmq.dll.a +0 -0
- data/vendor/local/lib/libzmq-static.a +0 -0
- data/vendor/local/lib/pkgconfig/libczmq.pc +23 -0
- data/vendor/local/lib/pkgconfig/libzmq.pc +11 -0
- data/vendor/local/share/zmq/AUTHORS.txt +147 -0
- data/vendor/local/share/zmq/COPYING.LESSER.txt +181 -0
- data/vendor/local/share/zmq/COPYING.txt +674 -0
- data/vendor/local/share/zmq/NEWS.txt +978 -0
- metadata +230 -0
@@ -0,0 +1,15 @@
|
|
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
|
+
VERSION = '3.0.3'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
################################################################################
|
13
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
14
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
15
|
+
################################################################################
|
@@ -0,0 +1,186 @@
|
|
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
|
+
# provides a simple actor framework
|
10
|
+
# @note This class is 100% generated using zproject.
|
11
|
+
class Zactor
|
12
|
+
# Raised when one tries to use an instance of {Zactor} 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.zactor_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
|
+
# Actors get a pipe and arguments from caller
|
78
|
+
# typedef void (zactor_fn) (
|
79
|
+
# zsock_t *pipe, void *args);
|
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.fn
|
86
|
+
::FFI::Function.new :void, [:pointer, :pointer], blocking: true do |pipe, args|
|
87
|
+
pipe = Zsock.__new pipe, false
|
88
|
+
result = yield pipe, args
|
89
|
+
result
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Create a new actor passing arbitrary arguments reference.
|
94
|
+
# @param task [::FFI::Pointer, #to_ptr]
|
95
|
+
# @param args [::FFI::Pointer, #to_ptr]
|
96
|
+
# @return [CZMQ::Zactor]
|
97
|
+
def self.new(task, args)
|
98
|
+
ptr = ::CZMQ::FFI.zactor_new(task, args)
|
99
|
+
__new ptr
|
100
|
+
end
|
101
|
+
|
102
|
+
# Destroy an actor.
|
103
|
+
#
|
104
|
+
# @return [void]
|
105
|
+
def destroy()
|
106
|
+
return unless @ptr
|
107
|
+
self_p = __ptr_give_ref
|
108
|
+
result = ::CZMQ::FFI.zactor_destroy(self_p)
|
109
|
+
result
|
110
|
+
end
|
111
|
+
|
112
|
+
# Send a zmsg message to the actor, take ownership of the message
|
113
|
+
# and destroy when it has been sent.
|
114
|
+
#
|
115
|
+
# @param msg_p [#__ptr_give_ref]
|
116
|
+
# @return [Integer]
|
117
|
+
def send(msg_p)
|
118
|
+
raise DestroyedError unless @ptr
|
119
|
+
self_p = @ptr
|
120
|
+
msg_p = msg_p.__ptr_give_ref
|
121
|
+
result = ::CZMQ::FFI.zactor_send(self_p, msg_p)
|
122
|
+
result
|
123
|
+
end
|
124
|
+
|
125
|
+
# Receive a zmsg message from the actor. Returns NULL if the actor
|
126
|
+
# was interrupted before the message could be received, or if there
|
127
|
+
# was a timeout on the actor.
|
128
|
+
#
|
129
|
+
# @return [Zmsg]
|
130
|
+
def recv()
|
131
|
+
raise DestroyedError unless @ptr
|
132
|
+
self_p = @ptr
|
133
|
+
result = ::CZMQ::FFI.zactor_recv(self_p)
|
134
|
+
result = Zmsg.__new result, true
|
135
|
+
result
|
136
|
+
end
|
137
|
+
|
138
|
+
# Probe the supplied object, and report if it looks like a zactor_t.
|
139
|
+
#
|
140
|
+
# @param self_ [::FFI::Pointer, #to_ptr]
|
141
|
+
# @return [Boolean]
|
142
|
+
def self.is(self_)
|
143
|
+
result = ::CZMQ::FFI.zactor_is(self_)
|
144
|
+
result
|
145
|
+
end
|
146
|
+
|
147
|
+
# Probe the supplied reference. If it looks like a zactor_t instance,
|
148
|
+
# return the underlying libzmq actor handle; else if it looks like
|
149
|
+
# a libzmq actor handle, return the supplied value.
|
150
|
+
#
|
151
|
+
# @param self_ [::FFI::Pointer, #to_ptr]
|
152
|
+
# @return [::FFI::Pointer]
|
153
|
+
def self.resolve(self_)
|
154
|
+
result = ::CZMQ::FFI.zactor_resolve(self_)
|
155
|
+
result
|
156
|
+
end
|
157
|
+
|
158
|
+
# Return the actor's zsock handle. Use this when you absolutely need
|
159
|
+
# to work with the zsock instance rather than the actor.
|
160
|
+
#
|
161
|
+
# @return [Zsock]
|
162
|
+
def sock()
|
163
|
+
raise DestroyedError unless @ptr
|
164
|
+
self_p = @ptr
|
165
|
+
result = ::CZMQ::FFI.zactor_sock(self_p)
|
166
|
+
result = Zsock.__new result, false
|
167
|
+
result
|
168
|
+
end
|
169
|
+
|
170
|
+
# Self test of this class.
|
171
|
+
#
|
172
|
+
# @param verbose [Boolean]
|
173
|
+
# @return [void]
|
174
|
+
def self.test(verbose)
|
175
|
+
verbose = !(0==verbose||!verbose) # boolean
|
176
|
+
result = ::CZMQ::FFI.zactor_test(verbose)
|
177
|
+
result
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
################################################################################
|
184
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
185
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
186
|
+
################################################################################
|
@@ -0,0 +1,286 @@
|
|
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
|
+
# armoured text encoding and decoding
|
10
|
+
# @note This class is 100% generated using zproject.
|
11
|
+
class Zarmour
|
12
|
+
# Standard base 64
|
13
|
+
MODE_BASE64_STD = 0
|
14
|
+
|
15
|
+
# URL and filename friendly base 64
|
16
|
+
MODE_BASE64_URL = 1
|
17
|
+
|
18
|
+
# Standard base 32
|
19
|
+
MODE_BASE32_STD = 2
|
20
|
+
|
21
|
+
# Extended hex base 32
|
22
|
+
MODE_BASE32_HEX = 3
|
23
|
+
|
24
|
+
# Standard base 16
|
25
|
+
MODE_BASE16 = 4
|
26
|
+
|
27
|
+
# Z85 from ZeroMQ RFC 32
|
28
|
+
MODE_Z85 = 5
|
29
|
+
|
30
|
+
# Raised when one tries to use an instance of {Zarmour} after
|
31
|
+
# the internal pointer to the native object has been nullified.
|
32
|
+
class DestroyedError < RuntimeError; end
|
33
|
+
|
34
|
+
# Boilerplate for self pointer, initializer, and finalizer
|
35
|
+
class << self
|
36
|
+
alias :__new :new
|
37
|
+
end
|
38
|
+
# Attaches the pointer _ptr_ to this instance and defines a finalizer for
|
39
|
+
# it if necessary.
|
40
|
+
# @param ptr [::FFI::Pointer]
|
41
|
+
# @param finalize [Boolean]
|
42
|
+
def initialize(ptr, finalize = true)
|
43
|
+
@ptr = ptr
|
44
|
+
if @ptr.null?
|
45
|
+
@ptr = nil # Remove null pointers so we don't have to test for them.
|
46
|
+
elsif finalize
|
47
|
+
@finalizer = self.class.create_finalizer_for @ptr
|
48
|
+
ObjectSpace.define_finalizer self, @finalizer
|
49
|
+
end
|
50
|
+
end
|
51
|
+
# @param ptr [::FFI::Pointer]
|
52
|
+
# @return [Proc]
|
53
|
+
def self.create_finalizer_for(ptr)
|
54
|
+
Proc.new do
|
55
|
+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
|
56
|
+
ptr_ptr.write_pointer ptr
|
57
|
+
::CZMQ::FFI.zarmour_destroy ptr_ptr
|
58
|
+
end
|
59
|
+
end
|
60
|
+
# @return [Boolean]
|
61
|
+
def null?
|
62
|
+
!@ptr or @ptr.null?
|
63
|
+
end
|
64
|
+
# Return internal pointer
|
65
|
+
# @return [::FFI::Pointer]
|
66
|
+
def __ptr
|
67
|
+
raise DestroyedError unless @ptr
|
68
|
+
@ptr
|
69
|
+
end
|
70
|
+
# So external Libraries can just pass the Object to a FFI function which expects a :pointer
|
71
|
+
alias_method :to_ptr, :__ptr
|
72
|
+
# Nullify internal pointer and return pointer pointer.
|
73
|
+
# @note This detaches the current instance from the native object
|
74
|
+
# and thus makes it unusable.
|
75
|
+
# @return [::FFI::MemoryPointer] the pointer pointing to a pointer
|
76
|
+
# pointing to the native object
|
77
|
+
def __ptr_give_ref
|
78
|
+
raise DestroyedError unless @ptr
|
79
|
+
ptr_ptr = ::FFI::MemoryPointer.new :pointer
|
80
|
+
ptr_ptr.write_pointer @ptr
|
81
|
+
__undef_finalizer if @finalizer
|
82
|
+
@ptr = nil
|
83
|
+
ptr_ptr
|
84
|
+
end
|
85
|
+
# Undefines the finalizer for this object.
|
86
|
+
# @note Only use this if you need to and can guarantee that the native
|
87
|
+
# object will be freed by other means.
|
88
|
+
# @return [void]
|
89
|
+
def __undef_finalizer
|
90
|
+
ObjectSpace.undefine_finalizer self
|
91
|
+
@finalizer = nil
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create a new zarmour
|
95
|
+
# @return [CZMQ::Zarmour]
|
96
|
+
def self.new()
|
97
|
+
ptr = ::CZMQ::FFI.zarmour_new()
|
98
|
+
__new ptr
|
99
|
+
end
|
100
|
+
|
101
|
+
# Destroy the zarmour
|
102
|
+
#
|
103
|
+
# @return [void]
|
104
|
+
def destroy()
|
105
|
+
return unless @ptr
|
106
|
+
self_p = __ptr_give_ref
|
107
|
+
result = ::CZMQ::FFI.zarmour_destroy(self_p)
|
108
|
+
result
|
109
|
+
end
|
110
|
+
|
111
|
+
# Encode a stream of bytes into an armoured string. Returns the armoured
|
112
|
+
# string, or NULL if there was insufficient memory available to allocate
|
113
|
+
# a new string.
|
114
|
+
#
|
115
|
+
# @param data [::FFI::Pointer, #to_ptr]
|
116
|
+
# @param size [Integer, #to_int, #to_i]
|
117
|
+
# @return [::FFI::AutoPointer]
|
118
|
+
def encode(data, size)
|
119
|
+
raise DestroyedError unless @ptr
|
120
|
+
self_p = @ptr
|
121
|
+
size = Integer(size)
|
122
|
+
result = ::CZMQ::FFI.zarmour_encode(self_p, data, size)
|
123
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
124
|
+
result
|
125
|
+
end
|
126
|
+
|
127
|
+
# Decode an armoured string into a chunk. The decoded output is
|
128
|
+
# null-terminated, so it may be treated as a string, if that's what
|
129
|
+
# it was prior to encoding.
|
130
|
+
#
|
131
|
+
# @param data [String, #to_s, nil]
|
132
|
+
# @return [Zchunk]
|
133
|
+
def decode(data)
|
134
|
+
raise DestroyedError unless @ptr
|
135
|
+
self_p = @ptr
|
136
|
+
result = ::CZMQ::FFI.zarmour_decode(self_p, data)
|
137
|
+
result = Zchunk.__new result, true
|
138
|
+
result
|
139
|
+
end
|
140
|
+
|
141
|
+
# Get the mode property.
|
142
|
+
#
|
143
|
+
# @return [Integer]
|
144
|
+
def mode()
|
145
|
+
raise DestroyedError unless @ptr
|
146
|
+
self_p = @ptr
|
147
|
+
result = ::CZMQ::FFI.zarmour_mode(self_p)
|
148
|
+
result
|
149
|
+
end
|
150
|
+
|
151
|
+
# Get printable string for mode.
|
152
|
+
#
|
153
|
+
# @return [String]
|
154
|
+
def mode_str()
|
155
|
+
raise DestroyedError unless @ptr
|
156
|
+
self_p = @ptr
|
157
|
+
result = ::CZMQ::FFI.zarmour_mode_str(self_p)
|
158
|
+
result
|
159
|
+
end
|
160
|
+
|
161
|
+
# Set the mode property.
|
162
|
+
#
|
163
|
+
# @param mode [Integer, #to_int, #to_i]
|
164
|
+
# @return [void]
|
165
|
+
def set_mode(mode)
|
166
|
+
raise DestroyedError unless @ptr
|
167
|
+
self_p = @ptr
|
168
|
+
mode = Integer(mode)
|
169
|
+
result = ::CZMQ::FFI.zarmour_set_mode(self_p, mode)
|
170
|
+
result
|
171
|
+
end
|
172
|
+
|
173
|
+
# Return true if padding is turned on.
|
174
|
+
#
|
175
|
+
# @return [Boolean]
|
176
|
+
def pad()
|
177
|
+
raise DestroyedError unless @ptr
|
178
|
+
self_p = @ptr
|
179
|
+
result = ::CZMQ::FFI.zarmour_pad(self_p)
|
180
|
+
result
|
181
|
+
end
|
182
|
+
|
183
|
+
# Turn padding on or off. Default is on.
|
184
|
+
#
|
185
|
+
# @param pad [Boolean]
|
186
|
+
# @return [void]
|
187
|
+
def set_pad(pad)
|
188
|
+
raise DestroyedError unless @ptr
|
189
|
+
self_p = @ptr
|
190
|
+
pad = !(0==pad||!pad) # boolean
|
191
|
+
result = ::CZMQ::FFI.zarmour_set_pad(self_p, pad)
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
195
|
+
# Get the padding character.
|
196
|
+
#
|
197
|
+
# @return [::FFI::Pointer]
|
198
|
+
def pad_char()
|
199
|
+
raise DestroyedError unless @ptr
|
200
|
+
self_p = @ptr
|
201
|
+
result = ::CZMQ::FFI.zarmour_pad_char(self_p)
|
202
|
+
result
|
203
|
+
end
|
204
|
+
|
205
|
+
# Set the padding character.
|
206
|
+
#
|
207
|
+
# @param pad_char [::FFI::Pointer, #to_ptr]
|
208
|
+
# @return [void]
|
209
|
+
def set_pad_char(pad_char)
|
210
|
+
raise DestroyedError unless @ptr
|
211
|
+
self_p = @ptr
|
212
|
+
result = ::CZMQ::FFI.zarmour_set_pad_char(self_p, pad_char)
|
213
|
+
result
|
214
|
+
end
|
215
|
+
|
216
|
+
# Return if splitting output into lines is turned on. Default is off.
|
217
|
+
#
|
218
|
+
# @return [Boolean]
|
219
|
+
def line_breaks()
|
220
|
+
raise DestroyedError unless @ptr
|
221
|
+
self_p = @ptr
|
222
|
+
result = ::CZMQ::FFI.zarmour_line_breaks(self_p)
|
223
|
+
result
|
224
|
+
end
|
225
|
+
|
226
|
+
# Turn splitting output into lines on or off.
|
227
|
+
#
|
228
|
+
# @param line_breaks [Boolean]
|
229
|
+
# @return [void]
|
230
|
+
def set_line_breaks(line_breaks)
|
231
|
+
raise DestroyedError unless @ptr
|
232
|
+
self_p = @ptr
|
233
|
+
line_breaks = !(0==line_breaks||!line_breaks) # boolean
|
234
|
+
result = ::CZMQ::FFI.zarmour_set_line_breaks(self_p, line_breaks)
|
235
|
+
result
|
236
|
+
end
|
237
|
+
|
238
|
+
# Get the line length used for splitting lines.
|
239
|
+
#
|
240
|
+
# @return [Integer]
|
241
|
+
def line_length()
|
242
|
+
raise DestroyedError unless @ptr
|
243
|
+
self_p = @ptr
|
244
|
+
result = ::CZMQ::FFI.zarmour_line_length(self_p)
|
245
|
+
result
|
246
|
+
end
|
247
|
+
|
248
|
+
# Set the line length used for splitting lines.
|
249
|
+
#
|
250
|
+
# @param line_length [Integer, #to_int, #to_i]
|
251
|
+
# @return [void]
|
252
|
+
def set_line_length(line_length)
|
253
|
+
raise DestroyedError unless @ptr
|
254
|
+
self_p = @ptr
|
255
|
+
line_length = Integer(line_length)
|
256
|
+
result = ::CZMQ::FFI.zarmour_set_line_length(self_p, line_length)
|
257
|
+
result
|
258
|
+
end
|
259
|
+
|
260
|
+
# Print properties of object
|
261
|
+
#
|
262
|
+
# @return [void]
|
263
|
+
def print()
|
264
|
+
raise DestroyedError unless @ptr
|
265
|
+
self_p = @ptr
|
266
|
+
result = ::CZMQ::FFI.zarmour_print(self_p)
|
267
|
+
result
|
268
|
+
end
|
269
|
+
|
270
|
+
# Self test of this class.
|
271
|
+
#
|
272
|
+
# @param verbose [Boolean]
|
273
|
+
# @return [void]
|
274
|
+
def self.test(verbose)
|
275
|
+
verbose = !(0==verbose||!verbose) # boolean
|
276
|
+
result = ::CZMQ::FFI.zarmour_test(verbose)
|
277
|
+
result
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
################################################################################
|
284
|
+
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
|
285
|
+
# Read the zproject/README.md for information about making permanent changes. #
|
286
|
+
################################################################################
|