Class: OpenCV::Cv::Flann::SearchParams
- Inherits:
-
Object
- Object
- OpenCV::Cv::Flann::SearchParams
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ruby/ropencv/ropencv_types.rb
Instance Attribute Summary collapse
- #__obj_ptr__ ⇒ Object readonly private
Class Method Summary collapse
-
.from_native(ptr, context) ⇒ Object
private
can be overwritten by the user.
- .new(*args) ⇒ Object
- .rbind_from_native(ptr, context) ⇒ Object private
- .rbind_to_native(obj, context) ⇒ Object private
-
.to_native(obj, context) ⇒ Object
private
can be overwritten by the user.
Instance Method Summary collapse
-
#__owner__? ⇒ Boolean
private
returns true if the underlying pointer is owner of the real object.
-
#initialize(ptr) ⇒ SearchParams
constructor
private
A new instance of SearchParams.
Constructor Details
#initialize(ptr) ⇒ SearchParams
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SearchParams.
5855 5856 5857 5858 5859 5860 5861 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5855 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? SearchParamsStruct ptr else SearchParamsStruct.new(FFI::AutoPointer.new(ptr,SearchParamsStruct.method(:release))) end end |
Instance Attribute Details
#__obj_ptr__ ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5852 5853 5854 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5852 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
.from_native(ptr, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
can be overwritten by the user
5847 5848 5849 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5847 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.new(*args) ⇒ Object
5816 5817 5818 5819 5820 5821 5822 5823 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5816 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(SearchParamsStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.rbind_from_native(ptr, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5835 5836 5837 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5835 def self.rbind_from_native(ptr,context) SearchParams.new(ptr) end |
.rbind_to_native(obj, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5826 5827 5828 5829 5830 5831 5832 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5826 def self.rbind_to_native(obj,context) if obj.is_a? SearchParams obj.__obj_ptr__ else raise TypeError, "expected kind of #{name}, was #{obj.class}" end end |
.to_native(obj, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
can be overwritten by the user
5841 5842 5843 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5841 def self.to_native(obj,context) rbind_to_native(obj,context) end |
Instance Method Details
#__owner__? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
returns true if the underlying pointer is owner of the real object
5866 5867 5868 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 5866 def __owner__? @__obj_ptr__[:bowner] end |