syntax for calling parent class _overloadPlus method [message #93111] |
Thu, 28 April 2016 11:45 |
Markus Schmassmann
Messages: 129 Registered: April 2016
|
Senior Member |
|
|
i'm trying to overload operators for my subclass of idl_variable, but
don't find the correct syntax for calling the parent classes' operator
function.
How do i have to correct the line below marked ';problem' without using
'left+right'?
i guess i have to put something like XXX.idl_variable::_overload...
but what would then be XXX?
---
pro sandbox__define
struct={sandbox, $
inherits idl_variable, $
reps: ptr_new() $
}
end
function sandbox::Init, array, reps
; a bit of code
void=self.idl_variable::init()
void=self.idl_variable::set_value(array)
*self.reps=reps
return, 1
end
function sandbox::_overloadPlus, left, right
; some code
out=idl_variable::_overloadPlus(left,right) ;problem
; some more code
return, out
end
---
PS: Sorry, stupid question of a beginner, but i failed to find the
solution elsewhere.
PPS: There may be more errors, but the rest at least compiles.
|
|
|