n_cst_hash_long.sru 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. $PBExportHeader$n_cst_hash_long.sru
  2. forward
  3. global type n_cst_hash_long from n_cst_hash
  4. end type
  5. end forward
  6. global type n_cst_hash_long from n_cst_hash
  7. end type
  8. global n_cst_hash_long n_cst_hash_long
  9. forward prototypes
  10. public function long of_get_value (readonly string as_key)
  11. public function integer of_set_value (readonly string as_key, readonly long al_value)
  12. public function n_cst_hash_entry of_create_entry ()
  13. end prototypes
  14. public function long of_get_value (readonly string as_key);long ll_ret
  15. n_cst_hash_long_entry lnvo_cur_entry
  16. lnvo_cur_entry = of_find_hash_entry(as_key)
  17. if not isnull(lnvo_cur_entry) then
  18. ll_ret = lnvo_cur_entry.il_value
  19. else
  20. setnull(ll_ret)
  21. end if
  22. return ll_ret
  23. end function
  24. public function integer of_set_value (readonly string as_key, readonly long al_value);integer li_ret = 1
  25. n_cst_hash_long_entry lnvo_cur_entry
  26. lnvo_cur_entry = of_get_hash_entry(as_key)
  27. if not isnull(lnvo_cur_entry) then
  28. lnvo_cur_entry.il_value = al_value
  29. else
  30. li_ret = -1
  31. end if
  32. return li_ret
  33. end function
  34. public function n_cst_hash_entry of_create_entry ();n_cst_hash_entry lnvo_ret
  35. lnvo_ret = create n_cst_hash_long_entry
  36. return lnvo_ret
  37. end function
  38. on n_cst_hash_long.create
  39. call super::create
  40. end on
  41. on n_cst_hash_long.destroy
  42. call super::destroy
  43. end on