Class: OpenCV::CvDTreeNode
- Inherits:
-
Object
- Object
- OpenCV::CvDTreeNode
- 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) ⇒ CvDTreeNode
constructor
private
A new instance of CvDTreeNode.
Constructor Details
#initialize(ptr) ⇒ CvDTreeNode
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 CvDTreeNode.
15073 15074 15075 15076 15077 15078 15079 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15073 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? CvDTreeNodeStruct ptr else CvDTreeNodeStruct.new(FFI::AutoPointer.new(ptr,CvDTreeNodeStruct.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.
15070 15071 15072 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15070 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
15065 15066 15067 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15065 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.new(*args) ⇒ Object
15034 15035 15036 15037 15038 15039 15040 15041 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15034 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(CvDTreeNodeStruct) 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.
15053 15054 15055 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15053 def self.rbind_from_native(ptr,context) CvDTreeNode.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.
15044 15045 15046 15047 15048 15049 15050 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15044 def self.rbind_to_native(obj,context) if obj.is_a? CvDTreeNode 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
15059 15060 15061 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15059 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
15084 15085 15086 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 15084 def __owner__? @__obj_ptr__[:bowner] end |