Class: OpenCV::Std::Vector::Uint64_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)


88088
88089
88090
88091
88092
88093
88094
88095
88096
88097
88098
88099
88100
88101
88102
88103
88104
88105
88106
88107
88108
88109
88110
88111
88112
88113
88114
88115
88116
88117
88118
88119
88120
88121
88122
# File 'lib/ropencv/ropencv_types.rb', line 88088

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

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



88080
88081
88082
# File 'lib/ropencv/ropencv_types.rb', line 88080

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

Instance Method Details

#<<(val) ⇒ Object



88329
88330
88331
88332
# File 'lib/ropencv/ropencv_types.rb', line 88329

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

#[](idx) ⇒ Fixnum

Note:

method wrapper for uint64_t std::vector::operator

Parameters:

  • size (Size_T)

Returns:



88245
88246
88247
88248
88249
# File 'lib/ropencv/ropencv_types.rb', line 88245

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

#at(size) ⇒ Fixnum

Note:

method wrapper for uint64_t std::vector::at(size_t size)

Parameters:

  • size (Size_T)

Returns:



88254
88255
88256
88257
88258
# File 'lib/ropencv/ropencv_types.rb', line 88254

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

#backFixnum

Note:

method wrapper for uint64_t std::vector::back()

Returns:



88269
88270
88271
88272
# File 'lib/ropencv/ropencv_types.rb', line 88269

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

#capacitySize_T

Note:

method wrapper for size_t std::vector::capacity()

Returns:

  • (Size_T)


88222
88223
88224
88225
# File 'lib/ropencv/ropencv_types.rb', line 88222

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

#clearVoid

Note:

method wrapper for void std::vector::clear()

Returns:

  • (Void)


88215
88216
88217
88218
# File 'lib/ropencv/ropencv_types.rb', line 88215

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

#dataVoid

Note:

method wrapper for void* std::vector::data()

Returns:

  • (Void)


88276
88277
88278
88279
# File 'lib/ropencv/ropencv_types.rb', line 88276

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

#delete_if(&block) ⇒ Object



88333
88334
88335
88336
88337
88338
88339
88340
# File 'lib/ropencv/ropencv_types.rb', line 88333

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



88319
88320
88321
88322
88323
88324
88325
88326
88327
88328
# File 'lib/ropencv/ropencv_types.rb', line 88319

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::empty()

Returns:

  • (Bool)


88229
88230
88231
88232
# File 'lib/ropencv/ropencv_types.rb', line 88229

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

#frontFixnum

Note:

method wrapper for uint64_t std::vector::front()

Returns:



88262
88263
88264
88265
# File 'lib/ropencv/ropencv_types.rb', line 88262

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

#get_elementFixnum

Note:

method wrapper for uint64_t std::vector::operator

Parameters:

  • size (Size_T)

Returns:



88308
88309
88310
88311
88312
# File 'lib/ropencv/ropencv_types.rb', line 88308

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

#pop_backVoid

Note:

method wrapper for void std::vector::pop_back()

Returns:

  • (Void)


88291
88292
88293
88294
# File 'lib/ropencv/ropencv_types.rb', line 88291

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

#push_back(other) ⇒ Void

Note:

method wrapper for void std::vector::push_back(uint64_t other)

Parameters:

Returns:

  • (Void)


88284
88285
88286
88287
# File 'lib/ropencv/ropencv_types.rb', line 88284

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

#reserve(size) ⇒ Void

Note:

method wrapper for void std::vector::reserve(size_t size)

Parameters:

  • size (Size_T)

Returns:

  • (Void)


88237
88238
88239
88240
# File 'lib/ropencv/ropencv_types.rb', line 88237

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

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

Note:

method wrapper for void std::vector::resize(size_t size, uint64_t val = uint64_t())

methods

Parameters:

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

Returns:

  • (Void)


88201
88202
88203
88204
# File 'lib/ropencv/ropencv_types.rb', line 88201

def resize(size, val = Uint64_T())
    __validate_pointer__
    Rbind::std_vector_uint64t_resize( self, size, val)
end

#sizeSize_T

Note:

method wrapper for size_t std::vector::size()

Returns:

  • (Size_T)


88208
88209
88210
88211
# File 'lib/ropencv/ropencv_types.rb', line 88208

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

#swap(other) ⇒ Void

Note:

method wrapper for void std::vector::swap(std::vector other)

Parameters:

Returns:

  • (Void)


88299
88300
88301
88302
# File 'lib/ropencv/ropencv_types.rb', line 88299

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

#to_sObject

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



88188
88189
88190
# File 'lib/ropencv/ropencv_types.rb', line 88188

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

#validate_index(idx) ⇒ Object



88314
88315
88316
88317
88318
# File 'lib/ropencv/ropencv_types.rb', line 88314

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