Class: OpenCV::Std::Vector::Uint32_T

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)


39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
39191
39192
39193
39194
39195
39196
39197
39198
# File 'lib/ropencv/ropencv_types.rb', line 39164

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Uint32_TStruct)
        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<uint32_t>::vector<uint32_t>()
    @@std_vector_uint32t_vector_uint32t_defaults0 ||= []
    if(args.size >= 0 && args.size <= 0)
        targs = args.clone
        targs.size.upto(-1) do |i|
            targs[i] = @@std_vector_uint32t_vector_uint32t_defaults0[i]
        end
        begin
                return Rbind::std_vector_uint32t_vector_uint32t(*targs)
        rescue TypeError => e
            @error = e
        end
    end

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



39156
39157
39158
# File 'lib/ropencv/ropencv_types.rb', line 39156

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

Instance Method Details

#<<(val) ⇒ Object



39405
39406
39407
39408
# File 'lib/ropencv/ropencv_types.rb', line 39405

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

#[](idx) ⇒ Fixnum

Note:

method wrapper for uint32_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::operator[](size_t size)

Parameters:

  • size (Size_T)

Returns:



39321
39322
39323
39324
39325
# File 'lib/ropencv/ropencv_types.rb', line 39321

def [](size)
validate_index(size)
    __validate_pointer__
    Rbind::std_vector_uint32t_operator_array( self, size)
end

#at(size) ⇒ Fixnum

Note:

method wrapper for uint32_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::at(size_t size)

Parameters:

  • size (Size_T)

Returns:



39330
39331
39332
39333
39334
# File 'lib/ropencv/ropencv_types.rb', line 39330

def at(size)
validate_index(size)
    __validate_pointer__
    Rbind::std_vector_uint32t_at( self, size)
end

#backFixnum

Note:

method wrapper for uint32_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::back()

Returns:



39345
39346
39347
39348
# File 'lib/ropencv/ropencv_types.rb', line 39345

def back()
    __validate_pointer__
    Rbind::std_vector_uint32t_back( self)
end

#capacitySize_T

Note:

method wrapper for size_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::capacity()

Returns:

  • (Size_T)


39298
39299
39300
39301
# File 'lib/ropencv/ropencv_types.rb', line 39298

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

#clearVoid

Note:

method wrapper for void std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::clear()

Returns:

  • (Void)


39291
39292
39293
39294
# File 'lib/ropencv/ropencv_types.rb', line 39291

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

#dataVoid

Note:

method wrapper for void* std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::data()

Returns:

  • (Void)


39352
39353
39354
39355
# File 'lib/ropencv/ropencv_types.rb', line 39352

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

#delete_if(&block) ⇒ Object



39409
39410
39411
39412
39413
39414
39415
39416
# File 'lib/ropencv/ropencv_types.rb', line 39409

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



39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
# File 'lib/ropencv/ropencv_types.rb', line 39395

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::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::empty()

Returns:

  • (Bool)


39305
39306
39307
39308
# File 'lib/ropencv/ropencv_types.rb', line 39305

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

#frontFixnum

Note:

method wrapper for uint32_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::front()

Returns:



39338
39339
39340
39341
# File 'lib/ropencv/ropencv_types.rb', line 39338

def front()
    __validate_pointer__
    Rbind::std_vector_uint32t_front( self)
end

#get_elementFixnum

Note:

method wrapper for uint32_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::operator[](size_t size)

Parameters:

  • size (Size_T)

Returns:



39384
39385
39386
39387
39388
# File 'lib/ropencv/ropencv_types.rb', line 39384

def [](size)
validate_index(size)
    __validate_pointer__
    Rbind::std_vector_uint32t_operator_array( self, size)
end

#pop_backVoid

Note:

method wrapper for void std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::pop_back()

Returns:

  • (Void)


39367
39368
39369
39370
# File 'lib/ropencv/ropencv_types.rb', line 39367

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

#push_back(other) ⇒ Void

Note:

method wrapper for void std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::push_back(uint32_t other)

Parameters:

Returns:

  • (Void)


39360
39361
39362
39363
# File 'lib/ropencv/ropencv_types.rb', line 39360

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

#reserve(size) ⇒ Void

Note:

method wrapper for void std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::reserve(size_t size)

Parameters:

  • size (Size_T)

Returns:

  • (Void)


39313
39314
39315
39316
# File 'lib/ropencv/ropencv_types.rb', line 39313

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

#resize(size, val = Uint32_T()) ⇒ Void

Note:

method wrapper for void std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::resize(size_t size, uint32_t val = uint32_t())

methods

Parameters:

  • size (Size_T)
  • val (Fixnum) (defaults to: Uint32_T())

Returns:

  • (Void)


39277
39278
39279
39280
# File 'lib/ropencv/ropencv_types.rb', line 39277

def resize(size, val = Uint32_T())
    __validate_pointer__
    Rbind::std_vector_uint32t_resize( self, size, val)
end

#sizeSize_T

Note:

method wrapper for size_t std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::size()

Returns:

  • (Size_T)


39284
39285
39286
39287
# File 'lib/ropencv/ropencv_types.rb', line 39284

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

#swap(other) ⇒ Void

Note:

method wrapper for void std::vector

Maruku could not parse this XML/HTML: 
<uint32_t>::swap(std::vector<uint32_t> other)

Parameters:

Returns:

  • (Void)


39375
39376
39377
39378
# File 'lib/ropencv/ropencv_types.rb', line 39375

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

#to_sObject

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



39264
39265
39266
# File 'lib/ropencv/ropencv_types.rb', line 39264

def to_s
    "#<std::vector<uint32_t> >"
end

#validate_index(idx) ⇒ Object



39390
39391
39392
39393
39394
# File 'lib/ropencv/ropencv_types.rb', line 39390

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