Class: OpenCV::VectorVectorPoint2f
- Inherits:
-
Object
- Object
- OpenCV::VectorVectorPoint2f
- 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_Point2f vector_vector_Point2f::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_Point2f vector_vector_Point2f::at(size_t size).
-
#back ⇒ Object
wrapper for vector_Point2f vector_vector_Point2f::back().
-
#capacity ⇒ Object
wrapper for size_t vector_vector_Point2f::capacity().
-
#data ⇒ Object
wrapper for void * vector_vector_Point2f::data().
- #each(&block) ⇒ Object
-
#empty ⇒ Object
wrapper for bool vector_vector_Point2f::empty().
-
#front ⇒ Object
wrapper for vector_Point2f vector_vector_Point2f::front().
-
#initialize(ptr) ⇒ VectorVectorPoint2f
constructor
private
A new instance of VectorVectorPoint2f.
-
#pop_back ⇒ Object
wrapper for void vector_vector_Point2f::pop_back().
-
#push_back(other) ⇒ Object
wrapper for void vector_vector_Point2f::push_back(const vector_Point2f other).
-
#reserve(size) ⇒ Object
wrapper for void vector_vector_Point2f::reserve(size_t size).
-
#resize(size, val = vector_Point2f) ⇒ Object
methods wrapper for void vector_vector_Point2f::resize(size_t size, const vector_Point2f val=vector_Point2f).
-
#size ⇒ Object
wrapper for size_t vector_vector_Point2f::size().
-
#swap(other) ⇒ Object
wrapper for void vector_vector_Point2f::swap(vector_vector_Point2f other).
Constructor Details
#initialize(ptr) ⇒ VectorVectorPoint2f
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 VectorVectorPoint2f.
17277 17278 17279 17280 17281 17282 17283 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17277 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? VectorVectorPoint2fStruct ptr else VectorVectorPoint2fStruct.new(FFI::AutoPointer.new(ptr,VectorVectorPoint2fStruct.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.
17274 17275 17276 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17274 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
17269 17270 17271 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17269 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.new(*args) ⇒ Object
17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17213 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(VectorVectorPoint2fStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for vector_vector_Point2f::vector_vector_Point2f() @@vector_vector_point_2f_vector_vector_point_2f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@vector_vector_point_2f_vector_vector_point_2f_defaults0[i] end begin return Rbind::vector_vector_point_2f_vector_vector_point_2f(*args) rescue TypeError => e @error = e end end # wrapper for vector_vector_Point2f::vector_vector_Point2f(const vector_vector_Point2f other) @@vector_vector_point_2f_vector_vector_point_2f2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) args.size.upto(0) do |i| args[i] = @@vector_vector_point_2f_vector_vector_point_2f2_defaults1[i] end begin return Rbind::vector_vector_point_2f_vector_vector_point_2f2(*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.
17257 17258 17259 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17257 def self.rbind_from_native(ptr,context) VectorVectorPoint2f.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.
17248 17249 17250 17251 17252 17253 17254 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17248 def self.rbind_to_native(obj,context) if obj.is_a? VectorVectorPoint2f 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
17263 17264 17265 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17263 def self.to_native(obj,context) rbind_to_native(obj,context) end |
Instance Method Details
#<<(val) ⇒ Object
17304 17305 17306 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17304 def <<(val) push_back(val) end |
#[](size) ⇒ Object
wrapper for vector_Point2f vector_vector_Point2f::operator[](size_t size)
17349 17350 17351 17352 17353 17354 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17349 def [](size) result = Rbind::vector_vector_point_2f_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
17288 17289 17290 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17288 def __owner__? @__obj_ptr__[:bowner] end |
#at(size) ⇒ Object
wrapper for vector_Point2f vector_vector_Point2f::at(size_t size)
17357 17358 17359 17360 17361 17362 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17357 def at(size) result = Rbind::vector_vector_point_2f_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_Point2f vector_vector_Point2f::back()
17373 17374 17375 17376 17377 17378 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17373 def back() result = Rbind::vector_vector_point_2f_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_Point2f::capacity()
17334 17335 17336 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17334 def capacity() Rbind::vector_vector_point_2f_capacity( self) end |
#data ⇒ Object
wrapper for void * vector_vector_Point2f::data()
17381 17382 17383 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17381 def data() Rbind::vector_vector_point_2f_data( self) end |
#each(&block) ⇒ Object
17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17294 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_Point2f::empty()
17339 17340 17341 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17339 def empty() Rbind::vector_vector_point_2f_empty( self) end |
#front ⇒ Object
wrapper for vector_Point2f vector_vector_Point2f::front()
17365 17366 17367 17368 17369 17370 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17365 def front() result = Rbind::vector_vector_point_2f_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_Point2f::pop_back()
17391 17392 17393 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17391 def pop_back() Rbind::vector_vector_point_2f_pop_back( self) end |
#push_back(other) ⇒ Object
wrapper for void vector_vector_Point2f::push_back(const vector_Point2f other)
17386 17387 17388 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17386 def push_back(other) Rbind::vector_vector_point_2f_push_back( self, other) end |
#reserve(size) ⇒ Object
wrapper for void vector_vector_Point2f::reserve(size_t size)
17344 17345 17346 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17344 def reserve(size) Rbind::vector_vector_point_2f_reserve( self, size) end |
#resize(size, val = vector_Point2f) ⇒ Object
methods wrapper for void vector_vector_Point2f::resize(size_t size, const vector_Point2f val=vector_Point2f)
17324 17325 17326 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17324 def resize(size, val = vector_Point2f) Rbind::vector_vector_point_2f_resize( self, size, val) end |
#size ⇒ Object
wrapper for size_t vector_vector_Point2f::size()
17329 17330 17331 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17329 def size() Rbind::vector_vector_point_2f_size( self) end |
#swap(other) ⇒ Object
wrapper for void vector_vector_Point2f::swap(vector_vector_Point2f other)
17396 17397 17398 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 17396 def swap(other) Rbind::vector_vector_point_2f_swap( self, other) end |