Class: Rbind::GeneratorC::ConstsHelper

Inherits:
HelperBase
  • Object
show all
Defined in:
lib/rbind/generator_c.rb

Instance Attribute Summary

Attributes inherited from HelperBase

#includes, #name

Instance Method Summary collapse

Methods inherited from HelperBase

#binding, #initialize, #wrap_includes

Constructor Details

This class inherits a constructor from Rbind::GeneratorC::HelperBase

Instance Method Details

#wrap_constsObject



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/rbind/generator_c.rb', line 83

def wrap_consts
    str = ""
    @root.each_container do |type|
        str2 = ""
        type.each_const(false) do |c|
            str2 += "#{c.csignature};\n"
        end
        if !str2.empty?
             str += "\n\n//constants for #{type.full_name}\n"
             str += str2
        end
        str
    end
    str
end