Class: OpenCV::Cv::Ptr::Cv_Algorithm
- Inherits:
-
Object
- Object
- OpenCV::Cv::Ptr::Cv_Algorithm
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Specializing collapse
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #empty ⇒ Bool
- #get ⇒ Cv::Algorithm
-
#release ⇒ Void
methods.
- #reset(p) ⇒ Void
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Ptr::Cv_Algorithm into a string by crawling through all its attributes.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
27512 27513 27514 27515 |
# File 'lib/ropencv/ropencv_types.rb', line 27512 def method_missing(m,*args) raise "Ptr cv::Ptr is empty. Cannot call #{m} on it!" if empty get.method(m).call(*args) end |
Class Method Details
.ptr ⇒ Object .ptr ⇒ Object .ptr ⇒ Object .ptr ⇒ Object
27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 27343 27344 27345 27346 27347 27348 27349 27350 27351 27352 27353 27354 27355 27356 27357 27358 27359 27360 27361 27362 27363 27364 27365 27366 27367 27368 27369 27370 27371 27372 27373 27374 27375 27376 27377 27378 27379 27380 27381 27382 27383 27384 27385 27386 27387 27388 27389 27390 27391 27392 |
# File 'lib/ropencv/ropencv_types.rb', line 27330 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Ptr::Cv_AlgorithmStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for cv::Ptr<cv::Algorithm>::Ptr<cv::Algorithm>() @@cv_ptr_cv_algorithm_ptr_cv_algorithm_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_ptr_cv_algorithm_ptr_cv_algorithm_defaults0[i] end begin return Rbind::cv_ptr_cv_algorithm_ptr_cv_algorithm(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::Algorithm>::Ptr<cv::Algorithm>(cv::Ptr<cv::Algorithm> other) @@cv_ptr_cv_algorithm_ptr_cv_algorithm__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_ptr_cv_algorithm_ptr_cv_algorithm__2_defaults1[i] end begin return Rbind::cv_ptr_cv_algorithm_ptr_cv_algorithm__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::Algorithm>::Ptr<cv::Algorithm>(cv::Ptr<cv::Algorithm> owner, cv::Algorithm* p) @@cv_ptr_cv_algorithm_ptr_cv_algorithm__3_defaults2 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@cv_ptr_cv_algorithm_ptr_cv_algorithm__3_defaults2[i] end begin return Rbind::cv_ptr_cv_algorithm_ptr_cv_algorithm__3(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::Algorithm>::Ptr<cv::Algorithm>(cv::Algorithm* p) @@cv_ptr_cv_algorithm_ptr_cv_algorithm__4_defaults3 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_ptr_cv_algorithm_ptr_cv_algorithm__4_defaults3[i] end begin return Rbind::cv_ptr_cv_algorithm_ptr_cv_algorithm__4(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
27315 27316 27317 |
# File 'lib/ropencv/ropencv_types.rb', line 27315 def self.null new(Ptr::Cv_AlgorithmStruct.new) end |
Instance Method Details
#empty ⇒ Bool
Note:
method wrapper for bool cv::Ptrcv::Algorithm::empty()
27504 27505 27506 27507 |
# File 'lib/ropencv/ropencv_types.rb', line 27504 def empty() __validate_pointer__ Rbind::cv_ptr_cv_algorithm_empty( self) end |
#get ⇒ Cv::Algorithm
Note:
method wrapper for cv::Algorithm* cv::Ptrcv::Algorithm::get()
27492 27493 27494 27495 27496 27497 27498 27499 27500 |
# File 'lib/ropencv/ropencv_types.rb', line 27492 def get() __validate_pointer__ result = Rbind::cv_ptr_cv_algorithm_get( self) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#release ⇒ Void
Note:
method wrapper for void cv::Ptrcv::Algorithm::release()
methods
27469 27470 27471 27472 |
# File 'lib/ropencv/ropencv_types.rb', line 27469 def release() __validate_pointer__ Rbind::cv_ptr_cv_algorithm_release( self) end |
#reset(p) ⇒ Void
Note:
method wrapper for void cv::Ptrcv::Algorithm::reset(cv::Algorithm* p)
27477 27478 27479 27480 |
# File 'lib/ropencv/ropencv_types.rb', line 27477 def reset(p) __validate_pointer__ Rbind::cv_ptr_cv_algorithm_reset( self, p) end |
#swap(other) ⇒ Void
Note:
method wrapper for void cv::Ptrcv::Algorithm::swap(cv::Ptrcv::Algorithm other)
27485 27486 27487 27488 |
# File 'lib/ropencv/ropencv_types.rb', line 27485 def swap(other) __validate_pointer__ Rbind::cv_ptr_cv_algorithm_swap( self, other) end |
#to_s ⇒ Object
converts Ptr::Cv_Algorithm into a string by crawling through all its attributes
27458 27459 27460 |
# File 'lib/ropencv/ropencv_types.rb', line 27458 def to_s "#<cv::Ptr<cv::Algorithm> >" end |