[BACK]Return to generic_vecvecs.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Matrices

File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Matrices / generic_vecvecs.adb (download)

Revision 1.1, Sun Oct 29 17:45:23 2000 UTC (23 years, 8 months ago) by maekawa
Branch point for: MAIN

Initial revision

with unchecked_deallocation;

package body Generic_VecVecs is

  procedure Clear ( v : in out VecVec ) is
  begin
    for i in v'range loop
      Vectors.Clear(v(i));
    end loop;
  end Clear;

  procedure Shallow_Clear ( v : in out Link_to_VecVec ) is

    procedure free is new unchecked_deallocation(VecVec,Link_to_VecVec);

  begin
    free(v);
  end Shallow_Clear;

  procedure Deep_Clear ( v : in out Link_to_VecVec ) is
  begin
    if v /= null
     then Clear(v.all);
          Shallow_Clear(v);
    end if;
  end Deep_Clear;

end Generic_VecVecs;