Class: Rubber::C_GInterface
- Defined in:
- lib/rubber/codegen/ginterface.rb
Instance Attribute Summary collapse
-
#gparent_class ⇒ Object
Returns the value of attribute gparent_class.
Attributes inherited from C_Class
#child_names, #doc, #post_except, #post_func, #post_only, #pre_except, #pre_only
Attributes included from RegisterChildren
#child_names, #source_file, #source_line
Attributes inherited from C_Module
Instance Method Summary collapse
Methods inherited from C_Class
#check_wrap_ok, #code, #declare, #default_cname, #fullname, #get_root, #is_root?
Methods included from RegisterChildren
Methods inherited from C_Module
#add_alias, #code, #contents, #declare, #default_cname, #external?, #fullname, #get_root, #is_root?, #register_aliases
Instance Attribute Details
#gparent_class ⇒ Object
Returns the value of attribute gparent_class.
6 7 8 |
# File 'lib/rubber/codegen/ginterface.rb', line 6 def gparent_class @gparent_class end |
Instance Method Details
#doc_rd(io) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rubber/codegen/ginterface.rb', line 11 def doc_rd(io) id = fullname() id += " < #{gparent_class} " if gparent_class depth = (fullname.gsub(/[^:]/,'').size >> 1) io.puts "=#{'=' * depth} interface #{id}" io.puts @doc if @doc contents.each { |f| f.doc_rd(io) } end |
#pre_func(io, func) ⇒ Object
19 20 21 22 |
# File 'lib/rubber/codegen/ginterface.rb', line 19 def pre_func(io, func) io.puts " GObject *_self = RVAL2GOBJ(self);" if func.text =~ /_self/ super(io, func) end |
#register(io, already_defined = false) ⇒ Object
7 8 9 10 |
# File 'lib/rubber/codegen/ginterface.rb', line 7 def register(io, already_defined=false) io.puts " #{cname} = G_DEF_INTERFACE(#{superclass}, #{name.inspect}, #{parent.cname});" register_children(io) end |