Class: OpenCV::Std::Vector::Cv_Detail_CameraParams

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.vectorObject .vectorObject

Overloads:

Raises:

  • (ArgumentError)


87151
87152
87153
87154
87155
87156
87157
87158
87159
87160
87161
87162
87163
87164
87165
87166
87167
87168
87169
87170
87171
87172
87173
87174
87175
87176
87177
87178
87179
87180
87181
87182
87183
87184
87185
# File 'lib/ropencv/ropencv_types.rb', line 87151

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Cv_Detail_CameraParamsStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # overloaded method wrapper for std::vector<cv::detail::CameraParams>::vector<cv::detail::CameraParams>()
    @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params_defaults0[i]
        end
        begin
                return Rbind::std_vector_cv_detail_camera_params_vector_cv_detail_camera_params(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for std::vector<cv::detail::CameraParams>::vector<cv::detail::CameraParams>(std::vector<cv::detail::CameraParams> other)
    @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params__2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@std_vector_cv_detail_camera_params_vector_cv_detail_camera_params__2_defaults1[i]
        end
        begin
                return Rbind::std_vector_cv_detail_camera_params_vector_cv_detail_camera_params__2(*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



87143
87144
87145
# File 'lib/ropencv/ropencv_types.rb', line 87143

def self.null
    new(Vector::Cv_Detail_CameraParamsStruct.new)
end

Instance Method Details

#<<(val) ⇒ Object



87412
87413
87414
87415
# File 'lib/ropencv/ropencv_types.rb', line 87412

def <<(val)
    push_back(val)
    self
end

#[](idx) ⇒ Cv::Detail::CameraParams

Note:

method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::operator

Parameters:

  • size (Size_T)

Returns:



87308
87309
87310
87311
87312
87313
87314
87315
87316
87317
# File 'lib/ropencv/ropencv_types.rb', line 87308

def [](size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_cv_detail_camera_params_operator_array( self, size)
    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

#at(size) ⇒ Cv::Detail::CameraParams

Note:

method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::at(size_t size)

Parameters:

  • size (Size_T)

Returns:



87322
87323
87324
87325
87326
87327
87328
87329
87330
87331
# File 'lib/ropencv/ropencv_types.rb', line 87322

def at(size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_cv_detail_camera_params_at( self, size)
    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

#backCv::Detail::CameraParams

Note:

method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::back()



87347
87348
87349
87350
87351
87352
87353
87354
87355
# File 'lib/ropencv/ropencv_types.rb', line 87347

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

#capacitySize_T

Note:

method wrapper for size_t std::vectorcv::detail::CameraParams::capacity()

Returns:

  • (Size_T)


87285
87286
87287
87288
# File 'lib/ropencv/ropencv_types.rb', line 87285

def capacity()
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_capacity( self)
end

#clearVoid

Note:

method wrapper for void std::vectorcv::detail::CameraParams::clear()

Returns:

  • (Void)


87278
87279
87280
87281
# File 'lib/ropencv/ropencv_types.rb', line 87278

def clear()
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_clear( self)
end

#dataVoid

Note:

method wrapper for void* std::vectorcv::detail::CameraParams::data()

Returns:

  • (Void)


87359
87360
87361
87362
# File 'lib/ropencv/ropencv_types.rb', line 87359

def data()
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_data( self)
end

#delete_if(&block) ⇒ Object



87416
87417
87418
87419
87420
87421
87422
87423
# File 'lib/ropencv/ropencv_types.rb', line 87416

def delete_if(&block)
    v = self.class.new
    each do |i|
         v << i if !yield(i)
    end
    v.swap(self)
    self
end

#each(&block) ⇒ Object



87402
87403
87404
87405
87406
87407
87408
87409
87410
87411
# File 'lib/ropencv/ropencv_types.rb', line 87402

def each(&block)
    if block
         s = size
         0.upto(s-1) do |i|
             yield self[i]
         end
    else
        Enumerator.new(self)
    end
end

#emptyBool

Note:

method wrapper for bool std::vectorcv::detail::CameraParams::empty()

Returns:

  • (Bool)


87292
87293
87294
87295
# File 'lib/ropencv/ropencv_types.rb', line 87292

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

#frontCv::Detail::CameraParams

Note:

method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::front()



87335
87336
87337
87338
87339
87340
87341
87342
87343
# File 'lib/ropencv/ropencv_types.rb', line 87335

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

#get_elementCv::Detail::CameraParams

Note:

method wrapper for cv::detail::CameraParams std::vectorcv::detail::CameraParams::operator

Parameters:

  • size (Size_T)

Returns:



87391
87392
87393
87394
87395
87396
87397
87398
87399
87400
# File 'lib/ropencv/ropencv_types.rb', line 87391

def [](size)
validate_index(size)
    __validate_pointer__
    result = Rbind::std_vector_cv_detail_camera_params_operator_array( self, size)
    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

#pop_backVoid

Note:

method wrapper for void std::vectorcv::detail::CameraParams::pop_back()

Returns:

  • (Void)


87374
87375
87376
87377
# File 'lib/ropencv/ropencv_types.rb', line 87374

def pop_back()
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_pop_back( self)
end

#push_back(other) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::CameraParams::push_back(cv::detail::CameraParams other)

Parameters:

Returns:

  • (Void)


87367
87368
87369
87370
# File 'lib/ropencv/ropencv_types.rb', line 87367

def push_back(other)
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_push_back( self, other)
end

#reserve(size) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::CameraParams::reserve(size_t size)

Parameters:

  • size (Size_T)

Returns:

  • (Void)


87300
87301
87302
87303
# File 'lib/ropencv/ropencv_types.rb', line 87300

def reserve(size)
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_reserve( self, size)
end

#resize(size, val = Cv::Detail::CameraParams.new()) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::CameraParams::resize(size_t size, cv::detail::CameraParams val = cv::detail::CameraParams())

methods

Parameters:

Returns:

  • (Void)


87264
87265
87266
87267
# File 'lib/ropencv/ropencv_types.rb', line 87264

def resize(size, val = Cv::Detail::CameraParams.new())
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_resize( self, size, val)
end

#sizeSize_T

Note:

method wrapper for size_t std::vectorcv::detail::CameraParams::size()

Returns:

  • (Size_T)


87271
87272
87273
87274
# File 'lib/ropencv/ropencv_types.rb', line 87271

def size()
    __validate_pointer__
    Rbind::std_vector_cv_detail_camera_params_size( self)
end

#swap(other) ⇒ Void

Note:

method wrapper for void std::vectorcv::detail::CameraParams::swap(std::vectorcv::detail::CameraParams other)

Parameters:

Returns:

  • (Void)


87382
87383
87384
87385
# File 'lib/ropencv/ropencv_types.rb', line 87382

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

#to_sObject

converts Vector::Cv_Detail_CameraParams into a string by crawling through all its attributes



87251
87252
87253
# File 'lib/ropencv/ropencv_types.rb', line 87251

def to_s
    "#<std::vector<cv::detail::CameraParams> >"
end

#validate_index(idx) ⇒ Object



87397
87398
87399
87400
87401
# File 'lib/ropencv/ropencv_types.rb', line 87397

def validate_index(idx)
    if idx < 0 || idx >= size
        raise RangeError,"#{idx} is out of range [0..#{size-1}]"
    end
end