Class: Babeltrace2::BTHandle
- Inherits:
-
FFI::Pointer
- Object
- FFI::Pointer
- Babeltrace2::BTHandle
show all
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/babeltrace2/types.rb
Direct Known Subclasses
BTClockClassHandle, BTClockSnapshotHandle, BTComponentClassHandle, BTComponentDescriptorSetHandle, BTComponentHandle, BTConnectionHandle, BTErrorCauseHandle, BTErrorHandle, BTEventClassHandle, BTEventHandle, BTEventHeaderFieldHandle, BTFieldClassEnumerationMappingHandle, BTFieldClassHandle, BTFieldClassStructureMemberHandle, BTFieldClassVariantOptionHandle, BTFieldHandle, BTFieldPathHandle, BTFieldPathItemHandle, BTGraphHandle, BTIntegerRangeSetHandle, BTIntegerRangeSignedHandle, BTIntegerRangeUnsignedHandle, BTInterrupterHandle, BTMessageHandle, BTMessageIteratorClassHandle, BTMessageIteratorHandle, BTObjectHandle, BTPacketHandle, BTPluginHandle, BTPluginSetHandle, BTPluginSoSharedLibHandleHandle, BTPortHandle, BTQueryExecutorHandle, BTSelfComponentFilterConfigurationHandle, BTSelfComponentSinkConfigurationHandle, BTSelfComponentSourceConfigurationHandle, BTSelfMessageIteratorConfigurationHandle, BTStreamClassHandle, BTStreamHandle, BTTraceClassHandle, BTTraceHandle, BTValueHandle
Class Method Summary
collapse
Class Method Details
.from_native(value, context) ⇒ Object
10
11
12
|
# File 'lib/babeltrace2/types.rb', line 10
def from_native(value, context)
new(value) end
|
.native_type ⇒ Object
6
7
8
|
# File 'lib/babeltrace2/types.rb', line 6
def native_type
FFI::Type::POINTER
end
|
.to_native(value, context) ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/babeltrace2/types.rb', line 14
def to_native(value, context)
unless value.nil?
p = value.to_ptr
raise "invalid type #{p.class}, expected #{self}" unless p.kind_of?(self)
p
else
nil
end
end
|