/src/wrappers/glib/library/shared_g_error.e

http://github.com/tybor/Liberty · Specman e · 45 lines · 31 code · 11 blank · 3 comment · 3 complexity · 3a6b5f73b19653cbab3ea25ebfd3e1ce MD5 · raw file

  1. indexing
  2. description: "Shared error for C features that supports it."
  3. copyright: "[
  4. Copyright (C) 2006 Paolo Redaelli, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hopeOA that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. -- TODO: this design is way too simplicistic to scale well. It also
  19. -- tends to make the end-user programmer write horrible code
  20. deferred class SHARED_G_ERROR
  21. inherit ANY undefine is_equal, copy end
  22. insert POINTER_HANDLING
  23. feature
  24. error: G_ERROR is
  25. --
  26. once
  27. create Result.empty
  28. end
  29. is_successful: BOOLEAN
  30. has_error: BOOLEAN is
  31. do
  32. Result := not is_successful
  33. end
  34. end -- class SHARED_G_ERROR