PageRenderTime 15ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

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