Class: OpenCV::VectorVec6f
- Inherits:
-
Object
- Object
- OpenCV::VectorVec6f
- 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 cv::Vec6f vector_Vec6f::operator[](size_t size).
-
#__owner__? ⇒ Boolean
private
returns true if the underlying pointer is owner of the real object.
-
#at(size) ⇒ Object
wrapper for cv::Vec6f vector_Vec6f::at(size_t size).
-
#back ⇒ Object
wrapper for cv::Vec6f vector_Vec6f::back().
-
#capacity ⇒ Object
wrapper for size_t vector_Vec6f::capacity().
-
#data ⇒ Object
wrapper for void * vector_Vec6f::data().
- #each(&block) ⇒ Object
-
#empty ⇒ Object
wrapper for bool vector_Vec6f::empty().
-
#front ⇒ Object
wrapper for cv::Vec6f vector_Vec6f::front().
-
#initialize(ptr) ⇒ VectorVec6f
constructor
private
A new instance of VectorVec6f.
-
#pop_back ⇒ Object
wrapper for void vector_Vec6f::pop_back().
-
#push_back(other) ⇒ Object
wrapper for void vector_Vec6f::push_back(const cv::Vec6f other).
-
#reserve(size) ⇒ Object
wrapper for void vector_Vec6f::reserve(size_t size).
-
#resize(size, val = cv::Vec6f) ⇒ Object
methods wrapper for void vector_Vec6f::resize(size_t size, const cv::Vec6f val=cv::Vec6f).
-
#size ⇒ Object
wrapper for size_t vector_Vec6f::size().
-
#swap(other) ⇒ Object
wrapper for void vector_Vec6f::swap(vector_Vec6f other).
Constructor Details
#initialize(ptr) ⇒ VectorVec6f
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 VectorVec6f.
17064 17065 17066 17067 17068 17069 17070 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17064 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? VectorVec6fStruct ptr else VectorVec6fStruct.new(FFI::AutoPointer.new(ptr,VectorVec6fStruct.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.
17061 17062 17063 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17061 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
17056 17057 17058 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17056 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.new(*args) ⇒ Object
17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17000 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(VectorVec6fStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for vector_Vec6f::vector_Vec6f() @@vector_vec_6f_vector_vec_6f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@vector_vec_6f_vector_vec_6f_defaults0[i] end begin return Rbind::vector_vec_6f_vector_vec_6f(*args) rescue TypeError => e @error = e end end # wrapper for vector_Vec6f::vector_Vec6f(const vector_Vec6f other) @@vector_vec_6f_vector_vec_6f2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) args.size.upto(0) do |i| args[i] = @@vector_vec_6f_vector_vec_6f2_defaults1[i] end begin return Rbind::vector_vec_6f_vector_vec_6f2(*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.
17044 17045 17046 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17044 def self.rbind_from_native(ptr,context) VectorVec6f.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.
17035 17036 17037 17038 17039 17040 17041 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17035 def self.rbind_to_native(obj,context) if obj.is_a? VectorVec6f 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
17050 17051 17052 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17050 def self.to_native(obj,context) rbind_to_native(obj,context) end |
Instance Method Details
#<<(val) ⇒ Object
17091 17092 17093 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17091 def <<(val) push_back(val) end |
#[](size) ⇒ Object
wrapper for cv::Vec6f vector_Vec6f::operator[](size_t size)
17136 17137 17138 17139 17140 17141 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17136 def [](size) result = Rbind::vector_vec_6f_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
17075 17076 17077 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17075 def __owner__? @__obj_ptr__[:bowner] end |
#at(size) ⇒ Object
wrapper for cv::Vec6f vector_Vec6f::at(size_t size)
17144 17145 17146 17147 17148 17149 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17144 def at(size) result = Rbind::vector_vec_6f_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 cv::Vec6f vector_Vec6f::back()
17160 17161 17162 17163 17164 17165 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17160 def back() result = Rbind::vector_vec_6f_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_Vec6f::capacity()
17121 17122 17123 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17121 def capacity() Rbind::vector_vec_6f_capacity( self) end |
#data ⇒ Object
wrapper for void * vector_Vec6f::data()
17168 17169 17170 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17168 def data() Rbind::vector_vec_6f_data( self) end |
#each(&block) ⇒ Object
17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17081 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_Vec6f::empty()
17126 17127 17128 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17126 def empty() Rbind::vector_vec_6f_empty( self) end |
#front ⇒ Object
wrapper for cv::Vec6f vector_Vec6f::front()
17152 17153 17154 17155 17156 17157 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17152 def front() result = Rbind::vector_vec_6f_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_Vec6f::pop_back()
17178 17179 17180 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17178 def pop_back() Rbind::vector_vec_6f_pop_back( self) end |
#push_back(other) ⇒ Object
wrapper for void vector_Vec6f::push_back(const cv::Vec6f other)
17173 17174 17175 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17173 def push_back(other) Rbind::vector_vec_6f_push_back( self, other) end |
#reserve(size) ⇒ Object
wrapper for void vector_Vec6f::reserve(size_t size)
17131 17132 17133 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17131 def reserve(size) Rbind::vector_vec_6f_reserve( self, size) end |
#resize(size, val = cv::Vec6f) ⇒ Object
methods wrapper for void vector_Vec6f::resize(size_t size, const cv::Vec6f val=cv::Vec6f)
17111 17112 17113 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17111 def resize(size, val = cv::Vec6f) Rbind::vector_vec_6f_resize( self, size, val) end |
#size ⇒ Object
wrapper for size_t vector_Vec6f::size()
17116 17117 17118 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17116 def size() Rbind::vector_vec_6f_size( self) end |
#swap(other) ⇒ Object
wrapper for void vector_Vec6f::swap(vector_Vec6f other)
17183 17184 17185 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17183 def swap(other) Rbind::vector_vec_6f_swap( self, other) end |