Class: OpenCV::Std::Runtime_Error
- Inherits:
-
Object
- Object
- OpenCV::Std::Runtime_Error
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
-
#cast_toexception(parse_ownership) ⇒ Std::Exception
(also: #castToexception)
methods.
-
#to_s ⇒ Object
converts Runtime_Error into a string by crawling through all its attributes.
Class Method Details
.new(*args) ⇒ Object
78811 78812 78813 78814 78815 78816 78817 78818 |
# File 'lib/ropencv/ropencv_types.rb', line 78811 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Runtime_ErrorStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
78807 78808 78809 |
# File 'lib/ropencv/ropencv_types.rb', line 78807 def self.null new(Runtime_ErrorStruct.new) end |
Instance Method Details
#cast_toexception(parse_ownership) ⇒ Std::Exception Also known as: castToexception
Note:
method wrapper for std::exception* std::runtime_error::castToexception(bool parse_ownership)
methods
78896 78897 78898 78899 78900 78901 78902 78903 78904 |
# File 'lib/ropencv/ropencv_types.rb', line 78896 def cast_toexception(parse_ownership) __validate_pointer__ result = Rbind::std_runtime_error_cast_toexception( self, parse_ownership) 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 |
#to_s ⇒ Object
converts Runtime_Error into a string by crawling through all its attributes
78884 78885 78886 |
# File 'lib/ropencv/ropencv_types.rb', line 78884 def to_s "#<std::runtime_error >" end |