Guest User

Untitled

a guest
Feb 16th, 2018
127
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. note
  2.     description: ""
  3.     author: ""
  4.     date: "$Date$"
  5.     revision: "$Revision$"
  6.  
  7. class
  8.     ETF_DIE
  9. inherit
  10.     ETF_DIE_INTERFACE
  11.         redefine die end
  12. create
  13.     make
  14. feature -- command
  15.     die(id: INTEGER_64)
  16.         require else
  17.             die_precond(id)
  18.         do
  19.             if not (id > 0) then
  20.                 errors.set_err (errors.err_id_nonpositive)
  21.             elseif (model.id_invalid (id) = false) then
  22.                 errors.set_err (errors.err_id_unused)
  23.             elseif (model.is_dead (id) = true) then
  24.                 errors.set_err (errors.err_dead_already)
  25.             else
  26.                 model.die(id)
  27.             end
  28.             etf_cmd_container.on_change.notify ([Current])
  29.         end
  30.  
  31. end
RAW Paste Data