File: n_cst_indirect.sru
Size: 3611
Date: Fri, 22 Feb 2019 21:57:52 +0100
$PBExportHeader$n_cst_indirect.sru
forward
global type n_cst_indirect from nonvisualobject
end type
end forward

global type n_cst_indirect from nonvisualobject autoinstantiate
end type

type variables
// The basic syntax is:
//
//    Indirect Datatype VariableName {SetterFunction(*value),GetterFunction()}
//
//    of_SetReadOnly can be used for the setter function to implement a read-only property.
//
// An in-depth article can be found here:
//
// https://www.rgagnon.com/pbdetails/pb-0133.html
//

end variables

forward prototypes
protected subroutine of_setreadonly (readonly any aa_value)
protected subroutine of_setreadonly (readonly boolean ab_value)
protected subroutine of_setreadonly (readonly integer ai_value)
protected subroutine of_setreadonly (readonly long al_value)
protected subroutine of_setreadonly (readonly powerobject apo_value)
protected subroutine of_setreadonly (readonly string as_value)
protected subroutine of_setreadonly (readonly unsignedlong aul_value)
protected function any of_getarray (string as_name)
protected function string of_getitem (string as_name, long al_dimensions[])
public function long of_lowerbound ()
protected subroutine of_setarray (string as_name, string as_values[])
protected subroutine of_setitem (string as_name, long al_dimensions[], string as_value)
public function long of_upperbound ()
end prototypes

protected subroutine of_setreadonly (readonly any aa_value);// The value is Read-Only
end subroutine

protected subroutine of_setreadonly (readonly boolean ab_value);// The value is Read-Only
end subroutine

protected subroutine of_setreadonly (readonly integer ai_value);// The value is Read-Only
end subroutine

protected subroutine of_setreadonly (readonly long al_value);// The value is Read-Only
end subroutine

protected subroutine of_setreadonly (readonly powerobject apo_value);// The value is Read-Only
end subroutine

protected subroutine of_setreadonly (readonly string as_value);// The value is Read-Only
end subroutine

protected subroutine of_setreadonly (readonly unsignedlong aul_value);// The value is Read-Only
end subroutine

protected function any of_getarray (string as_name);// called when you get the indirect array.
//
// as_name     The name of the indirect variable

Any la_array[]

Return la_array

end function

protected function string of_getitem (string as_name, long al_dimensions[]);// called when you get the value of an item in the indirect array.
//
// as_name        The name of the indirect variable
// al_dimensions  The array index

Return ""

end function

public function long of_lowerbound ();// called when LowerBound called on indirect array, must be public.
Return 0

end function

protected subroutine of_setarray (string as_name, string as_values[]);// called when you set the indirect array.
//
// as_name     The name of the indirect variable
// as_values   An array of string values

end subroutine

protected subroutine of_setitem (string as_name, long al_dimensions[], string as_value);// called when you get the value of an item in the indirect array.
//
// as_name        The name of the indirect variable
// al_dimensions  The array index
// as_values      The value being set

end subroutine

public function long of_upperbound ();// called when UpperBound called on indirect array, must be public.
Return 0

end function

on n_cst_indirect.create
call super::create
TriggerEvent( this, "constructor" )
end on

on n_cst_indirect.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on