PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/common/struct_skeleton

http://github.com/tybor/Liberty
#! | 24 lines | 20 code | 4 blank | 0 comment | 0 complexity | cd16ec8596f9587690b88a8d2e871e82 MD5 | raw file
 1note
 2	description: "Access to $struct C structure"
 3	copyright: "Copyright (C) 2007-2016: $EWLC_developer, $original_copyright_holder"
 4	license: "LGPL v2 or later"
 5	date: "$Date:$"
 6	revision: "$Revision:$"
 7
 8deferred class _STRUCT
 9feature {} -- Structure getter/setter calls
10	get_$field (a_struct: POINTER): $type is
11		external "C struct $struct get $field use <$include>"
12		end
13
14	set_$field (a_struct: POINTER; a_$field: $type) is
15		external "C struct $struct set $field use <$include>"
16		end
17
18feature -- size
19	struct_size: INTEGER is
20		external "C inline use <$include>"
21		alias "sizeof($struct)"
22		end
23
24end