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
-
#addref ⇒ Void
methods.
- #delete_obj ⇒ Void
- #empty ⇒ Bool
- #obj ⇒ Cv::Algorithm (also: #get_obj)
- #release ⇒ 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
15295 15296 15297 15298 |
# File 'lib/ropencv/ropencv_types.rb', line 15295 def method_missing(m,*args) raise "Ptr cv::Ptr is empty. Cannot call #{m} on it!" if empty obj.method(m).call(*args) end |
Class Method Details
.new(*args) ⇒ Object
15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 |
# File 'lib/ropencv/ropencv_types.rb', line 15156 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> other) @@cv_ptr_cv_algorithm_ptr_cv_algorithm_defaults0 ||= [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_defaults0[i] end begin return Rbind::cv_ptr_cv_algorithm_ptr_cv_algorithm(*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
15151 15152 15153 |
# File 'lib/ropencv/ropencv_types.rb', line 15151 def self.null new(Ptr::Cv_AlgorithmStruct.new) end |
Instance Method Details
#addref ⇒ Void
Note:
method wrapper for void cv::Ptrcv::Algorithm::addref()
methods
15253 15254 15255 15256 |
# File 'lib/ropencv/ropencv_types.rb', line 15253 def addref() __validate_pointer__ Rbind::cv_ptr_cv_algorithm_addref( self) end |
#delete_obj ⇒ Void
Note:
method wrapper for void cv::Ptrcv::Algorithm::delete_obj()
15267 15268 15269 15270 |
# File 'lib/ropencv/ropencv_types.rb', line 15267 def delete_obj() __validate_pointer__ Rbind::cv_ptr_cv_algorithm_delete_obj( self) end |
#empty ⇒ Bool
Note:
method wrapper for bool cv::Ptrcv::Algorithm::empty()
15274 15275 15276 15277 |
# File 'lib/ropencv/ropencv_types.rb', line 15274 def empty() __validate_pointer__ Rbind::cv_ptr_cv_algorithm_empty( self) end |
#obj ⇒ Cv::Algorithm Also known as: get_obj
Note:
method wrapper for cv::Algorithm* obj
15281 15282 15283 15284 15285 15286 15287 15288 15289 |
# File 'lib/ropencv/ropencv_types.rb', line 15281 def obj() __validate_pointer__ result = Rbind::cv_ptr_cv_algorithm_get_obj( 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()
15260 15261 15262 15263 |
# File 'lib/ropencv/ropencv_types.rb', line 15260 def release() __validate_pointer__ Rbind::cv_ptr_cv_algorithm_release( self) end |
#to_s ⇒ Object
converts Ptr::Cv_Algorithm into a string by crawling through all its attributes
15242 15243 15244 |
# File 'lib/ropencv/ropencv_types.rb', line 15242 def to_s "#<cv::Ptr<cv::Algorithm> obj=#{self.obj}>" end |