Class: OpenCV::Std::String
- Inherits:
-
Object
- Object
- OpenCV::Std::String
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Specializing collapse
- .to_native(obj, context) ⇒ Object
-
#to_s ⇒ Object
converts String into a string by crawling through all its attributes.
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #[](idx) ⇒ Char
- #c_str ⇒ C_string
- #clear ⇒ Void
- #compare(other) ⇒ Fixnum
- #empty ⇒ Bool
- #length ⇒ Size_T
-
#size ⇒ Size_T
methods.
- #swap(other) ⇒ Void
Class Method Details
.string ⇒ Object .string(other) ⇒ Object .string(str, size) ⇒ Object
78431 78432 78433 78434 78435 78436 78437 78438 78439 78440 78441 78442 78443 78444 78445 78446 78447 78448 78449 78450 78451 78452 78453 78454 78455 78456 78457 78458 78459 78460 78461 78462 78463 78464 78465 78466 78467 78468 78469 78470 78471 78472 78473 78474 78475 78476 78477 78478 78479 |
# File 'lib/ropencv/ropencv_types.rb', line 78431 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(StringStruct) 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::string::string() @@std_string_string_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_string_string_defaults0[i] end begin return Rbind::std_string_string(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::string::string(std::string other) @@std_string_string__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_string_string__2_defaults1[i] end begin return Rbind::std_string_string__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::string::string(c_string str, size_t size) @@std_string_string__3_defaults2 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@std_string_string__3_defaults2[i] end begin return Rbind::std_string_string__3(*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
78419 78420 78421 |
# File 'lib/ropencv/ropencv_types.rb', line 78419 def self.null new(StringStruct.new) end |
.to_native(obj, context) ⇒ Object
78509 78510 78511 |
# File 'lib/ropencv/ropencv_types.rb', line 78509 def self.to_native(obj,context) rbind_to_native(obj,context) end |
Instance Method Details
#[](idx) ⇒ Char
78578 78579 78580 78581 |
# File 'lib/ropencv/ropencv_types.rb', line 78578 def [](idx) __validate_pointer__ Rbind::std_string_operator_array( self, idx) end |
#c_str ⇒ C_string
Note:
method wrapper for const c_string std::string::c_str()
78585 78586 78587 78588 |
# File 'lib/ropencv/ropencv_types.rb', line 78585 def c_str() __validate_pointer__ Rbind::std_stringc_str( self) end |
#clear ⇒ Void
Note:
method wrapper for void std::string::clear()
78599 78600 78601 78602 |
# File 'lib/ropencv/ropencv_types.rb', line 78599 def clear() __validate_pointer__ Rbind::std_string_clear( self) end |
#compare(other) ⇒ Fixnum
Note:
method wrapper for int std::string::compare(std::string other)
78607 78608 78609 78610 |
# File 'lib/ropencv/ropencv_types.rb', line 78607 def compare(other) __validate_pointer__ Rbind::std_string_compare( self, other) end |
#empty ⇒ Bool
Note:
method wrapper for bool std::string::empty()
78592 78593 78594 78595 |
# File 'lib/ropencv/ropencv_types.rb', line 78592 def empty() __validate_pointer__ Rbind::std_string_empty( self) end |
#length ⇒ Size_T
Note:
method wrapper for size_t std::string::length()
78570 78571 78572 78573 |
# File 'lib/ropencv/ropencv_types.rb', line 78570 def length() __validate_pointer__ Rbind::std_string_length( self) end |
#size ⇒ Size_T
Note:
method wrapper for size_t std::string::size()
methods
78563 78564 78565 78566 |
# File 'lib/ropencv/ropencv_types.rb', line 78563 def size() __validate_pointer__ Rbind::std_string_size( self) end |
#swap(other) ⇒ Void
Note:
method wrapper for void std::string::swap(std::string other)
78615 78616 78617 78618 |
# File 'lib/ropencv/ropencv_types.rb', line 78615 def swap(other) __validate_pointer__ Rbind::std_string_swap( self, other) end |
#to_s ⇒ Object
converts String into a string by crawling through all its attributes
78552 78553 78554 |
# File 'lib/ropencv/ropencv_types.rb', line 78552 def to_s "#<std::string >" end |