Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Matrices/generic_vecmats.adb, Revision 1.1
1.1 ! maekawa 1: with unchecked_deallocation;
! 2:
! 3: package body Generic_VecMats is
! 4:
! 5: procedure Clear ( v : in out VecMat ) is
! 6: begin
! 7: for i in v'range loop
! 8: Matrices.Clear(v(i));
! 9: end loop;
! 10: end Clear;
! 11:
! 12: procedure Shallow_Clear ( v : in out Link_to_VecMat ) is
! 13:
! 14: procedure free is new unchecked_deallocation(VecMat,Link_to_VecMat);
! 15:
! 16: begin
! 17: free(v);
! 18: end Shallow_Clear;
! 19:
! 20: procedure Deep_Clear ( v : in out Link_to_VecMat ) is
! 21: begin
! 22: if v /= null
! 23: then Clear(v.all);
! 24: Shallow_Clear(v);
! 25: end if;
! 26: end Deep_Clear;
! 27:
! 28: end Generic_VecMats;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>