Class: OpenCV::VectorVectorDMatch
- Inherits:
-
Object
- Object
- OpenCV::VectorVectorDMatch
- Extended by:
- FFI::DataConverter
- Includes:
- Enumerable
- 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
- #<<(val) ⇒ Object
-
#[](size) ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::operator[](size_t size).
-
#__owner__? ⇒ Boolean
private
returns true if the underlying pointer is owner of the real object.
-
#at(size) ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::at(size_t size).
-
#back ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::back().
-
#capacity ⇒ Object
wrapper for size_t vector_vector_DMatch::capacity().
-
#data ⇒ Object
wrapper for void * vector_vector_DMatch::data().
- #each(&block) ⇒ Object
-
#empty ⇒ Object
wrapper for bool vector_vector_DMatch::empty().
-
#front ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::front().
-
#initialize(ptr) ⇒ VectorVectorDMatch
constructor
private
A new instance of VectorVectorDMatch.
-
#pop_back ⇒ Object
wrapper for void vector_vector_DMatch::pop_back().
-
#push_back(other) ⇒ Object
wrapper for void vector_vector_DMatch::push_back(const vector_DMatch other).
-
#reserve(size) ⇒ Object
wrapper for void vector_vector_DMatch::reserve(size_t size).
-
#resize(size, val = vector_DMatch) ⇒ Object
methods wrapper for void vector_vector_DMatch::resize(size_t size, const vector_DMatch val=vector_DMatch).
-
#size ⇒ Object
wrapper for size_t vector_vector_DMatch::size().
-
#swap(other) ⇒ Object
wrapper for void vector_vector_DMatch::swap(vector_vector_DMatch other).
Constructor Details
#initialize(ptr) ⇒ VectorVectorDMatch
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 VectorVectorDMatch.
18528 18529 18530 18531 18532 18533 18534 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18528 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? VectorVectorDMatchStruct ptr else VectorVectorDMatchStruct.new(FFI::AutoPointer.new(ptr,VectorVectorDMatchStruct.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.
18525 18526 18527 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18525 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
18520 18521 18522 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18520 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.new(*args) ⇒ Object
18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18464 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(VectorVectorDMatchStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for vector_vector_DMatch::vector_vector_DMatch() @@vector_vector_d_match_vector_vector_d_match_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@vector_vector_d_match_vector_vector_d_match_defaults0[i] end begin return Rbind::vector_vector_d_match_vector_vector_d_match(*args) rescue TypeError => e @error = e end end # wrapper for vector_vector_DMatch::vector_vector_DMatch(const vector_vector_DMatch other) @@vector_vector_d_match_vector_vector_d_match2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) args.size.upto(0) do |i| args[i] = @@vector_vector_d_match_vector_vector_d_match2_defaults1[i] end begin return Rbind::vector_vector_d_match_vector_vector_d_match2(*args) rescue TypeError => e @error = e end 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.
18508 18509 18510 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18508 def self.rbind_from_native(ptr,context) VectorVectorDMatch.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.
18499 18500 18501 18502 18503 18504 18505 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18499 def self.rbind_to_native(obj,context) if obj.is_a? VectorVectorDMatch 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
18514 18515 18516 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18514 def self.to_native(obj,context) rbind_to_native(obj,context) end |
Instance Method Details
#<<(val) ⇒ Object
18555 18556 18557 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18555 def <<(val) push_back(val) end |
#[](size) ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::operator[](size_t size)
18600 18601 18602 18603 18604 18605 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18600 def [](size) result = Rbind::vector_vector_d_match_operator_array( self, size) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#__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
18539 18540 18541 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18539 def __owner__? @__obj_ptr__[:bowner] end |
#at(size) ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::at(size_t size)
18608 18609 18610 18611 18612 18613 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18608 def at(size) result = Rbind::vector_vector_d_match_at( self, size) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#back ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::back()
18624 18625 18626 18627 18628 18629 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18624 def back() result = Rbind::vector_vector_d_match_back( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#capacity ⇒ Object
wrapper for size_t vector_vector_DMatch::capacity()
18585 18586 18587 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18585 def capacity() Rbind::vector_vector_d_match_capacity( self) end |
#data ⇒ Object
wrapper for void * vector_vector_DMatch::data()
18632 18633 18634 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18632 def data() Rbind::vector_vector_d_match_data( self) end |
#each(&block) ⇒ Object
18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18545 def each(&block) if block s = size 0.upto(s-1) do |i| yield self[i] end else Enumerator.new(self) end end |
#empty ⇒ Object
wrapper for bool vector_vector_DMatch::empty()
18590 18591 18592 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18590 def empty() Rbind::vector_vector_d_match_empty( self) end |
#front ⇒ Object
wrapper for vector_DMatch vector_vector_DMatch::front()
18616 18617 18618 18619 18620 18621 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18616 def front() result = Rbind::vector_vector_d_match_front( self) # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__? result end |
#pop_back ⇒ Object
wrapper for void vector_vector_DMatch::pop_back()
18642 18643 18644 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18642 def pop_back() Rbind::vector_vector_d_match_pop_back( self) end |
#push_back(other) ⇒ Object
wrapper for void vector_vector_DMatch::push_back(const vector_DMatch other)
18637 18638 18639 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18637 def push_back(other) Rbind::vector_vector_d_match_push_back( self, other) end |
#reserve(size) ⇒ Object
wrapper for void vector_vector_DMatch::reserve(size_t size)
18595 18596 18597 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18595 def reserve(size) Rbind::vector_vector_d_match_reserve( self, size) end |
#resize(size, val = vector_DMatch) ⇒ Object
methods wrapper for void vector_vector_DMatch::resize(size_t size, const vector_DMatch val=vector_DMatch)
18575 18576 18577 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18575 def resize(size, val = vector_DMatch) Rbind::vector_vector_d_match_resize( self, size, val) end |
#size ⇒ Object
wrapper for size_t vector_vector_DMatch::size()
18580 18581 18582 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18580 def size() Rbind::vector_vector_d_match_size( self) end |
#swap(other) ⇒ Object
wrapper for void vector_vector_DMatch::swap(vector_vector_DMatch other)
18647 18648 18649 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 18647 def swap(other) Rbind::vector_vector_d_match_swap( self, other) end |