Class: OpenCV::Cv::Ptr::Cv_Ml_ParamGrid

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ropencv/ropencv_types.rb

Specializing collapse

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object



52648
52649
52650
52651
# File 'lib/ropencv/ropencv_types.rb', line 52648

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

.ptrObject .ptrObject .ptrObject .ptrObject

Overloads:

Raises:

  • (ArgumentError)


52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
# File 'lib/ropencv/ropencv_types.rb', line 52466

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Ptr::Cv_Ml_ParamGridStruct)
        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::ml::ParamGrid>::Ptr<cv::ml::ParamGrid>()
    @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid_defaults0[i]
        end
        begin
                return Rbind::cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Ptr<cv::ml::ParamGrid>::Ptr<cv::ml::ParamGrid>(cv::Ptr<cv::ml::ParamGrid> other)
    @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__2_defaults1[i]
        end
        begin
                return Rbind::cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__2(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Ptr<cv::ml::ParamGrid>::Ptr<cv::ml::ParamGrid>(cv::Ptr<cv::ml::ParamGrid> owner, cv::ml::ParamGrid* p)
    @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__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_ml_param_grid_ptr_cv_ml_param_grid__3_defaults2[i]
        end
        begin
                return Rbind::cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__3(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for cv::Ptr<cv::ml::ParamGrid>::Ptr<cv::ml::ParamGrid>(cv::ml::ParamGrid* p)
    @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__4_defaults3 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__4_defaults3[i]
        end
        begin
                return Rbind::cv_ptr_cv_ml_param_grid_ptr_cv_ml_param_grid__4(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



52451
52452
52453
# File 'lib/ropencv/ropencv_types.rb', line 52451

def self.null
    new(Ptr::Cv_Ml_ParamGridStruct.new)
end

Instance Method Details

#emptyBool

Note:

method wrapper for bool cv::Ptrcv::ml::ParamGrid::empty()

Returns:

  • (Bool)


52640
52641
52642
52643
# File 'lib/ropencv/ropencv_types.rb', line 52640

def empty()
    __validate_pointer__
    Rbind::cv_ptr_cv_ml_param_grid_empty( self)
end

#getCv::Ml::ParamGrid

Note:

method wrapper for cv::ml::ParamGrid* cv::Ptrcv::ml::ParamGrid::get()

Returns:



52628
52629
52630
52631
52632
52633
52634
52635
52636
# File 'lib/ropencv/ropencv_types.rb', line 52628

def get()
    __validate_pointer__
    result = Rbind::cv_ptr_cv_ml_param_grid_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

#releaseVoid

Note:

method wrapper for void cv::Ptrcv::ml::ParamGrid::release()

methods

Returns:

  • (Void)


52605
52606
52607
52608
# File 'lib/ropencv/ropencv_types.rb', line 52605

def release()
    __validate_pointer__
    Rbind::cv_ptr_cv_ml_param_grid_release( self)
end

#reset(p) ⇒ Void

Note:

method wrapper for void cv::Ptrcv::ml::ParamGrid::reset(cv::ml::ParamGrid* p)

Parameters:

Returns:

  • (Void)


52613
52614
52615
52616
# File 'lib/ropencv/ropencv_types.rb', line 52613

def reset(p)
    __validate_pointer__
    Rbind::cv_ptr_cv_ml_param_grid_reset( self, p)
end

#swap(other) ⇒ Void

Note:

method wrapper for void cv::Ptrcv::ml::ParamGrid::swap(cv::Ptrcv::ml::ParamGrid other)

Parameters:

Returns:

  • (Void)


52621
52622
52623
52624
# File 'lib/ropencv/ropencv_types.rb', line 52621

def swap(other)
    __validate_pointer__
    Rbind::cv_ptr_cv_ml_param_grid_swap( self, other)
end

#to_sObject

converts Ptr::Cv_Ml_ParamGrid into a string by crawling through all its attributes



52594
52595
52596
# File 'lib/ropencv/ropencv_types.rb', line 52594

def to_s
    "#<cv::Ptr<cv::ml::ParamGrid> >"
end